Re: Incorrect flipping when manually drawing NSCells (was: Fwd: -isFlipped not working right when drawing IconAndTextCell to NSImage)
Re: Incorrect flipping when manually drawing NSCells (was: Fwd: -isFlipped not working right when drawing IconAndTextCell to NSImage)
- Subject: Re: Incorrect flipping when manually drawing NSCells (was: Fwd: -isFlipped not working right when drawing IconAndTextCell to NSImage)
- From: "Lawrence Sanbourne" <email@hidden>
- Date: Wed, 3 May 2006 11:20:04 -0500
On 5/3/06, Matt Neuburg <email@hidden> wrote:
On Mon, 1 May 2006 02:50:33 -0400, Scott Anguish <email@hidden> said:
>The doc knows all
>
>Bottom of this page
>
>Coordinate Systems Basics
>
>http://developer.apple.com/documentation/Cocoa/Conceptual/
>CocoaDrawingGuide/Transforms/chapter_4_section_2.html#//apple_ref/doc/
>uid/TP40003290-CH204-BCIFCIHJ
>
>and here
>
>Drawing in Flipped Coordinate Systems
>
>http://developer.apple.com/documentation/Cocoa/Conceptual/
>CocoaDrawingGuide/Transforms/chapter_4_section_5.html#//apple_ref/doc/
>uid/TP40003290-CH204-BCIBJBGC
Great docs; definitely a vast improvement. Even so (returning to the
original question), it is quite true that the combination of views that are
flipped and unflipped with drawn-things that do or don't compensate for
flippedness (e.g. the text system) can drive you mad. It took me two days of
experimentation to create the NSCells in the lower part of the NotLight
window, and in the end my solution was purely practical - I still don't
understand how it works. (I call this "programming by whacking with a
hammer", my favorite method.) I found it easiest to draw into an NSImage and
use that as the sole basis for the contents of the NSCell; you (Lawrence)
might want to do this with you custom cell too, because once you have the
NSImage, then you can draw it to the cell or to the drag image, as desired.
m.
My problem turned out to be a combination of issues with flipping and
drawing images in a given rect rather than using compositeToPoint.
Anyway, it's fixed at last, and I can move onto new problems...such as
how to correctly offset the drag image while maintaining a minimum
amount that an item must be dragged before the drag session will be
initiated. Or how to get my Sources table view to accept items dragged
from the matrix.
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