FillPie or draw Triangle

  • Thread starter Thread starter Arda Coskun
  • Start date Start date
A

Arda Coskun

I couldn't find an equvalent function for FillPie() or drawing a triangle in
Compact Framework, what could I use instead of them?
 
I've got a DrawArc implementation. A triangle should be cake - simply use
the three points and call FillPolygon. A pie slice is a combination of the
arc for one edge and the centerpotn as an outlier but is filled the same
way.

http://tinyurl.com/48qll

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
---
Principal Partner
OpenNETCF Consulting
www.OpenNETCF.com



Paul G. Tobey said:
Draw triangle should be pretty obvious (draw three lines). Filling a pie
slice is a more difficult problem. Have you taken a look on Google for
drawing examples? It seems to me that Chris Tacke has posted some code that
might do this before.

http://groups.google.com/groups?hl=...soft.public.dotnet.framework.compactframework

Paul T.

Arda Coskun said:
I couldn't find an equvalent function for FillPie() or drawing a
triangle
 
Oh, yeah got the idea.

Thank you both Chris and Paul.

Chris Tacke said:
I've got a DrawArc implementation. A triangle should be cake - simply use
the three points and call FillPolygon. A pie slice is a combination of the
arc for one edge and the centerpotn as an outlier but is filled the same
way.

http://tinyurl.com/48qll

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
---
Principal Partner
OpenNETCF Consulting
www.OpenNETCF.com



Paul G. Tobey said:
Draw triangle should be pretty obvious (draw three lines). Filling a pie
slice is a more difficult problem. Have you taken a look on Google for
drawing examples? It seems to me that Chris Tacke has posted some code that
might do this before.
http://groups.google.com/groups?hl=...soft.public.dotnet.framework.compactframework
 
Point point1 = new Point(Position.X + 4, Position.Y + 4);

Point point2 = new Point(Position.X + 8, Position.Y + 0);

Point point3 = new Point(Position.X + 8, Position.Y + 8);

Point[] curvePoints = { point1, point2, point3 };

g.FillEllipse(pacBrush,Position.X, Position.Y, Size, Size);

g.FillPolygon(bgBrush, curvePoints);



pacBrush is yellow and bgBrush is black. Position is a point, assume that it
is (8, 8).

I run this code but rectangle doesn't cover the yellow filled circle. I want
to make a pacman effect.

Any help would be appriciated.
 
Back
Top