C# Newbie: Filling custom shapes

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

Hi,

I'm playing about with custom controls. I've used DrawArc to draw part
of a circle, then DrawLine to connect the ends of the arc. I'm happy
with the results of this, but I would now like to fill it in with a
given color. How would I go about this? I can't seem to find anything
which will fill a user-defined shape like mine.

Many thanks for any help,
Steve.
 
I think there is a FillArc (or is it called FillPie?).
If you use that with the same coords as your DrawArc, and then use
DrawArc and DrawLines you can get a pic of the filled arc with a
border.
Do not use DrawArc and DrawLines if you don't want the border.

HTH,
F.O.R.
 
Olorin said:
I think there is a FillArc (or is it called FillPie?).
If you use that with the same coords as your DrawArc, and then use
DrawArc and DrawLines you can get a pic of the filled arc with a
border.
Do not use DrawArc and DrawLines if you don't want the border.

Hey thanks for the help, I had looked for FillArc but not FillPie.

That gives sort of what I was after, although the pie is literally
that...a pie. I wanted the segment part too to be filled, so that I end
up with a circle with one flat side. I guess I could simply use
FillRectangle now to do the missing section, but that just seems a bit
messy. Anyway many thanks again for your advice,

Steve
 
Back
Top