Sheesh!  I'm sorry -- I guess I just need to learn to read.

        ---

"Translates the receiver’s coordinate system so that its origin moves to a new location.

[I stopped reading here and got confused. The Discussion section explains all.]
- (void)translateOriginToPoint:(NSPoint)newOrigin

Parameters newOrigin
A point that specifies the new origin.

Discussion
In the process, the origin of the receiver’s bounds rectangle is shifted by (–newOrigin.x, –newOrigin.y). This method neither redisplays the receiver nor marks it as needing display. You must do this yourself with display or setNeedsDisplay:.

Note the difference between this method and setting the bounds origin. Translation effectively moves the image inside the bounds rectangle, while setting the bounds origin effectively moves the rectangle over the image. The two are in a sense inverse, although translation is cumulative, and setting the bounds origin is absolute."

        ---

The working code is:

    NSRect iviewBounds = imageView.bounds;
    iviewBounds.origin.x = xStart;
    iviewBounds.origin.y = yStart;
    [imageView setBounds:iviewBounds];

My apologies for the spam to list. Hopefully, this will help some future archive spelunker.

--
When you scold a dog for chewing your sofa, he's sorry he chewed your sofa. When you scold a wolf for chewing your sofa, he's sorry you have such an unhealthy attachment to your sofa.



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to