Commit Graph

35 Commits

Author SHA1 Message Date
David Elliott
6a5c31c285 Add wxGCSafeRetain/wxGCSafeRelease to the vast majority of wxCocoa code.
Copyright 2008 Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-08 00:35:39 +00:00
Vadim Zeitlin
8f884a0dcc Fix Ok/IsOk() mess in wxGDIObject-derived classes; also added
wxGDIObject::Create/CloneGDIRefData() and implemented them for (almost) all
ports


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-15 17:54:20 +00:00
David Elliott
4706bee7c1 Implement wxBitmap::GetSubBitmap.
Patch authored by Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-29 07:28:17 +00:00
David Elliott
d381b7dfdd Add wxBitmap constructors and Create methods to allow creating a wxBitmap from an NSBitmapImageRep or NSImage instance.
Copyright 2007 Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-09 19:05:51 +00:00
David Elliott
148af7c534 Merged 47839 from 2.8 branch:
Add missing wxT.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-01 04:31:28 +00:00
David Elliott
99635c9934 Add a wxAutoNSAutoreleasePool to wxBitmap::CopyFromIcon.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-28 20:34:42 +00:00
David Elliott
319fe1034c * Implement the wxMask copy constructor to retain the source object's
m_cocoaNSBitmapImageRep (fixes multiple release bug).
* Add some debug messages for unimplemented wxMask::Create overloads.
* Implement mask creation w/ key color from 8-bpp grayscale bitmap.
  This makes the mask image in the drawing sample's mask page work.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-27 20:57:50 +00:00
Václav Slavík
650c0aa918 cleanup of raw access to bitmaps:
1. remove UseAlpha() on platforms that don't need it and call it automatically from ~wxPixelData instead of requiring explicit call; deprecate wxPixelData::UseAlpha()
2. don't call UngetRawData() if GetRawData() failed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-10 13:32:25 +00:00
Vadim Zeitlin
b7cacb43db add IsOk() to all classes having Ok() method (patch 1570985)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-08 21:56:55 +00:00
Paul Cornett
452418c4b0 Move some things to wxBitmapBase to avoid much duplication.
Use proper const for XPM data, and const void* for arbitary bitmap data.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-08 08:04:49 +00:00
Włodzimierz Skiba
155ecd4c42 Include wx/image.h according to precompiled headers of wx/wx.h (with other minor cleaning).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-03 19:02:54 +00:00
Włodzimierz Skiba
0bca037363 Include wx/bitmap.h according to precompiled headers of wx/wx.h (with other minor cleaning).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-06-14 10:02:19 +00:00
Vadim Zeitlin
637b7e4f3a added semicolons after wxCHECK()s (part of patch 1450705)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-03-21 14:16:34 +00:00
David Elliott
efe854952a Make bitmaps work when compiling on Tiger and add some comments about this.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-05-22 23:39:30 +00:00
David Elliott
2a8db3cdda Implemented simplistic ConvertToImage()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-11 15:27:38 +00:00
David Elliott
b4918747ef Corrected m_depth assignment in CopyFromIcon
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-11 15:07:02 +00:00
David Elliott
68a8c89baa Implement CopyFromIcon
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-11 14:55:24 +00:00
David Elliott
4170c465f4 Added wxBitmap::UseAlpha() stub.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-12-29 04:00:28 +00:00
Julian Smart
065e208ec0 More name change
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 15:10:40 +00:00
David Elliott
360f42623d Change <class PixelData> to <typename PixelData> (2.95 compile fix)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-04-13 14:20:05 +00:00
David Elliott
a6d27d480b Added missing wxT()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-04-10 00:43:25 +00:00
David Elliott
9a6e13a6f7 wxBitmap::GetNSImage(): Added trace messages. Release maskImage.
wxMask_CreateFromBitmapData(): Don't clobber byte past the end of dest buffer.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-02-09 03:27:47 +00:00
David Elliott
4858097646 Use wxLogTrace instead of wxLogDebug for trace messages
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-02-08 07:07:04 +00:00
David Elliott
f8c10ed8b3 ConvertToImage: Check !Ok() (we may not have any ref data at all) and if
the bitmap is not okay return wxNullImage (instead of a dummy 5x5 image)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-01-29 06:26:10 +00:00
David Elliott
2b030203c5 Applied patch #881258: Add wxT() to debug messages and a few others
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-01-22 06:13:51 +00:00
David Elliott
9c54e4ae1f Add wxBitmap::GetNSImage() which creates an autoreleased NSImage either
with or without the bitmap mask applied.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-12-15 19:30:54 +00:00
David Elliott
ea3d4caf99 Add support for wxMask creation from RGBx data (x=unused)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-12-09 03:21:38 +00:00
David Elliott
ce20d822b0 Compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-12-08 15:07:25 +00:00
David Elliott
016b064360 Implement wxMask given a wxBitmap and a mask wxColour.
TODO: Masks from other sources.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-12-08 15:01:39 +00:00
David Elliott
b60c6e9776 Added simple implementation of (Get|Unget)RawData.
Premultipied alpha is not handled at this point.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-12-06 23:27:08 +00:00
David Elliott
449c567346 Support precompiled headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-02 19:03:22 +00:00
David Elliott
ab13160e71 * When cloning the ref data, copy the NSBitmapImageRep instead of retaining it
* Added SetNSBitmapImageRep so that wxMemoryDC can update the contents by
  replacing the entire NSBitmapImageRep.
* Added ability to create bitmaps from width/height


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-08 14:49:53 +00:00
David Elliott
29c310fe05 Removed wxTheBitmapList code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-05 12:54:44 +00:00
David Elliott
d135b1a5f7 wxCocoa: Added preliminary wxBitmap support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22188 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-21 00:27:32 +00:00
David Elliott
a24aff654f FIXME: Complete stubs or other cruft necessary to make wxCocoa build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-22 02:56:04 +00:00