• 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
How to draw a NSImage in a view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to draw a NSImage in a view


  • Subject: How to draw a NSImage in a view
  • From: Quentin Mathé <email@hidden>
  • Date: Tue, 10 Jul 2001 08:53:48 +0200

I have a subclass of NSView with two methods :
- (void)drawRect:(NSRect)rect
{
NSRect myBounds = [self bounds];

[tableViewImage drawInRect:myBounds
fromRect:myBounds
operation:NSCompositeCopy
fraction:nil];
}

I don't understand what is the use of the parameters fromRect and fraction...

- (void)setTableViewImage:(NSImage *)image
{
[tableViewImage autorelease];
tableViewImage = [image copy];
[self setNeedsDisplay:YES];
}

When I call setTableViewImage, the NSView displays nothing, why ?

--
Quentin Mathi
email@hidden


  • Follow-Ups:
    • Re: How to draw a NSImage in a view
      • From: Andrew Platzer <email@hidden>
    • Re: How to draw a NSImage in a view
      • From: Kyle Mandli <email@hidden>
  • Prev by Date: Re: Password field
  • Next by Date: NSMenu in small PopUp buttons
  • Previous by thread: Re: Security framework question
  • Next by thread: Re: How to draw a NSImage in a view
  • Index(es):
    • Date
    • Thread