Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » how to prevent stretching of images in swt table
how to prevent stretching of images in swt table [message #444959] Fri, 22 October 2004 10:11 Go to next message
Yves Harms is currently offline Yves HarmsFriend
Messages: 80
Registered: July 2009
Member
Hi,
when inserting images into a table all images will be resized to one
size. If the images have different aspect ratios they will be streched.
How can i prevent this stretching ?

Yves Harms
Re: how to prevent stretching of images in swt table [message #444965 is a reply to message #444959] Fri, 22 October 2004 14:27 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
Images in the table are always the same size as the first image placed in
the table. The operating system performs the scaling.. To manage the
stretching of the images to maintain the origianl proportion, you need to
scale the image yourself before placing it in the table. See the example
below:

public static void main (String [] args) {
Display display = new Display ();
final Image image1 = createImage (display, 20, 30);
final Image image2 = createImage (display, 16, 16);
final Image image3 = createImage (display, 300, 100);
final Image adjustedImage1 = scaleTo16x16 (image1, display);
final Image adjustedImage2 = scaleTo16x16 (image2, display);
final Image adjustedImage3 = scaleTo16x16 (image3, display);
Shell shell = new Shell (display);
shell.setLayout (new FillLayout ());
Table table = new Table (shell, SWT.BORDER);
for (int i = 0; i < 10; i++) {
TableItem item = new TableItem (table, SWT.NONE);
item.setText ("item " + i);
if (i % 3 == 0) {
item.setImage (adjustedImage1);
} else if (i % 3 == 1) {
item.setImage (adjustedImage2);
} else {
item.setImage (adjustedImage3);
}
}
Canvas canvas = new Canvas (shell, SWT.NONE);
canvas.addPaintListener (new PaintListener () {
public void paintControl (PaintEvent e) {
int x = 0, y = 0;
e.gc.drawImage (image1, x, y);
e.gc.drawImage (adjustedImage1, x, y + 100);
x += image1.getBounds ().width + 20;
e.gc.drawImage (image2, x, y);
e.gc.drawImage (adjustedImage2, x, y + 100);
x += image2.getBounds ().width + 20;
e.gc.drawImage (image3, x, y);
e.gc.drawImage (adjustedImage3, x, y + 100);
}
});
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
image1.dispose ();
image2.dispose ();
image3.dispose ();
adjustedImage1.dispose ();
adjustedImage2.dispose ();
adjustedImage3.dispose ();
display.dispose ();
}

static Image scaleTo16x16 (Image image, Display display) {
Image result = new Image (display, 16, 16);
Rectangle bounds = image.getBounds ();
double scaleX = bounds.width <= 16 ? 1.0 : 16.0 / bounds.width;
double scaleY = bounds.height <= 16 ? 1.0 : 16.0 / bounds.height;
double scale = Math.min (scaleX, scaleY);
int width = (int) (scale * bounds.width);
int height = (int) (scale * bounds.height);
GC gc = new GC (result);
gc.drawImage (image, 0, 0, bounds.width, bounds.height, (16 -
width) / 2, (16 - height) / 2, width, height);
gc.dispose ();
return result;
}

static Image createImage (Display display, int width, int height) {
Image image = new Image (display, width, height);
GC gc = new GC (image);
gc.setBackground (display.getSystemColor (SWT.COLOR_RED));
gc.fillOval (0, 0, width, height);
gc.dispose ();
return image;
}


"Yves Harms" <user@domain.invalid> wrote in message
news:clalqg$nvm$1@eclipse.org...
> Hi,
> when inserting images into a table all images will be resized to one size.
> If the images have different aspect ratios they will be streched.
> How can i prevent this stretching ?
>
> Yves Harms
Re: how to prevent stretching of images in swt table [message #445059 is a reply to message #444965] Mon, 25 October 2004 14:02 Go to previous messageGo to next message
Yves Harms is currently offline Yves HarmsFriend
Messages: 80
Registered: July 2009
Member
This is a multi-part message in MIME format.
--------------040409030804030907000905
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Thanks for the example, it works great with Winxp.
Under Mac OS X however, the output is completly unuseable
(see Screenshots: winXp and Mac).
Is this a general bug ?

Yves



Veronika Irvine wrote:
> Images in the table are always the same size as the first image placed in
> the table. The operating system performs the scaling.. To manage the
> stretching of the images to maintain the origianl proportion, you need to
> scale the image yourself before placing it in the table. See the example
> below:
>
> public static void main (String [] args) {
> Display display = new Display ();
> final Image image1 = createImage (display, 20, 30);
> final Image image2 = createImage (display, 16, 16);
> final Image image3 = createImage (display, 300, 100);
> final Image adjustedImage1 = scaleTo16x16 (image1, display);
> final Image adjustedImage2 = scaleTo16x16 (image2, display);
> final Image adjustedImage3 = scaleTo16x16 (image3, display);
> Shell shell = new Shell (display);
> shell.setLayout (new FillLayout ());
> Table table = new Table (shell, SWT.BORDER);
> for (int i = 0; i < 10; i++) {
> TableItem item = new TableItem (table, SWT.NONE);
> item.setText ("item " + i);
> if (i % 3 == 0) {
> item.setImage (adjustedImage1);
> } else if (i % 3 == 1) {
> item.setImage (adjustedImage2);
> } else {
> item.setImage (adjustedImage3);
> }
> }
> Canvas canvas = new Canvas (shell, SWT.NONE);
> canvas.addPaintListener (new PaintListener () {
> public void paintControl (PaintEvent e) {
> int x = 0, y = 0;
> e.gc.drawImage (image1, x, y);
> e.gc.drawImage (adjustedImage1, x, y + 100);
> x += image1.getBounds ().width + 20;
> e.gc.drawImage (image2, x, y);
> e.gc.drawImage (adjustedImage2, x, y + 100);
> x += image2.getBounds ().width + 20;
> e.gc.drawImage (image3, x, y);
> e.gc.drawImage (adjustedImage3, x, y + 100);
> }
> });
> shell.open ();
> while (!shell.isDisposed ()) {
> if (!display.readAndDispatch ()) display.sleep ();
> }
> image1.dispose ();
> image2.dispose ();
> image3.dispose ();
> adjustedImage1.dispose ();
> adjustedImage2.dispose ();
> adjustedImage3.dispose ();
> display.dispose ();
> }
>
> static Image scaleTo16x16 (Image image, Display display) {
> Image result = new Image (display, 16, 16);
> Rectangle bounds = image.getBounds ();
> double scaleX = bounds.width <= 16 ? 1.0 : 16.0 / bounds.width;
> double scaleY = bounds.height <= 16 ? 1.0 : 16.0 / bounds.height;
> double scale = Math.min (scaleX, scaleY);
> int width = (int) (scale * bounds.width);
> int height = (int) (scale * bounds.height);
> GC gc = new GC (result);
> gc.drawImage (image, 0, 0, bounds.width, bounds.height, (16 -
> width) / 2, (16 - height) / 2, width, height);
> gc.dispose ();
> return result;
> }
>
> static Image createImage (Display display, int width, int height) {
> Image image = new Image (display, width, height);
> GC gc = new GC (image);
> gc.setBackground (display.getSystemColor (SWT.COLOR_RED));
> gc.fillOval (0, 0, width, height);
> gc.dispose ();
> return image;
> }
>
>
> "Yves Harms" <user@domain.invalid> wrote in message
> news:clalqg$nvm$1@eclipse.org...
>
>>Hi,
>>when inserting images into a table all images will be resized to one size.
>>If the images have different aspect ratios they will be streched.
>>How can i prevent this stretching ?
>>
>>Yves Harms
>
>
>


--------------040409030804030907000905
Content-Type: image/jpeg;
name="winxp.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="winxp.jpg"

/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDACQZGyAbFyQgHiApJyQrNls7NjIy Nm9PVEJbhHSK
iIF0f32Ro9GxkZrFnX1/tve4xdje6uzqja////7j/9Hl6uH/2wBDAScpKTYw Nms7O2vhln+W
4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh 4eHh4eH/wAAR
CAC8Ae0DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcI CQoL/8QAtRAA
AgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS 0fAkM2JyggkK
FhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1 dnd4eXqDhIWG
h4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW 19jZ2uHi4+Tl
5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcI CQoL/8QAtREA
AgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMz UvAVYnLRChYk
NOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0 dXZ3eHl6goOE
hYaHiImKkpOUlZaXmJmaoqOkp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uZVzGuMnHa
n+dF/wA9E/76FLbDKL/1zX+VT4HoKdhFfzov+eif99Cjzov+eif99CrGB6Cj A9BRYCv50X/P
RP8AvoUedF/z0T/voVYwPQUYHoKLAV/Oi/56J/30KPOi/wCeif8AfQqxgego wPQUWAr+dF/z
0T/voUedF/z0T/voVYwPQUYHoKLAVXmiKN+8Tp/eFOM0WT+9T/voVYwPQUgA wOKLAQedF/z0
T/voUedF/wA9E/76FWMD0FGB6CiwFfzov+eif99Cjzov+eif99CrGB6CjA9B RYCv50X/AD0T
/voUedF/z0T/AL6FWMD0FGB6CiwFfzov+eif99Cjzov+eif99CrGB6CjA9BR YCv50X/PRP8A
voUjTRcfvE6j+IetWcD0FIQMHiiwEHnRf89E/wC+hR50X/PRP++hVjA9BRge gosBX86L/non
/fQo86L/AJ6J/wB9CrGB6CjA9BRYCv50X/PRP++hR50X/PRP++hVjA9BRgeg osBX86L/AJ6J
/wB9Cjzov+eif99CrGB6CjA9BRYCv50X/PRP++hR50X/AD0T/voVYwPQUYHo KLAVjNFuX94n
X+8PQ0vnRf8APRP++hU5A9KXA9BRYCv50X/PRP8AvoUedF/z0T/voVYwPQUY HoKLAV/Oi/56
J/30KPOi/wCeif8AfQqxgegowPQUWAr+dF/z0T/voUedF/z0T/voVYwPQUYH oKLAV/Oi/wCe
if8AfQo86L/non/fQqxgegowPQUWAr+dF/z0T/voUedF/wA9E/76FWMD0FGB 6CiwFfzov+ei
f99Cjzov+eif99CrGB6CjA9BRYCv50X/AD0T/voUedF/z0T/AL6FWMD0FGB6 CiwFfzov+eif
99Cjzov+eif99CrGB6CjA9BRYCv50X/PRP8AvoUedF/z0T/voVYwPQUYHoKL AV/Oi/56J/30
KPOi/wCeif8AfQqxgegowPQUWAr+dF/z0T/voUedF/z0T/voVYwPQUYHoKLA V/Oi/wCeif8A
fQo86L/non/fQqxgegowPQUWAr+dF/z0T/voUedF/wA9E/76FWMD0FGB6Ciw Ffzov+eif99C
nI6vnawbHoc1NgegprDGKLARW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igAooooAKB0FFA6CgAPSm06j AoAbUEkT7SEK
eoDLmrOBRgUAZZFyc4icH1UAfrQIrsjHzgf7cn/6608CjAoAgt4vKjwfvHk8 1YHQUm0UtABQ
ehooPQ0AFB6UUUANoPIxTsCjAoAqyxyBPkKHb0BXnH1qri5IIEci/wC7ha1M CkwKAM0Q3TDB
yB/tyZ/xq7FGIowg7e9S4FG0UALRRRQAHpRQelFABRRRQAUUUUAFFFFABRRR QAUUUUAFFFFA
BRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAU1+1Opr9qAIrX7i/8AXNf5 VPUFsPkX/rmv
8qnx9fzoAKKMfX86MfX86ACijH1/OjH1/OgAoox9fzox9fzoAKKMfX86MfX8 6ACgdBRj6/nS
AcD/ABoAWijH1/OjH1/OgAoox9fzox9fzoAKKMfX86MfX86ACijH1/OjH1/O gAoPQ0Y+v50h
HB/xoAWijH1/OjH1/OgAoox9fzox9fzoAKKMfX86MfX86ACijH1/OjH1/OgA oox9fzox9fzo
AD0opCP85pcfX86ACijH1/OjH1/OgAoox9fzox9fzoAKKMfX86MfX86ACijH 1/OjH1/OgAoo
x9fzox9fzoAKKMfX86MfX86ACijH1/OjH1/OgAoox9fzox9fzoAKKMfX86Mf X86ACijH1/Oj
H1/OgAoox9fzox9fzoAKKMfX86MfX86ACijH1/OjH1/OgApr9qdj6/nTWHSg D//Z
--------------040409030804030907000905
Content-Type: image/jpeg;
name="mac.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="mac.jpg"

/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDACQZGyAbFyQgHiApJyQrNls7NjIy Nm9PVEJbhHSK
iIF0f32Ro9GxkZrFnX1/tve4xdje6uzqja////7j/9Hl6uH/2wBDAScpKTYw Nms7O2vhln+W
4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh 4eHh4eH/wAAR
CACoAjwDASIAAhEBAxEB/8QAHwAAAQUBAQE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yFLnj/USfkP8AGruB6UYHpRzsORFHnP8AqJPy FLnj/USfkP8A
GruB6UYHpRzsORFHnP8AqJPyFLnj/USfkP8AGruB6UYHpRzsORFHnP8AqJPy FLnj/USfkP8A
GruB6UYHpRzsORFHnP8AqJPyFLnj/USfkP8AGruB6UYHpRzsORFHnP8AqJPy FLnj/USfkP8A
GruB6UYHpRzsORFHnP8AqJPyFLnj/USfkP8AGruB6UYHpRzsORFHnP8AqJPy FLnj/USfkP8A
GruB6UYHpRzsORFHnP8AqJPyFLnj/USfkP8AGruB6UYHpRzsORFHnP8AqJPy FLnj/USfkP8A
GruB6UYHpRzsORFHnP8AqJPyFLnj/USfkP8AGruB6UYHpRzsORFHnP8AqJPy FLnj/USfkP8A
GruB6UYHpRzsORFHnP8AqJPyFLnj/USfkP8AGruB6UYHpRzsORFHnP8AqJPy FLnj/USfkP8A
GruB6UYHpRzsORFHnP8AqJPyFLnj/USfkP8AGruB6UYHpRzsORFHnP8AqJPy FLnj/USfkP8A
GruB6UYHpRzsORFHnP8AqJPyFLnj/USfkP8AGruB6UYHpRzsORFHnP8AqJPy FLnj/USfkP8A
GruB6UYHpRzsORFHnP8AqJPyFLnj/USfkP8AGruB6UYHpRzsORFHnP8AqJPy FLnj/USfkP8A
GruB6UYHpRzsORFHnP8AqJPyFLnj/USfkP8AGruB6UYHpRzsORGc8bycLCy+ 7Veto1hhVPTr
T8D0owPShyb3GopDty0blpuB6UYHpUjGyHI4HNESKiYJyScmnYHpRgelADFg hSYyqAHIwcd6
eAoLc9T/AEowPSjA9KAGQwQwLtjUD37mpEwM896TA9KMD0oAdkeopnWQkdMU uB6UfnQA1/uH
rTbf/j3i6/cH8qdJ9w9abb/8e8XX7g/lT6CHmRT3pN6+pooquVE8wb19TRvX 1NFFHKg5g3r6
mjevqaKKOVBzBvX1NG9fU0UUcqDmDevqaN6+pooo5UHMG9fU0b19TRRRyoOY N6+po3r6miij
lQcwb19TRvX1NFFHKg5g3r6mjevqaKKOVBzBvX1NG9fU0UUcqDmDevqaN6+p ooo5UHMG9fU0
b19TRRRyoOYN6+po3r6miijlQcwb19TRvX1NFFHKg5g3r6mjevqaKKOVBzBv X1NG9fU0UUcq
DmDevqaN6+pooo5UHMG9fU0b19TRRRyoOYN6+po3r6miijlQcwb19TRvX1NF FHKg5g3r6mje
vqaKKOVBzBvX1NG9fU0UUcqDmDevqaN6+pooo5UHMG9fU0b19TRRRyoOYN6+ po3r6miijlQc
wb19TRvX1NFFHKg5g3r6mjevqaKKOVBzBvX1NG9fU0UUcqDmDevqaN6+pooo 5UHMG9fU0b19
TRRRyoOYN6+po3r6miijlQcwb19TRvX1NFFHKg5g3r6mjevqaKKOVBzBvX1N G9fU0UUcqDmD
evqaN6+pooo5UHMI7qVIBpLf/j3i6/cH8qKKUlYpO5//2Q==
--------------040409030804030907000905--
Re: how to prevent stretching of images in swt table [message #445095 is a reply to message #445059] Mon, 25 October 2004 20:03 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Oops ... enter a bug report. Thanks.

"Yves Harms" <user@domain.invalid> wrote in message
news:clj0gc$5nn$1@eclipse.org...
> Thanks for the example, it works great with Winxp.
> Under Mac OS X however, the output is completly unuseable
> (see Screenshots: winXp and Mac).
> Is this a general bug ?
>
> Yves
>
>
>
> Veronika Irvine wrote:
> > Images in the table are always the same size as the first image placed
in
> > the table. The operating system performs the scaling.. To manage the
> > stretching of the images to maintain the origianl proportion, you need
to
> > scale the image yourself before placing it in the table. See the
example
> > below:
> >
> > public static void main (String [] args) {
> > Display display = new Display ();
> > final Image image1 = createImage (display, 20, 30);
> > final Image image2 = createImage (display, 16, 16);
> > final Image image3 = createImage (display, 300, 100);
> > final Image adjustedImage1 = scaleTo16x16 (image1, display);
> > final Image adjustedImage2 = scaleTo16x16 (image2, display);
> > final Image adjustedImage3 = scaleTo16x16 (image3, display);
> > Shell shell = new Shell (display);
> > shell.setLayout (new FillLayout ());
> > Table table = new Table (shell, SWT.BORDER);
> > for (int i = 0; i < 10; i++) {
> > TableItem item = new TableItem (table, SWT.NONE);
> > item.setText ("item " + i);
> > if (i % 3 == 0) {
> > item.setImage (adjustedImage1);
> > } else if (i % 3 == 1) {
> > item.setImage (adjustedImage2);
> > } else {
> > item.setImage (adjustedImage3);
> > }
> > }
> > Canvas canvas = new Canvas (shell, SWT.NONE);
> > canvas.addPaintListener (new PaintListener () {
> > public void paintControl (PaintEvent e) {
> > int x = 0, y = 0;
> > e.gc.drawImage (image1, x, y);
> > e.gc.drawImage (adjustedImage1, x, y + 100);
> > x += image1.getBounds ().width + 20;
> > e.gc.drawImage (image2, x, y);
> > e.gc.drawImage (adjustedImage2, x, y + 100);
> > x += image2.getBounds ().width + 20;
> > e.gc.drawImage (image3, x, y);
> > e.gc.drawImage (adjustedImage3, x, y + 100);
> > }
> > });
> > shell.open ();
> > while (!shell.isDisposed ()) {
> > if (!display.readAndDispatch ()) display.sleep ();
> > }
> > image1.dispose ();
> > image2.dispose ();
> > image3.dispose ();
> > adjustedImage1.dispose ();
> > adjustedImage2.dispose ();
> > adjustedImage3.dispose ();
> > display.dispose ();
> > }
> >
> > static Image scaleTo16x16 (Image image, Display display) {
> > Image result = new Image (display, 16, 16);
> > Rectangle bounds = image.getBounds ();
> > double scaleX = bounds.width <= 16 ? 1.0 : 16.0 / bounds.width;
> > double scaleY = bounds.height <= 16 ? 1.0 : 16.0 /
bounds.height;
> > double scale = Math.min (scaleX, scaleY);
> > int width = (int) (scale * bounds.width);
> > int height = (int) (scale * bounds.height);
> > GC gc = new GC (result);
> > gc.drawImage (image, 0, 0, bounds.width, bounds.height, (16 -
> > width) / 2, (16 - height) / 2, width, height);
> > gc.dispose ();
> > return result;
> > }
> >
> > static Image createImage (Display display, int width, int height) {
> > Image image = new Image (display, width, height);
> > GC gc = new GC (image);
> > gc.setBackground (display.getSystemColor (SWT.COLOR_RED));
> > gc.fillOval (0, 0, width, height);
> > gc.dispose ();
> > return image;
> > }
> >
> >
> > "Yves Harms" <user@domain.invalid> wrote in message
> > news:clalqg$nvm$1@eclipse.org...
> >
> >>Hi,
> >>when inserting images into a table all images will be resized to one
size.
> >>If the images have different aspect ratios they will be streched.
> >>How can i prevent this stretching ?
> >>
> >>Yves Harms
> >
> >
> >
>
>


------------------------------------------------------------ ----------------
----






------------------------------------------------------------ ----------------
----
Re: how to prevent stretching of images in swt table [message #445098 is a reply to message #445095] Tue, 26 October 2004 07:29 Go to previous message
Yves Harms is currently offline Yves HarmsFriend
Messages: 80
Registered: July 2009
Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=76996


Steve Northover wrote:
> Oops ... enter a bug report. Thanks.
>
> "Yves Harms" <user@domain.invalid> wrote in message
> news:clj0gc$5nn$1@eclipse.org...
>
>>Thanks for the example, it works great with Winxp.
>>Under Mac OS X however, the output is completly unuseable
>>(see Screenshots: winXp and Mac).
>>Is this a general bug ?
>>
>>Yves
>>
>>
>>
>>Veronika Irvine wrote:
>>
>>>Images in the table are always the same size as the first image placed
>
> in
>
>>>the table. The operating system performs the scaling.. To manage the
>>>stretching of the images to maintain the origianl proportion, you need
>
> to
>
>>>scale the image yourself before placing it in the table. See the
>
> example
>
>>>below:
>>>
>>>public static void main (String [] args) {
>>> Display display = new Display ();
>>> final Image image1 = createImage (display, 20, 30);
>>> final Image image2 = createImage (display, 16, 16);
>>> final Image image3 = createImage (display, 300, 100);
>>> final Image adjustedImage1 = scaleTo16x16 (image1, display);
>>> final Image adjustedImage2 = scaleTo16x16 (image2, display);
>>> final Image adjustedImage3 = scaleTo16x16 (image3, display);
>>> Shell shell = new Shell (display);
>>> shell.setLayout (new FillLayout ());
>>> Table table = new Table (shell, SWT.BORDER);
>>> for (int i = 0; i < 10; i++) {
>>> TableItem item = new TableItem (table, SWT.NONE);
>>> item.setText ("item " + i);
>>> if (i % 3 == 0) {
>>> item.setImage (adjustedImage1);
>>> } else if (i % 3 == 1) {
>>> item.setImage (adjustedImage2);
>>> } else {
>>> item.setImage (adjustedImage3);
>>> }
>>> }
>>> Canvas canvas = new Canvas (shell, SWT.NONE);
>>> canvas.addPaintListener (new PaintListener () {
>>> public void paintControl (PaintEvent e) {
>>> int x = 0, y = 0;
>>> e.gc.drawImage (image1, x, y);
>>> e.gc.drawImage (adjustedImage1, x, y + 100);
>>> x += image1.getBounds ().width + 20;
>>> e.gc.drawImage (image2, x, y);
>>> e.gc.drawImage (adjustedImage2, x, y + 100);
>>> x += image2.getBounds ().width + 20;
>>> e.gc.drawImage (image3, x, y);
>>> e.gc.drawImage (adjustedImage3, x, y + 100);
>>> }
>>> });
>>> shell.open ();
>>> while (!shell.isDisposed ()) {
>>> if (!display.readAndDispatch ()) display.sleep ();
>>> }
>>> image1.dispose ();
>>> image2.dispose ();
>>> image3.dispose ();
>>> adjustedImage1.dispose ();
>>> adjustedImage2.dispose ();
>>> adjustedImage3.dispose ();
>>> display.dispose ();
>>>}
>>>
>>>static Image scaleTo16x16 (Image image, Display display) {
>>> Image result = new Image (display, 16, 16);
>>> Rectangle bounds = image.getBounds ();
>>> double scaleX = bounds.width <= 16 ? 1.0 : 16.0 / bounds.width;
>>> double scaleY = bounds.height <= 16 ? 1.0 : 16.0 /
>
> bounds.height;
>
>>> double scale = Math.min (scaleX, scaleY);
>>> int width = (int) (scale * bounds.width);
>>> int height = (int) (scale * bounds.height);
>>> GC gc = new GC (result);
>>> gc.drawImage (image, 0, 0, bounds.width, bounds.height, (16 -
>>>width) / 2, (16 - height) / 2, width, height);
>>> gc.dispose ();
>>> return result;
>>>}
>>>
>>>static Image createImage (Display display, int width, int height) {
>>> Image image = new Image (display, width, height);
>>> GC gc = new GC (image);
>>> gc.setBackground (display.getSystemColor (SWT.COLOR_RED));
>>> gc.fillOval (0, 0, width, height);
>>> gc.dispose ();
>>> return image;
>>>}
>>>
>>>
>>>"Yves Harms" <user@domain.invalid> wrote in message
>>>news:clalqg$nvm$1@eclipse.org...
>>>
>>>
>>>>Hi,
>>>>when inserting images into a table all images will be resized to one
>
> size.
>
>>>>If the images have different aspect ratios they will be streched.
>>>>How can i prevent this stretching ?
>>>>
>>>>Yves Harms
>>>
>>>
>>>
>>
>
>
> ------------------------------------------------------------ ----------------
> ----
>
>
>
>
>
>
> ------------------------------------------------------------ ----------------
> ----
>
>
>
>
>
Previous Topic:password style cells in table
Next Topic:Mac OSX SWT/AWT interoperating
Goto Forum:
  


Current Time: Wed Oct 21 11:37:52 GMT 2020

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

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

Back to the top