override public void Init() { Point P1 = new Point(), P2 = new Point(); FreeWorkLines(); FreeWorkShapes(); TTfeRectShape Rct; TTfeEllShape Ell; F_LastShapeId = F_NumberShapeId; P1.X = StartPoint.X + 4 * F_Step; P1.Y = StartPoint.Y; F_LastShapeId++; F_NumberShapeId = F_LastShapeId; Rct = new TTfeRectShape(P1.X, P1.Y, F_Step, F_LastShapeId); AddShape(Rct); Rct.GetTailPoint(1, ref P2); P2.X = P2.X + 2 * F_Step; F_LastShapeId++; Ell = new TTfeEllShape(P2.X, P2.Y, F_Step, F_LastShapeId); Ell.TailLeft = true; Ell.TailTop = true; Ell.TailRight = true; AddShape(Ell); CreateLines(); CalcWidthWork(); F_Indent = FirstLine.xEnd - FirstLine.xStart; }
public TBaseShape CloneShape(TBaseShape ADest) { TBaseShape mShape = null; if (ADest == null) { return(null); } switch (ADest.TypeShape) { case 5: mShape = new TTfeRectShape(0, 0, 0, 0); break; case 6: mShape = new TTfeRhombShape(0, 0, 0, 0); break; case 7: mShape = new TTfeEllShape(0, 0, 0, 0); break; case 8: mShape = new TTfeHexahedronShape(0, 0, 0, 0); break; } if (mShape == null) { return(null); } mShape.Clon = ADest; ADest.CopyObject(mShape); return(mShape); }