Example #1
0
 public MFigure(XData data, XText text, Point start, Point end)
 {
     this.data.type            = data.type;
     this.data.lineWidth       = data.lineWidth;
     this.data.color           = data.color;
     this.text.textString      = text.textString;
     this.text.textAngle       = text.textAngle;
     this.text.textFont        = text.textFont;
     this.text.textColor       = text.textColor;
     this.text.horizontalAlign = text.horizontalAlign;
     this.text.verticalAlign   = text.verticalAlign;
     Start = start;
     End   = end;
 }
Example #2
0
        public MFigure GetState()
        {
            XData data = new XData();

            data.type      = (FigureDrawing)type;
            data.color     = Color.FromArgb(color);
            data.lineWidth = lineWidth;

            XText text = new XText();

            text.textString      = textString;
            text.textAngle       = textAngle;
            text.textColor       = Color.FromArgb(textColor);
            text.textFont        = new Font(fontName, textSize);
            text.horizontalAlign = (StringAlignment)horizontalAlign;
            text.verticalAlign   = (StringAlignment)verticalAlign;
            return(new MFigure()
            {
                data = data,
                text = text,
                Start = new Point(x1, y1),
                End = new Point(x2, y2)
            });
        }