|
|
Re: How can I manipulate the size of image without scaling ? [message #460615 is a reply to message #460611] |
Thu, 01 September 2005 14:17 |
Eclipse User |
|
|
|
Originally posted by: sunil_kamath.nohotspammail.com
"Yves Harms" <user@domain.invalid> wrote in message
news:df6u2m$8k5$1@news.eclipse.org...
> Is there any way to add additional canvas width to an swt image without
> scaling it ? (This would be the same as enlarging the cnavas size in
> Photoshop).
> The additional canvas space should be transparent.
>
> Background:
>
> Images displayed in a table are always resized to the size of the first
> image inserted into the table.
> So far so god, but the following images are scaled without respect to
> their aspect ratio. So I want to workaround this by normalizing the aspect
> ratio of all images by adding additional canvas space before inserting
> them into the table.
>
Create a new Image with the increased canvas size.
Create a GC for the new Image.
Draw the old Image in the desired location in the GC.
Dispose the GC.
Dispose the old Image.
---
Sunil
|
|
|
Powered by
FUDForum. Page generated in 0.03437 seconds