I am using the croppingImageView example to allow me to place a
picture of the desktop in to a window (about 400X300). I then want to
be able to select an area of that picture and translate it to pick up
that part of the desktop however what I get is completely
unpredictable. It almost looks like the selection is off by the height
of the selection but attempting to add the height of the selection to
the origin.y seems to make no change what so ever. Below is the code
I'm using to translate the selection.
double percent = [movieWidth doubleValue] / [theScreen
frame].size.width;
selected.origin.x = selection.origin.x *([theScreen frame].size.width/
([theScreen frame].size.width *percent));
selected.origin.y = selection.origin.y / percent;
selected.size.height = selection.size.height / percent;
selected.size.width = selection.size.width / percent;
movieFrame.size.width = [movieWidth doubleValue];
movieFrame.size.height = [theScreen frame].size.height * percent;
_______________________________________________
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