Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > How to crop an scaled image in an NSImageView

How to crop an scaled image in an NSImageView
Thread Tools
F33
Fresh-Faced Recruit
Join Date: Dec 2002
Location: Los Angeles, CA
Status: Offline
Reply With Quote
Dec 25, 2002, 05:07 PM
 
Hi guys. I am new to Cocoa programming. I am working on my first Cocoa program and I am running into some trouble. It would be awesome if you can give me some pointers on how to proceed with the following.

Part of my program needs to crop an image in a subclass of NSImageView. I am trying to imitate what you can do in iPhoto. The image is scaled to fit in the NSImageView. How do I get my selectedImage to draw the correct portion of the sourceImage if I have a selectedRect with the coordinates in NSImageView? I've been playing with NSAffineTransform for a few days and all I can get is the bottom left portion of the image.

Help in any way is greatly appreciated. Happy Holidays!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:59 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2