• 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
-isFlipped not working right when drawing IconAndTextCell to NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-isFlipped not working right when drawing IconAndTextCell to NSImage


  • Subject: -isFlipped not working right when drawing IconAndTextCell to NSImage
  • From: "Lawrence Sanbourne" <email@hidden>
  • Date: Fri, 28 Apr 2006 20:13:19 -0500

Hello,

I'm fairly new to Cocoa drawing, and I'm having a problem with
-isFlipped that I haven't been able to figure out. From a subclass of
NSTableView, I'm drawing one of the table's IconAndTextCell objects
into an NSImage to create a custom drag image:

- (NSImage *)dragImageForRowsWithIndexes:(NSIndexSet *)dragRows
tableColumns:(NSArray *)tableColumns event:(NSEvent *)dragEvent
offset:(NSPointPointer)dragImageOffset {
//...
		[dragImage lockFocus];
		[cell drawWithFrame:cellDrawingFrame inView:self];
		[dragImage unlockFocus];
//...
return dragImage;
}

IconAndTextCell is careful to check the -isFlipped status of its
controlView. However, this is causing the icon in the cell to draw in
the wrong place. If I negate the conditional on the if([controlView
isFlipped]) in IconAndTextCell, the problem is fixed for drag images
-- but then of course all the other IconAndTextCells look weird.

What am I doing wrong?

Larry
_______________________________________________
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


  • Prev by Date: Re: Do I need private accessor methods?
  • Next by Date: Performance of updates to to-many relationships
  • Previous by thread: CGLayer and cached views
  • Next by thread: Performance of updates to to-many relationships
  • Index(es):
    • Date
    • Thread