• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
CIContext drawing issue.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CIContext drawing issue.


  • Subject: CIContext drawing issue.
  • From: Cloud Strife <email@hidden>
  • Date: Tue, 27 Feb 2007 18:07:17 +0000

Hi all, I am trying to draw an image in my customized NSView subclass: CocoaDrawing:
- (void)drawRect:(NSRect)rect {
// Drawing code here.
bitmapRep = [myNSImageView bitmapImageRepForCachingDisplayInRect: [myNSImageView visibleRect]];
NSImage * testRef = [myNSImageView image];
if (testRef != nil) {
printf("my image view contains some image\n");
}
myCIImage = [[CIImage alloc] initWithBitmapImageRep:bitmapRep];
if (myCIImage != nil) {
printf("my core image contains some image\n");
}

myCIContext = [[CIContext alloc] init];
[myCIContext drawImage:myCIImage
atPoint: CGPointZero
fromRect: CGRectMake(rect.origin.x,
rect.origin.y,
rect.size.width,
rect.size.height)];

/*[[NSColor greenColor] set];
NSRect r = NSMakeRect(10, 10, 50, 60);
NSBezierPath *bp = [NSBezierPath bezierPathWithRect:r];
[bp fill]; */
printf("Execute here?\n");

}
AS I have judged, the myCIImage and the testRef aren't nil. And I have loaded a image to myNS
ImageView previously, however , after I call the [myCustomizedView display], my required image doesn't appear in my customized view.
Can anyone explain what is wrong with my code?
Thank you for any help.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: CIContext drawing issue.
      • From: Darkshadow <email@hidden>
  • Prev by Date: Re: document window appears very briefly
  • Next by Date: Re: porting core data app to the dark side
  • Previous by thread: Re: document window appears very briefly
  • Next by thread: Re: CIContext drawing issue.
  • Index(es):
    • Date
    • Thread