Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » diamond polygon
diamond polygon [message #154694] Wed, 10 October 2007 14:51 Go to next message
Shannon Wei is currently offline Shannon WeiFriend
Messages: 10
Registered: July 2009
Junior Member
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 20:19 Go to previous messageGo to next message
Cherie Revells is currently offline Cherie RevellsFriend
Messages: 299
Registered: July 2009
Senior Member
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 21: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] Sat, 27 October 2007 01:59 Go to previous message
Shannon Wei is currently offline Shannon WeiFriend
Messages: 10
Registered: July 2009
Junior Member
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: Sat Sep 28 00:33:01 GMT 2024

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

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

Back to the top