Skip to main content



      Home
Home » Modeling » Graphiti » Filled attribute always true?
Filled attribute always true? [message #1461272] Tue, 04 November 2014 06:43 Go to next message
Eclipse UserFriend
Hello!

I encountered a problem regarding the filled attribute of a GraphicsAlgorithm.

For test purposes I tried to work with an unfilled rectangle. In the object tree of the Eclipse debugger the attribute filled is set to false. But when I try to readout the attribute using

boolean filled = ga.isSetFilled();


where ga is the GraphicsAlgorithm, filled is always set to true.

Is it a bug or am I just doing something wrong?
Re: Filled attribute always true? [message #1461391 is a reply to message #1461272] Tue, 04 November 2014 09:08 Go to previous messageGo to next message
Eclipse UserFriend
I have to correct myself. It was necessary to cast the GraphicsAlgorithm to a special one, before using.

Rectangle r = (Rectangle) ga;
boolean isFilled = r.getFilled();


So this works now.

But I have another question, similar to this. What should I do, if I want to detect whether a gradient is set for a specific GraphicsAlgorithm, e.g. a Rectangle. So I am missing something like...

Rectangle r = (Rectangle) ga;
boolean isGradient = r.getIsGradient();


... so that I could check whether a gradient is set and if so, I would work with the fore- and background to set the gradient for the new element.

[Updated on: Tue, 04 November 2014 09:16] by Moderator

Re: Filled attribute always true? [message #1463384 is a reply to message #1461391] Thu, 06 November 2014 09:08 Go to previous message
Eclipse UserFriend
John,

a gradient is defined using a so called RenderingStyle, so you need to check
the attribute renderingStyle. Have you seen this page in the docu that
describes how to define gradients? It might help to understand what needs to
be set.
http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.graphiti.doc%2Fresources%2Fdocu%2Fgfw%2Fcolor-schemas.htm&cp=27_1_8

Michael
Previous Topic:How can I combine nested feature calls in one command
Next Topic:DefaultMarkerBehavior woes
Goto Forum:
  


Current Time: Sat Jul 12 04:33:03 EDT 2025

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

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

Back to the top