Exemplo n.º 1
0
 public PathElement(float x, float y)
 {
     X            = x;
     Y            = y;
     m_Primitives = new List <PathPrimitive>();
     Style        = new PdfDrawStyle();
 }
Exemplo n.º 2
0
 public RectangleElement(float x1, float y1, float x2, float y2, PdfDrawStyle borderStyle)
 {
     X     = x1;
     Y     = y1;
     X1    = x2;
     Y1    = y2;
     Style = borderStyle;
 }
Exemplo n.º 3
0
        /// <summary>
        /// Add rectangle primitive to the page
        /// </summary>
        public RectangleElement AddRectangle(float x1, float y1, float x2, float y2, PdfDrawStyle style)
        {
            var rectangle = new RectangleElement(x1, y1, x2, y2, style);

            Add(rectangle);

            return(rectangle);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Add path to the page
        /// </summary>
        public PathElement AddPath(float x, float y, PdfDrawStyle style)
        {
            var path = new PathElement(x, y, style);

            Add(path);

            return(path);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Add line primitive to the page
        /// </summary>
        public PathElement AddLine(float x1, float y1, float x2, float y2, PdfDrawStyle style)
        {
            var path = new PathElement(x1, y1, style);

            path.AddLine(x2, y2);
            Add(path);

            return(path);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Add circle primitive to the page
        /// </summary>
        public PathElement AddCircle(float centerX, float centerY, float r, PdfDrawStyle borderStyle)
        {
            var path = new PathElement(centerX - r, centerY, borderStyle);

            path.IsClosed = true;
            path.AddBezier(centerX - r, centerY + Constants.SQRT_TWO * r, centerX + r, centerY + Constants.SQRT_TWO * r, centerX + r, centerY);
            path.AddBezier(centerX + r, centerY - Constants.SQRT_TWO * r, centerX - r, centerY - Constants.SQRT_TWO * r, centerX - r, centerY);
            Add(path);

            return(path);
        }
Exemplo n.º 7
0
 public PathElement(float x, float y, PdfDrawStyle style)
     : this(x, y)
 {
     Style = style;
 }