Hello;
Using PDFsharp GDI+ with VS2010. Not sure of the PDFsharp version but the Copyright is 2005-2009.
I'm trying to get a better handle on coordinates when drawing paths and lines. My first question is how are these numbers measured? That is, what are these doubles I'm putting into the following code? mm? pixels? in-ft?
From Sample Code:
Code:
XPen pen = new XPen(XColors.Black, 0.0);
XGraphicsPath path = new XGraphicsPath();
// Winding fill mode
path = new XGraphicsPath();
path.FillMode = XFillMode.Winding;
path.AddLine([b][u]5.0, 25.0, 30.0, 12.0[/u][/b]);
// First two Numbers = bottom left
// Second two Numbers = top left
//path.AddBeziers(new XPoint[]{new XPoint(130, 40), new XPoint(150, 0), new XPoint(160, 20), new XPoint(180, 40),
//new XPoint(200, 60), new XPoint(220, 60), new XPoint(240, 40)});
path.AddLine([b][u]35.0, 20.0, 5.0, 45.0[/u][/b]);
// First two numbers = Top Right
// Second two numbers = btm right
path.CloseFigure();
//path.AddEllipse(160, 80, 50, 40);
gfx.DrawPath(pen, XBrushes.Silver, path);
As you can see I've taken out the Beziers and Ellipse. I'm trying to create a polygon. I understand (I think) that the CloseFigure() is taking the two (+/-) vertical lines and connecting the dots.
My second question is, I have a polygon with up to 12 points. Basically I'm creating block letters from scratch. There will be two letters nested together and they are block, not curved at all. How many of these AddLine(x,x,x,x); can I add to this XGraphicsPath();? I can make 4 points work, but sure would like to have more available to me.
My last question is where is 0.0,0.0 relative to the paperspace?
I've looked on the forum search and the new site for more details. Any direction you could provide would be deeply appreciated.
Thank You. Frank Pytel