public LineShape() { mPullPoint = new Point2I(default(int), default(int)); mPullState = PullState_.mNone_; mLineStream = null; mLine = null; }
public LabelShape() { mRectShapes = new List<RectShape>(); mPullPoint = new Point2I(default(int), default(int)); mPullState = PullState_.mNone_; mMoveState = MoveState_.mNone_; mLabelStream = null; mLabel = null; }
public void _pullMid(Point2I nPoint, Graphics nGraphics) { if (default(int) == mPullPoint._getX() && default(int) == mPullPoint._getY()) { return; } ShapeDescriptorSingleton shapeDescriptorSingleton_ = __singleton<ShapeDescriptorSingleton>._instance(); RGB selectrgb_ = shapeDescriptorSingleton_._selectRGB(); Rect2I labelRect2I_ = this._runPull(nPoint); Rect2I rect2i_ = new Rect2I(labelRect2I_); rect2i_._setHeight(mLabelHeight); this._rectDrawMove(nGraphics, rect2i_); rect2i_._offset(0, mLabelHeight); rect2i_._setHeight(mRectHeight); foreach (RectShape i in mRectShapes) { this._rectDrawMove(nGraphics, rect2i_); rect2i_._offset(0, mRectHeight); } Graphicsos._drawPull(labelRect2I_, nGraphics, selectrgb_, 4); mPullState = PullState_.mDoing_; }
public void _pullEnd(Point2I nPoint) { Rect2I rect2i_ = this._runPull(nPoint); mLabel._setX(rect2i_._getX()); mLabel._setY(rect2i_._getY()); mLabel._setW(rect2i_._getWidth()); mPullPoint._setPoint(default(int), default(int)); mPullState = PullState_.mNone_; this._rectAdjustPoint(); foreach (RectShape i in mRectShapes) { i._rectAdjustPoint(); } }
public void _pullMid(Point2I nPoint, Graphics nGraphics) { if (default(int) == mPullPoint._getX() && default(int) == mPullPoint._getY()) { return; } mPullState = PullState_.mDoing_; Line2I line_ = this._runPulling(nPoint); Point2I beg0_ = line_._begPoint(3); Point2I beg1_ = line_._begPoint(6); Point2I end0_ = line_._endPoint(3); Point2I end1_ = line_._endPoint(6); ShapeDescriptorSingleton shapeDescriptorSingleton_ = __singleton<ShapeDescriptorSingleton>._instance(); Graphicsos._drawEllipse(beg0_, nGraphics, shapeDescriptorSingleton_._selectRGB()); Graphicsos._drawEllipse(end0_, nGraphics, shapeDescriptorSingleton_._selectRGB()); Line2I line0_ = new Line2I(beg1_, end1_); string name_ = mLine._getName(); Graphicsos._runDraw(line0_, nGraphics, mLineStream._getMoveDraw(), mLineStream._getStyleName(), 1, mLineStream._getImage(), name_, mLineStream._getFont()); }
public void _pullEnd(Point2I nPoint) { IRect beg_ = mLine._getBeg(); IRect end_ = mLine._getEnd(); Rect2I begrect2i_ = beg_._getRect2I(); Rect2I endrect2i_ = end_._getRect2I(); Point2I begpoint2i_ = mLine._getBegPoint(); Point2I endpoint2i_ = mLine._getEndPoint(); if (begpoint2i_._isSelect(mPullPoint)) { if (begrect2i_._contain(nPoint)) { Point2I point_ = beg_._adjustJoinPoint(nPoint, endpoint2i_); mLine._setBegPoint(point_); } } else if (endpoint2i_._isSelect(mPullPoint)) { if (endrect2i_._contain(nPoint)) { Point2I point_ = end_._adjustJoinPoint(nPoint, begpoint2i_); mLine._setEndPoint(point_); } } else { } mPullPoint._setPoint(default(int), default(int)); mPullState = PullState_.mNone_; }