Exemplo n.º 1
0
        public override void rePosition(Ele e)
        {
            float midX, midY = 0;

            midX = (e.getX1() - e.getX()) / 2;
            midY = (e.getY1() - e.getY()) / 2;
            PointF Hp    = new PointF(0, -25);
            PointF RotHP = this.rotatePoint(Hp, e.getRotation());

            midX += RotHP.X;
            midY += RotHP.Y;

            this.X         = e.getX() + (int)midX - 2;
            this.Y         = e.getY() + (int)midY - 2;
            this._rotation = e.getRotation();

            this.X1 = this.X + 5;
            this.Y1 = this.Y + 5;
        }
Exemplo n.º 2
0
        public override void rePosition(Ele e)
        {
            switch (this.op)
            {
            case "NW":
                this.X = e.getX() - 2;
                this.Y = e.getY() - 2;
                break;

            case "N":
                this.X = e.getX() - 2 + ((e.getX1() - e.getX()) / 2);
                this.Y = e.getY() - 2;
                break;

            case "NE":
                this.X = e.getX1() - 2;
                this.Y = e.getY() - 2;
                break;

            case "E":
                this.X = e.getX1() - 2;
                this.Y = e.getY() - 2 + (e.getY1() - e.getY()) / 2;
                break;

            case "SE":
                this.X = e.getX1() - 2;
                this.Y = e.getY1() - 2;
                break;

            case "S":
                this.X = e.getX() - 2 + (e.getX1() - e.getX()) / 2;
                this.Y = e.getY1() - 2;
                break;

            case "SW":
                this.X = e.getX() - 2;
                this.Y = e.getY1() - 2;
                break;

            case "W":
                this.X = e.getX() - 2;
                this.Y = e.getY() - 2 + (e.getY1() - e.getY()) / 2;
                break;

            default:
                break;
            }
            this.X1 = this.X + 5;
            this.Y1 = this.Y + 5;
        }
Exemplo n.º 3
0
 public AbstractSel(Ele el)
 {
     this.X            = el.getX();
     this.Y            = el.getY();
     this.X1           = el.getX1();;
     this.Y1           = el.getY1();
     this.Selected     = false;
     this.rot          = el.canRotate();// RotAllowed;
     this._rotation    = el.getRotation();
     this.gprZoomX     = el.getGprZoomX();
     this.gprZoomY     = el.getGprZoomY();
     this.sonoUnaLinea = el.sonoUnaLinea;
     this.IamGroup     = el.AmIaGroup();
     handles           = new ArrayList();
     this.endMoveRedim();
 }