示例#1
0
 public bool _drawCreate(Point2I nPoint, string nId, Graphics nGraphics)
 {
     Rect2I labelRect2I_ = this._getRect2I();
     if (!labelRect2I_._contain(nPoint))
     {
         return false;
     }
     if (mRectShapes.Count <= 0)
     {
         if (this._rectIdSel(nId))
         {
             base._rectDrawCreate(nGraphics, labelRect2I_);
             return true;
         }
         return false;
     }
     Rect2I rect2i_ = new Rect2I(labelRect2I_);
     rect2i_._setHeight(mLabelHeight);
     if (rect2i_._contain(nPoint))
     {
         if (this._rectIdSel(nId))
         {
             base._rectDrawCreate(nGraphics, labelRect2I_);
             return true;
         }
         return false;
     }
     rect2i_._offset(0, mLabelHeight);
     rect2i_._setHeight(mRectHeight);
     foreach (RectShape i in mRectShapes)
     {
         if (rect2i_._contain(nPoint))
         {
             if (i._rectIdSel(nId))
             {
                 i._rectDrawCreate(nGraphics, rect2i_);
                 return true;
             }
             return false;
         }
         rect2i_._offset(0, mRectHeight);
     }
     return false;
 }
示例#2
0
        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);
        }
示例#3
0
        public void _drawPull(Graphics nGraphics)
        {
            if (PullState_.mNone_ != mPullState)
            {
                return;
            }
            ShapeDescriptorSingleton shapeDescriptorSingleton_ = __singleton<ShapeDescriptorSingleton>._instance();
            RGB selectrgb_ = shapeDescriptorSingleton_._selectRGB();
            Rect2I labelRect2I_ = this._getRect2I();

            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);
        }
示例#4
0
        public void _drawSelect(Graphics nGraphics)
        {
            ShapeDescriptorSingleton shapeDescriptorSingleton_ = __singleton<ShapeDescriptorSingleton>._instance();
            RGB selectrgb_ = shapeDescriptorSingleton_._selectRGB();
            Rect2I labelRect2I_ = this._getRect2I();

            Rect2I rect2i_ = new Rect2I(labelRect2I_);
            rect2i_._setHeight(mLabelHeight);
            this._rectDrawNormal(nGraphics, rect2i_);
            rect2i_._offset(0, mLabelHeight);
            rect2i_._setHeight(mRectHeight);
            foreach (RectShape i in mRectShapes)
            {
                this._rectDrawNormal(nGraphics, rect2i_);
                rect2i_._offset(0, mRectHeight);
            }

            Graphicsos._drawBroken(labelRect2I_, nGraphics, selectrgb_, 4);
        }
示例#5
0
文件: Line2I.cs 项目: zyouhua/nvwa
 public bool _isSelect(int nX, int nY, int nDistance = 3)
 {
     Rect2I rect_ = new Rect2I(mBeg, mEnd);
     rect_._offset(-nDistance, -nDistance);
     rect_._sizeOffset(nDistance * 2, nDistance * 2);
     if (!rect_._contain(nX, nY))
     {
         return false;
     }
     double distance_ = this._distance(nX, nY);
     if (distance_ < nDistance)
     {
         return true;
     }
     return false;
 }