• 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
Scaled image in NSButtonCell flipped - drawInRect:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scaled image in NSButtonCell flipped - drawInRect:


  • Subject: Scaled image in NSButtonCell flipped - drawInRect:
  • From: Richard Salvatierra <email@hidden>
  • Date: Tue, 3 Jan 2006 18:13:32 -0500

I have been searching the lists for days now and can not seem to solve me problem.
I have an NSButtonCell subclass in order to build my own layout within an NSMatrix and
be able to scale the buttonCells. (adding colums/rows as needed)
I override:
- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *) controlView


Within, I draw an image using:
[image drawInRect: cellFrame fromRect: NSZeroRect operation: NSCompositeSourceIn fraction: 1.0];


in order to scale the image with the scaling cellFrame

My problem is the image is flipped. Using the drawInRect, [image setFlipped:YES] will not work.
I have dabbled with NSAffineTransform but am having trouble effecting each cell individually.


It appears most people simply use drawAtPoint but I need drawInRect to scale.

I appreciate your help.
-Rich
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Scaled image in NSButtonCell flipped - drawInRect:
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: Synchronized outlets and actions
  • Next by Date: Re: How does NSFontPanel work?
  • Previous by thread: Re: Synchronized outlets and actions
  • Next by thread: Re: Scaled image in NSButtonCell flipped - drawInRect:
  • Index(es):
    • Date
    • Thread