Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gmf-dev] SVG rendering question (RenderInfo bug ?)

Hi,

I run a GMF editor in RCP application. (Windows XP SP2/Sun VM 1.5.0)

I succeded in render SVG and draw it in a NodeFigure subclass.

I now try to resize my SVG image as my node resize;

I get an Exception  : "Failed to execute runnable
(java.lang.OutOfMemoryError: Java heap space)" with this code :

###############################
     protected void paintFigure(Graphics g)
             Rectangle r = getBounds().getCopy();
             RenderedImage svgImage  = RenderedImageFactory.getInstance(svgURL);
             RenderInfo info = svgImage.getRenderInfo();

             info.setValues(r.width, r.height, null, null, true, false);

             g.drawImage(svgImage.getNewRenderedImage(info).getSWTImage(),
r.x, r.y);
     }
##############################

It seems to be a problem with : info.setValues(r.width, r.height,
null, null, true, false);

Is it a bug ? Maybe I misunderstood RenderInfo use ...

If someone knows.

cheers,

--
- Lucas


Back to the top