• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Resizing image with slider
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Resizing image with slider


  • Subject: Resizing image with slider
  • From: Michael Carter <email@hidden>
  • Date: Mon, 20 Jun 2005 17:38:56 -0700


Hello all. I'm interested in being able to resize an image on the fly using a slider control, much the same way that iChat allows you to resize an image dropped on it's image well to fit within a pre- defined rectangle.


I've subclassed an NSImageView and draw the "target" rect in the middle, and can drop images onto the view. The next thing I need to figure out is how best to provide (semi) smooth resizing using the slider. What is the "best practice" to do this?

Should I make a copy of the imageView's image, change it's size based on the floatValue of the slider, then copy the new image back to the imageView? Or is there a better / more efficient way to resize?

Thanks!

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Prev by Date: Re: NSLog doesn't work with OCUnit
  • Next by Date: Re: NSLog doesn't work with OCUnit
  • Previous by thread: Re: Cocoa Memory Leaks
  • Next by thread: Hierarchy in NSPopUpButtonCell
  • Index(es):
    • Date
    • Thread