Пример #1
0
 public PathElement(float x, float y)
 {
     X = x;
       Y = y;
       m_Primitives = new List<PathPrimitive>();
       Style = new PdfDrawStyle();
 }
Пример #2
0
 public RectangleElement(float x1, float y1, float x2, float y2, PdfDrawStyle borderStyle)
 {
     X = x1;
       Y = y1;
       X1 = x2;
       Y1 = y2;
       Style = borderStyle;
 }
Пример #3
0
 public PathElement(float x, float y, PdfDrawStyle style)
     : this(x, y)
 {
     Style = style;
 }
Пример #4
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;
        }
Пример #5
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;
        }
Пример #6
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;
        }
Пример #7
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;
        }