• 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
Re: drawing into NSBitmapImageRep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: drawing into NSBitmapImageRep


  • Subject: Re: drawing into NSBitmapImageRep
  • From: Shawn Erickson <email@hidden>
  • Date: Tue, 18 Feb 2003 17:27:31 -0800

On Tuesday, February 18, 2003, at 12:30 PM, Chris Meyer wrote:

> Can someone explain why the code below doesn't work as expected (i.e.
> draw the orange rectangle into the bitmap)?
>
> Is there any way to draw into a bitmap such that the bitmap has a
> specific format pixel format?

[snip]

> [temp_image lockFocus];
> NSEraseRect( NSMakeRect(0,0,200,200) );
> [[NSColor orangeColor] set];
> NSFrameRectWithWidth( NSMakeRect(50,50,100,100), 10 );
> [temp_image unlockFocus];

Not sure off the top of my head but does using
lockFocusOnRepresentation work?

You didn't really say how it didn't work...

-Shawn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: drawing into NSBitmapImageRep
      • From: Chris Meyer <email@hidden>
References: 
 >drawing into NSBitmapImageRep (From: Chris Meyer <email@hidden>)

  • Prev by Date: Re: Invalid window error for a status bar item popup
  • Next by Date: Re: 1 pixel width NSBezierPath issue
  • Previous by thread: drawing into NSBitmapImageRep
  • Next by thread: Re: drawing into NSBitmapImageRep
  • Index(es):
    • Date
    • Thread