Skip to main content

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

Hello Lucas,

If you could post this question to the newsgroup, I'll be happy to answer
it there.

Thanks,

Steve.

Thursday, October 20, 2005 11:45 AM
To: "GMF Project developer discussions." <gmf-dev@xxxxxxxxxxx>
cc:
From: lucas <lucas.bigeardel@xxxxxxxxx>
Subject: [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
_______________________________________________
gmf-dev mailing list
gmf-dev@xxxxxxxxxxx
 https://dev.eclipse.org/mailman/listinfo/gmf-dev



Back to the top