Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » cropping an image?
cropping an image? [message #184581] Tue, 14 June 2005 16:26 Go to next message
Eclipse UserFriend
Originally posted by: clmind.yahoo.com

Does anyone know how to do cropping on an Image/ImageData/ImageFigure?

I'm using an extension of ImageFigure that stores an internal unaltered
ImageData. Whenever the user changes the bounds of the figure, the internal
Image is disposed and recreated to be rescaled to the new size from the
original ImageData (using scaleTo on ImageData)

I need to be able to know how to also do cropping of the image displayed,
and can't seem to find any methods readily available for doing this - does
anyone know how this should be done?
Re: cropping an image? [message #184597 is a reply to message #184581] Tue, 14 June 2005 19:41 Go to previous message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
drawImage allows to "crop" the painting without having to actually crop the
actual image (btw, clipping does this for you already). Similarly, you can
scale an image while painting without having to recreate it.

"Christine Lee" <clmind@yahoo.com> wrote in message
news:d8n003$43c$1@news.eclipse.org...
> Does anyone know how to do cropping on an Image/ImageData/ImageFigure?
>
> I'm using an extension of ImageFigure that stores an internal unaltered
> ImageData. Whenever the user changes the bounds of the figure, the
internal
> Image is disposed and recreated to be rescaled to the new size from the
> original ImageData (using scaleTo on ImageData)
>
> I need to be able to know how to also do cropping of the image displayed,
> and can't seem to find any methods readily available for doing this - does
> anyone know how this should be done?
>
>
Previous Topic:Child editparts, figures, layouts and positions.
Next Topic:Image interaction
Goto Forum:
  


Current Time: Thu Dec 12 20:27:34 GMT 2024

Powered by FUDForum. Page generated in 0.03200 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top