Beispiel #1
0
        public GOSquare(double edge, Coords сoordinatеs, string name, Canvas mainCanvas, ClrRGB color)
            : base(edge, edge, сoordinatеs, name, mainCanvas, color)
        {
            height    = edge;
            width     = edge;
            this.name = name;
            mCanvas   = mainCanvas;

            Crds.LB.x = сoordinatеs.x;
            Crds.LB.y = сoordinatеs.y;

            Crds.RB.x = Crds.LB.x + width;
            Crds.RB.y = Crds.LB.y;

            Crds.RT.x = Crds.LB.x + width;
            Crds.RT.y = Crds.LB.y + height;

            Crds.LT.x = Crds.LB.x;
            Crds.LT.y = Crds.LB.y + height;

            mRectangle        = new Rectangle();
            mRectangle.Name   = this.name.Replace(" ", string.Empty);
            mRectangle.Height = edge;
            mRectangle.Width  = edge;
            mRectangle.Fill   = color.color;
        }
Beispiel #2
0
        public GORectangle(double height, double width, Coords сoordinatеs, string name, Canvas mainCanvas, ClrRGB color)
            : base(height, width, сoordinatеs, name)
        {
            this.height = height;
            this.width  = width;
            this.name   = name;
            mCanvas     = mainCanvas;

            Crds.LB.x = сoordinatеs.x;
            Crds.LB.y = сoordinatеs.y;

            Crds.RB.x = Crds.LB.x + width;
            Crds.RB.y = Crds.LB.y;

            Crds.RT.x = Crds.LB.x + width;
            Crds.RT.y = Crds.LB.y + height;

            Crds.LT.x = Crds.LB.x;
            Crds.LT.y = Crds.LB.y + height;

            mRectangle        = new Rectangle();
            mRectangle.Name   = this.name.Replace(" ", string.Empty);
            mRectangle.Height = height;
            mRectangle.Width  = width;
            mRectangle.Fill   = color.color;
        }