PC Review


Reply
Thread Tools Rate Thread

Drawing a line with a gradient fill?

 
 
Robinson
Guest
Posts: n/a
 
      28th Nov 2006
Haven't had much luck googling this one: I want to draw a line with a
gradient fill, that is a line connecting two shapes in a graphics program,
where each shape is a different colour (say, Red -> Blue). Now I suppose I
can draw a filled-polygon (rotating it to the correct position to avoid
awkward end-point issues), but I'm wondering if there is any easier way .

Thanks,


Robin


 
Reply With Quote
 
 
 
 
Chris Dunaway
Guest
Posts: n/a
 
      28th Nov 2006
Robinson wrote:
> Haven't had much luck googling this one: I want to draw a line with a
> gradient fill, that is a line connecting two shapes in a graphics program,
> where each shape is a different colour (say, Red -> Blue). Now I suppose I
> can draw a filled-polygon (rotating it to the correct position to avoid
> awkward end-point issues), but I'm wondering if there is any easier way .


Create a Pen using the constructor that takes a Brush as one of the
argument. Pass in a LinearGradientBrush for this argument.

 
Reply With Quote
 
 
 
 
Robinson
Guest
Posts: n/a
 
      28th Nov 2006
> Create a Pen using the constructor that takes a Brush as one of the
> argument. Pass in a LinearGradientBrush for this argument.


Thanks, that works nicely.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Drawing gradient border for rectangle patilmmilind@gmail.com Microsoft Dot NET Compact Framework 3 9th Oct 2007 09:27 AM
Drawing special text with gradient colors (Windows Forms VB.NET 1. =?Utf-8?B?UGhpbGlw?= Microsoft Dot NET Framework Forms 2 8th Feb 2007 09:38 PM
drawing a simple line without the drawing box =?Utf-8?B?TG9yaQ==?= Microsoft Word Document Management 1 21st Jan 2004 12:09 AM
Pattern Gradient (not color gradient) Ian Microsoft Dot NET Framework 0 10th Sep 2003 08:37 AM
find the gradient of a line on a chart Santiago Zawojski Microsoft Excel Misc 2 13th Aug 2003 11:14 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:28 AM.