[Draw2D] change icon of Label depending on Zoom [message #754737] |
Fri, 04 November 2011 02:27  |
Eclipse User |
|
|
|
Hello,
i wonder if it makes sense to change the image used by labels depending on zoom level.
i ask this as i have pretty large images in use:
1x ~5500x4000px
100-1000 of 128x128px
so when you zoom out i would use low res images of 64x64, 32x32 otherwise the high res 128x128
how can i achieve this, without a lot of struggle?
note: i already looked at the zoom example and noticed that icons get blocky if you zoom in a lot, while text keeps sharp
|
|
|
|
Re: [Draw2D] change icon of Label depending on Zoom [message #755646 is a reply to message #755567] |
Wed, 09 November 2011 03:26  |
Eclipse User |
|
|
|
Alexander y wrote on Tue, 08 November 2011 14:55Well, I haven't tried yet, but I suppose the easiest approach would be to query the ZoomManager (obtainable from ScalabeRootEditPart) for the current zoom level from within your GraphicalEditPart#refreshVisuals() implementation and to update your label base on this.
i'm confused now.
i implemented the zoom stuff with a SWT scroll component
i further have a LWS, the IFigure=content and a ZoomContainer
for me the zoom level is easily available, so thats no problem
but where do i get that graphicaleditpart?
|
|
|
Powered by
FUDForum. Page generated in 0.05342 seconds