Skip to main content



      Home
Home » Eclipse Projects » GEF » Ellipse with Gradient
Ellipse with Gradient [message #208164] Fri, 27 January 2006 08:11
Eclipse UserFriend
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: Sat Jul 19 06:04:06 EDT 2025

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

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

Back to the top