Re: Drawing shaded lines and shapes
From: Malek (kemmou_at_arrabeta.com)
Date: 02/23/04
- Next message: fbhcah: "RE: Datagrid crashes program, when input data is too large"
- Previous message: Malek: "Re: Drawing shaded lines and shapes"
- In reply to: John Baro: "Re: Drawing shaded lines and shapes"
- Next in thread: John Baro: "Re: Drawing shaded lines and shapes"
- Reply: John Baro: "Re: Drawing shaded lines and shapes"
- Reply: Malek: "Re: Drawing shaded lines and shapes"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 23 Feb 2004 04:23:22 -0000
trick it ... use rectangle for the line ...
"John Baro" <johnb@NOSPAMmesware.com.au> wrote in message
news:J3f_b.72018$Wa.3082@news-server.bigpond.net.au...
> Thanks for the reply Malek
>
> I forgot to mention that it has to be shaded blue red blue along the axis
of
> the line.
> i.e. if the line was flat then red along the top to blue in the middle and
> back to red again at the bottom but again on a 45 angle.
>
> Cheers
> JB
>
> "Malek" <kemmou@arrabeta.com> wrote in message
> news:%23PsCGDc%23DHA.2644@TK2MSFTNGP11.phx.gbl...
> > how about something like :
> >
> > protected override void OnPaint(PaintEventArgs e)
> >
> > {
> >
> > base.OnPaint (e);
> >
> > Brush b = new LinearGradientBrush(new Point(10,10),new Point(100,100),
> > Color.Gray, Color.Red);
> >
> > Pen p = new Pen(b,2);
> >
> > e.Graphics.DrawLine(p,new Point(10,10),new Point(100,100));
> >
> > Brush b1 = new LinearGradientBrush(new Point(100,100),new
Point(200,200),
> > Color.Red, Color.Gray);
> >
> > Pen p1 = new Pen(b1,2);
> >
> > e.Graphics.DrawLine(p1,new Point(100,100),new Point(200,200));
> >
> > }
> >
> >
> >
> > "John Baro" <johnb@NOSPAMmesware.com.au> wrote in message
> > news:3ze_b.71978$Wa.44619@news-server.bigpond.net.au...
> > > I wish to draw a line say 10px wide at a 45 degree angle (or any other
> > > angle) and have it shaded say from gray to red to gray again (or any
> other
> > > color).
> > >
> > > I can get the line by using a GraphicsPath object but cannot work out
> the
> > > shading part.
> > >
> > > Is this also possible for say a circle with an outside line width of
> 10px
> > to
> > > be shaded from red to gray from the inside out around the
circumference
> of
> > > the circle.
> > >
> > > TIA
> > > JB
> > >
> > >
> >
> >
>
>
- Next message: fbhcah: "RE: Datagrid crashes program, when input data is too large"
- Previous message: Malek: "Re: Drawing shaded lines and shapes"
- In reply to: John Baro: "Re: Drawing shaded lines and shapes"
- Next in thread: John Baro: "Re: Drawing shaded lines and shapes"
- Reply: John Baro: "Re: Drawing shaded lines and shapes"
- Reply: Malek: "Re: Drawing shaded lines and shapes"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|