Hello,
How to cut subbitmap from bitmap
is there sth like b = wxcopy(bitmap,pos=(x,y),size(x1,y1)?
Thanks in adv.
Hello,
How to cut subbitmap from bitmap
is there sth like b = wxcopy(bitmap,pos=(x,y),size(x1,y1)?
Thanks in adv.
Przemo wrote:
How to cut subbitmap from bitmap
is there sth like b = wxcopy(bitmap,pos=(x,y),size(x1,y1)?
This looks like what you want:
wxBitmap::GetSubBitmap
wxBitmap GetSubBitmap(const wxRect&rect) const
Returns a sub bitmap of the current one as long as the rect belongs
entirely to the bitmap. This function preserves bit depth and mask
information.
and here's wxRect:
wxRect(int x, int y, int width, int height)
Creates a wxRect object from x, y, width and height values.
This was in the docs, right where I'd expect it: under wxBitmap
By the way, if you wrote bitmap, but meant wxImage:
wxImage::GetSubImage
wxImage GetSubImage(const wxRect& rect) const
Returns a sub image of the current one as long as the rect belongs
entirely to the image.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov