I'm just getting my feet wet with Quartz 2D and built a small app to
try out some functions. The following code doesn't behave as I
expected. Specifically the asterisked line below leaves maskedImage
as nil. Either MyImage or aGrayScaleImage will display correctly.
Any help appreciated.
CGLayerRef imageLayerRef=CGLayerCreateWithContext (context, theSize,
NULL);
CGContextRef layerContext=CGLayerGetContext (imageLayerRef);
// Create the masked image
maskedImage=CGImageCreateWithMask(image, mask); //
****************************************
// Draw it to the layer
CGContextDrawImage(layerContext,aRect,maskedImage);
// Then draw the layer to the window graphics context
CGContextDrawLayerInRect(context, contextRect, imageLayerRef);
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/email@hidden