Custom Shape - black ellipse inside a white one ??? [message #198823] |
Thu, 24 July 2008 15:19 |
Eclipse User |
|
|
|
Originally posted by: hasan.abdel.rwth-aachen.de
Hi,
I am trying to create a custom shape ( Black ellipse inside White ellipse ) using GMF Graphical Definition editor. My current implementation is the following:
<descriptors
name="EndFigure">
<actualFigure
xsi:type="gmfgraph:Ellipse"
name="EndFigure"
fill="false"
lineWidth="3">
<layout
xsi:type="gmfgraph:BorderLayout"/>
<foregroundColor
xsi:type="gmfgraph:ConstantColor"
value="black"/>
<minimumSize
dx="20"
dy="20"/>
<preferredSize
dx="40"
dy="40"/>
<border
xsi:type="gmfgraph:MarginBorder">
<insets
top="6"
left="6"
bottom="6"
right="6"/>
</border>
<location
x="40"
y="40"/>
<size
x="40"
y="40"/>
<children
xsi:type="gmfgraph:Ellipse"
name="EndInner">
<foregroundColor
xsi:type="gmfgraph:ConstantColor"
value="gray"/>
<backgroundColor
xsi:type="gmfgraph:ConstantColor"
value="gray"/>
<minimumSize
dx="10"
dy="10"/>
<preferredSize
dx="28"
dy="28"/>
<location/>
<size
x="28"
y="28"/>
</children>
</actualFigure>
</descriptors>
For strange reason, the inner white ellipse is not drawn. Any idea ?!!!
THanks in advance,
Hasan
|
|
|
|
Re: Custom Shape - black ellipse inside a white one ??? [message #198998 is a reply to message #198943] |
Fri, 25 July 2008 15:58 |
Eclipse User |
|
|
|
Originally posted by: hasan.abdel.rwth-aachen.de
Hi Alex,
Thanks a lot. Yes, it was the LayoutConstraint. Now it is working as expected, thanks again.
I am still new to GMF&Draw2D technologies.
Regards,
Hasan
Alex Shatalin wrote:
> Hello Hasan,
>
>> I am trying to create a custom shape ( Black ellipse inside White
>> ellipse ) using GMF Graphical Definition editor. My current
> Are you using WYSIWUG .gmfgraph editor?
>
>> <layout xsi:type="gmfgraph:BorderLayout"/>
> [skipped...]
>> <children xsi:type="gmfgraph:Ellipse" name="EndInner">
>> <foregroundColor xsi:type="gmfgraph:ConstantColor" value="gray"/>
>> <backgroundColor xsi:type="gmfgraph:ConstantColor" value="gray"/>
>> <minimumSize dx="10" dy="10"/>
>> <preferredSize dx="28" dy="28"/>
>> <location/>
>> <size x="28" y="28"/>
>> </children>
> Looks like there is no LayoutConstraint (LayoutData) specified for this
> figure, but you have to have BorderLayoutData instance associated with
> childFigure to layout it properly inside its parent.
>
> -----------------
> Alex Shatalin
|
|
|
Powered by
FUDForum. Page generated in 0.02496 seconds