Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Efficiently drawing graphics
Efficiently drawing graphics [message #201291] Mon, 11 August 2008 08:14 Go to next message
Eclipse UserFriend
Originally posted by: tobk42.gmx.de

Hello,

can you tell me what's the most efficient way of drawing graphics in
GMF? I'm talking about node symbols, e.g. Event Markers in BPMN. Should
I use the paintFigure method, using the draw...-Methods of the
Graphics object, or the createContents method generated by GMF, creating
a number of nested draw2D-Objects? Intuitively, I think the paintFigure
method is more "low-level" and as such more efficient. Am I right?

Regards,
Tobias
Re: Efficiently drawing graphics [message #201355 is a reply to message #201291] Mon, 11 August 2008 09:14 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello tobias,

> paintFigure method is more "low-level" and as such more efficient. Am
> I right?
Yes, you are right. As any "low-level" method this way to draw shapes in
addition is more complicated in case of drawing some complex shapes with
complex layouts inside, so you have to decide either to use "paint" method
for this rather simple figure or to compose whole figure using draw2d primitives.
Concerning performance - I doubt you'll see the difference.

-----------------
Alex Shatalin
Previous Topic:parent-child relation in GMF
Next Topic:Parameterization of raw types in generated diagram code?
Goto Forum:
  


Current Time: Fri Apr 26 06:01:07 GMT 2024

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

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

Back to the top