Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Ellipse with Gradient
Ellipse with Gradient [message #208164] Fri, 27 January 2006 13:11
Roger Villars is currently offline Roger VillarsFriend
Messages: 57
Registered: July 2009
Member
Hi there!

I'm trying to create an elliptical figure filled with a gradient. The
solution I found uses a Path as clipping object like this.

Path path = new Path(null);
path.addArc(getBounds().x, getBounds().y, getBounds().width,
getBounds().height, 0, 360);
graphics.setClip(path);
Rectangle rect = new Rectangle(getBounds());
graphics.fillGradient(rect, true);

Unfortunately it seems that a Path is not scalable so zoom and overview
are not working. Are there any other approaches to solve this?

Thanks,
Roger
Previous Topic:tollEntry
Next Topic:DnD feedback icon
Goto Forum:
  


Current Time: Mon Jul 29 20:39:09 GMT 2024

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

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

Back to the top