Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » diamond polygon
diamond polygon [message #154694] Wed, 10 October 2007 10:51 Go to next message
Eclipse UserFriend
Hi,

We have a diamond polygon in a gef based application. The diamond polygon
subclasses from org.eclipse.draw2d.Polygon. The outline of the diamond
borders is rough. I noticed that DiamondFigure of the logicdiagram in gmf
looks pretty smooth. Please see the attachment. I'd like to know if there is
a quick way to smooth the polygon border without depending on the whole gmf
plugins.


Help is greatly appreciated.

Shannon Wei


Re: diamond polygon [message #157400 is a reply to message #154694] Fri, 26 October 2007 16:19 Go to previous messageGo to next message
Eclipse UserFriend
Shannon,

We use advanced graphics mode in GMF. You can try turning on advanced
graphics / anti-alias in your Graphics object.

Graphics.setAntialias(SWT.ON);

This is only supported on some platforms though and can cause problems
if turned on on platforms that don't support it.

Regards,
Cherie

Shannon Wei wrote:
> Hi,
>
> We have a diamond polygon in a gef based application. The diamond polygon
> subclasses from org.eclipse.draw2d.Polygon. The outline of the diamond
> borders is rough. I noticed that DiamondFigure of the logicdiagram in gmf
> looks pretty smooth. Please see the attachment. I'd like to know if there is
> a quick way to smooth the polygon border without depending on the whole gmf
> plugins.
>
>
> Help is greatly appreciated.
>
> Shannon Wei
>
>
>
Re: diamond polygon [message #157416 is a reply to message #157400] Fri, 26 October 2007 17:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: trommas.yahoo.com

Cherie Revells wrote:
> We use advanced graphics mode in GMF. You can try turning on advanced
> graphics / anti-alias in your Graphics object.
>
> Graphics.setAntialias(SWT.ON);

That is actually pretty cool!

Can one of you refer me to a resource, or give me an example, about
creating diamonds? (I've tried some, but they have "invisible squares"
around them).

I'd also like to make some triangles later :)


Regards,

Tomas
Re: diamond polygon [message #157422 is a reply to message #157400] Fri, 26 October 2007 21:59 Go to previous message
Eclipse UserFriend
Thanks for the response. Graphics.setAntialias(SWT.ON) does work very well
to smooth the diamond polygon. I have a further question which I posted in
gef news group early on today. Is there any performance impact due to to
this setting?

To create diamond polygon, subclass from org.eclipse.draw2d.Polygon and
create diamond points.

Shannon

"Cherie Revells" <crevells@ca.ibm.com> wrote in message
news:47224BD5.6050109@ca.ibm.com...
> Shannon,
>
> We use advanced graphics mode in GMF. You can try turning on advanced
> graphics / anti-alias in your Graphics object.
>
> Graphics.setAntialias(SWT.ON);
>
> This is only supported on some platforms though and can cause problems if
> turned on on platforms that don't support it.
>
> Regards,
> Cherie
>
> Shannon Wei wrote:
>> Hi,
>>
>> We have a diamond polygon in a gef based application. The diamond polygon
>> subclasses from org.eclipse.draw2d.Polygon. The outline of the diamond
>> borders is rough. I noticed that DiamondFigure of the logicdiagram in gmf
>> looks pretty smooth. Please see the attachment. I'd like to know if there
>> is a quick way to smooth the polygon border without depending on the
>> whole gmf plugins.
>>
>>
>> Help is greatly appreciated.
>>
>> Shannon Wei
Previous Topic:two ways to create a link programmatically. Whats the difference?
Next Topic:Avoiding Duplicate EditParts?
Goto Forum:
  


Current Time: Wed Apr 16 07:58:52 EDT 2025

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

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

Back to the top