Re: GraphicsPath help please
From: Bob Powell [MVP] (bob_at__spamkiller_bobpowell.net)
Date: 04/02/04
- Next message: Norvin Laudon: "Re: image Clone problem when using LockBits"
- Previous message: Mark Finkel: "GraphicsPath help please"
- In reply to: Mark Finkel: "GraphicsPath help please"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 2 Apr 2004 23:30:38 +0200
The first one needs to be a "start" type. Perhaps you should use Bezier3
instead of Bezier too.
This little bit of code...
GraphicsPath gp=new GraphicsPath();
gp.AddBezier(24,21,99,34,99,-50,200,21);
foreach(byte b in gp.PathTypes)
System.Diagnostics.Trace.WriteLine(Enum.GetName(typeof(System.Drawing.Drawin
g2D.PathPointType),(int)b));
reveals..
Start
Bezier3
Bezier3
Bezier3
I assume that you expect the fourth and fifth points to carry on the
curve....
-- Bob Powell [MVP] Visual C#, System.Drawing All you ever wanted to know about ListView custom drawing is in Well Formed. http://www.bobpowell.net/currentissue.htm Answer those GDI+ questions with the GDI+ FAQ http://www.bobpowell.net/gdiplus_faq.htm Read my Blog at http://bobpowelldotnet.blogspot.com "Mark Finkel" <anonymous@discussions.microsoft.com> wrote in message news:7DD30AD3-D21C-4975-9699-96446F0E95D8@microsoft.com... > I can not fifure out how to specify the byte array of PathPointTypes for a graphicsPath. Please help. > > Dim point10 As New Point(40, di.Height - 45) > Dim point20 As New Point(100, di.Height - 45) > Dim point30 As New Point(45, di.Height - 40) > Dim point40 As New Point(95, di.Height - 40) > Dim point50 As New Point(70, di.Height - 20) > Dim pointz As Point() = {point10, point20, point30, point40, point50} > Dim tp(5) As Byte > tp(0) = PathPointType.Bezier > tp(1) = PathPointType.Bezier > tp(2) = PathPointType.Bezier > tp(3) = PathPointType.Bezier > tp(4) = PathPointType.Bezier > Dim gp As New GraphicsPath(pointz, tp) > Dim reg As New Region(gp) > ds.FillRegion(redBrush, reg) >
- Next message: Norvin Laudon: "Re: image Clone problem when using LockBits"
- Previous message: Mark Finkel: "GraphicsPath help please"
- In reply to: Mark Finkel: "GraphicsPath help please"
- Messages sorted by: [ date ] [ thread ]