objective c - What's the RIGHT way to draw an image in the upper left corner on a mac? -
I have an NSView in ScrollView and I am trying to draw a picture in it. The problem is that I want the upper left corner of the lock image in the top left corner of the frame, instead of the lower left corner, the scene that I want to do, I need to zoom in and out and rotate.
Currently, I have a system where I calculate how much I translate my image based on the size of the image and to make the window shape so that I can see one outside the scrollview There is a need to create additional scenes, so that I can get the size of the window, which does not include decorations, then I can calculate the size of the image based on the size of the image and the size of the window, and that And based, I have to translate into whence the image that can reveal it.
My only other idea was to use IFlipped: method, but it ends my image LR which is bad.
Is there another way I should do this?
If you want 0,0
in the upper-left corner Again, to return -is flipped
to return yes
is the way to go, it should not affect the coordination systems of any subluys (I think!), But images drawn directly in the flipped footage will appear at the top-up, unless you apply any changes to them.
Comments
Post a Comment