Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] about renderer, tools and SWT Image

Hi!

I think this question should probably direct to some eclipse mailing
list, but there is implementation in udig so if you just could give a
hint where to search.. =)

I have currently implementing my own renderer, now i would like to use
swt Image where first draw the image and then draw that to Graphics2D
which IRender interface offer.
Now what happend when i draw the swt Image to the awt Graphics, it has
white background, and i cant find a way to prevent this, i tried also
first to create swt Image in renderer with udig's AWTSWTImageutils:
final Image image = AWTSWTImageUtils.convertToSWTImage(getContext().getImage());
but in that case it doesnt show anything, i tried also save that image
to jpeg but it is totally black, the size is correct..

I think this is already done in udig because in tools we can add Draw
command (AbstractDrawCommand) where we have ViewportGraphics which
seems to be SWTViewportGraphics and it uses swt Image.. if i draw
using this one then there is no white background..

any hints?

The reason all this is that the SimpleFeatures and SimpleFeatureTypes
are almost impossible to draw my domain objects so i have made my own
class model, where every class contains it own way to draw itself, and
i want to use this same draw implementation in edit tools and render.

Thanks, Artsi


Back to the top