Re: Drawing a circular gradient

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Frank Hileman (frankhil_at_no.spamming.prodigesoftware.com)
Date: 09/07/04


Date: Tue, 7 Sep 2004 15:33:52 -0700

There is no built-in way to do that in GDI+. The closest you can get is to
break your path into multiple segments (arcs work), and draw each with a
linear gradient, changing the start and end color a bit each time.

Regards,
Frank Hileman

check out VG.net: www.vgdotnet.com
Animated vector graphics system
Integrated Visual Studio .NET graphics editor

"abhishek ghuwalewala" <abhishekg.nospam@nospam.mail.com> wrote in message
news:u6C%23cMPlEHA.1152@TK2MSFTNGP11.phx.gbl...
> I want to draw a gradient, much like the gradient drawn by a linear
gradient
> brush, along a circular path. I have experimented with the
> PathGradientBrush, but I don't think it does what I want. Basically, I
want
> to be able to specify 2 colors and have the gradient drawn like in the
> image.
>
> Any help would be appreciated.
>
> Thanks,
> Abhishek
>
>
>



Relevant Pages

  • Neon Lines
    ... things with the .net drawing functions, but this one has me stumped. ... I want to draw neon lines. ... Now I can draw a straight line with a gradient ... To achieve a basic neon effect a gradient of dark-light-dark is used, ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Problem with Themes -- drawing a rebar
    ... Passing this solution along after dialoging with Mr. Wheatley offline. ... Rebar, they'll paint mostly ... So, to get the actual Rebars background gradient to draw, you'd do ... Now just be careful because the gradient you draw in themes like Luna ...
    (microsoft.public.win32.programmer.ui)
  • Re: How to draw a rectangle with gradient?
    ... I am using PIL to draw a rectangle filled with color blue. ... Is there anyway I could set the fill pattern so that the drawn ... I don't think there is a built-in gradient function, ...
    (comp.lang.python)
  • Re: Applying color to Toolbars
    ... "Tonny" wrote in message ... > I'm trying to draw an gradient on a Toolbar. ... > GradientToolbar, which inherrits from Toolbar. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Applying color to Toolbars
    ... Now I'm able to draw a gradient "backcolor". ... > GradientToolbar, which inherrits from Toolbar. ... >> protected override void OnPaint ...
    (microsoft.public.dotnet.framework.drawing)