• 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: erasing, redrawing NSBezierPath into and NSImage problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: erasing, redrawing NSBezierPath into and NSImage problem


  • Subject: Re: erasing, redrawing NSBezierPath into and NSImage problem
  • From: "Louis C. Sacha" <email@hidden>
  • Date: Tue, 6 Jul 2004 13:09:48 -0700

Hello...

It looks like you are creating a new image every time drawLabels is called, and you aren't doing anything with it.

Instead of creating a new image, you need to either somehow get a reference to the existing images being used in the matrix and do your redrawing in those images, or after you've created and drawn the images you need to tell the matrix to use them instead of the old images.

Hope that helps,

Louis


Following is my code for drawing the labels:

- (void)drawLabels
{
...
someLabel = [[NSImage alloc] initWithSize:NSMakeSize(cellWidth, cellHeight)];

[someLabel lockFocus];
...
[someLabel unlockFocus];

[labelMatrix setNeedsDisplay: YES];
}


Will
_______________________________________________
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: erasing, redrawing NSBezierPath into and NSImage problem
      • From: Wilhelm Phillips <email@hidden>
References: 
 >Re: erasing, redrawing NSBezierPath into and NSImage problem (From: Wilhelm Phillips <email@hidden>)

  • Prev by Date: Prevent file access.
  • Next by Date: Re: Prevent file access.
  • Previous by thread: Re: erasing, redrawing NSBezierPath into and NSImage problem
  • Next by thread: Re: erasing, redrawing NSBezierPath into and NSImage problem
  • Index(es):
    • Date
    • Thread