*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
Assert ((width < 65535), "improbably large width");
Assert ((height < 65535), "improbably large height");
Assert ((src_x < 65535 && src_x > -65535), "improbably large src_x");
Assert ((width < 65535), "improbably large width");
Assert ((height < 65535), "improbably large height");
Assert ((src_x < 65535 && src_x > -65535), "improbably large src_x");
// "set" and "clear" are dumb drawing modes that ignore the source
// bits and just draw solid rectangles.
set_color (dst->cgc, (gc->gcv.function == GXset
// "set" and "clear" are dumb drawing modes that ignore the source
// bits and just draw solid rectangles.
set_color (dst->cgc, (gc->gcv.function == GXset
src_rect.size.height - src_rect.origin.y);
// This does not copy image data, so it should be fast.
CGImageRef cgi2 = CGImageCreateWithImageInRect (cgi, src_rect);
src_rect.size.height - src_rect.origin.y);
// This does not copy image data, so it should be fast.
CGImageRef cgi2 = CGImageCreateWithImageInRect (cgi, src_rect);
unsigned char *data = [bm bitmapData];
int bps = [bm bitsPerSample];
int bpp = [bm bitsPerPixel];
unsigned char *data = [bm bitmapData];
int bps = [bm bitsPerSample];
int bpp = [bm bitsPerPixel];
Assert ((w < 65535), "improbably large width");
Assert ((h < 65535), "improbably large height");
Assert ((src_x < 65535 && src_x > -65535), "improbably large src_x");
Assert ((w < 65535), "improbably large width");
Assert ((h < 65535), "improbably large height");
Assert ((src_x < 65535 && src_x > -65535), "improbably large src_x");
// "set" and "clear" are dumb drawing modes that ignore the source
// bits and just draw solid rectangles.
set_color (d->cgc, (gc->gcv.function == GXset
// "set" and "clear" are dumb drawing modes that ignore the source
// bits and just draw solid rectangles.
set_color (d->cgc, (gc->gcv.function == GXset
Assert (data, "CGBitmapContextGetData failed");
} else {
// get the bits (desired sub-rectangle) out of the NSView
Assert (data, "CGBitmapContextGetData failed");
} else {
// get the bits (desired sub-rectangle) out of the NSView