コード例 #1
0
ファイル: Graphicsos.cs プロジェクト: zyouhua/nvwa
        public static void _drawPull(Rect2I nRect, Graphics nGraphics, RGB nRGB, int nSize = 4)
        {
            Point2I lefttop_ = nRect._getPoint();
            lefttop_._offset(-nSize, -nSize);

            Point2I righttop_ = nRect._getRTPoint();
            righttop_._offset(nSize, -nSize);

            Point2I leftbottom_ = nRect._getLBPoint();
            leftbottom_._offset(-nSize, nSize);

            Point2I rightbottom_ = nRect._getRBPoint();
            rightbottom_._offset(nSize, nSize);

            Point2I lt_ = new Point2I();
            lt_._setX(nRect._getX() - nSize);
            lt_._setY(nRect._centerY() - 3);
            Point2I lb_ = new Point2I();
            lb_._setX(nRect._getX() - nSize);
            lb_._setY(nRect._centerY() + 3);
            Point2I lp_ = new Point2I();
            lp_._setX(nRect._getX() - 4);
            lp_._setY(nRect._centerY());

            Point2I rt_ = new Point2I();
            rt_._setX(nRect._getRTX() + nSize);
            rt_._setY(nRect._centerY() - 3);
            Point2I rb_ = new Point2I();
            rb_._setX(nRect._getRTX() + nSize);
            rb_._setY(nRect._centerY() + 3);
            Point2I rp_ = new Point2I();
            rp_._setX(nRect._getRTX() + 4);
            rp_._setY(nRect._centerY());

            Line2I top_ = new Line2I(lefttop_, righttop_);
            _drawBroken(top_, nGraphics, nRGB);
            Line2I bottom_ = new Line2I(leftbottom_, rightbottom_);
            _drawBroken(bottom_, nGraphics, nRGB);
            Line2I left0_ = new Line2I(lefttop_, lt_);
            _drawBroken(left0_, nGraphics, nRGB);
            Line2I left1_ = new Line2I(leftbottom_, lb_);
            _drawBroken(left1_, nGraphics, nRGB);
            Line2I right0_ = new Line2I(righttop_, rt_);
            _drawBroken(right0_, nGraphics, nRGB);
            Line2I right1_ = new Line2I(rightbottom_, rb_);
            _drawBroken(right1_, nGraphics, nRGB);
            _drawEllipse(lp_, nGraphics, nRGB);
            _drawEllipse(rp_, nGraphics, nRGB);
        }