예제 #1
0
 public Rect2d(Position2d position, Size2d size, Origin2d origin)
 {
     this.X      = position.X;
     this.Y      = position.Y;
     this.Width  = size.Width;
     this.Height = size.Height;
     this.Origin = origin;
 }
예제 #2
0
        public Polygon2d AddPoint(Position2d point)
        {
            if (this.Points == null)
            {
                this.Points = new List <Position2d>(1);
            }

            this.Points.Add(point);
            return(this);
        }
예제 #3
0
        public Polygon2d(Position2d start, params Vector2d[] strokes)
        {
            this.Points = new List <Position2d> {
                start
            };

            foreach (var stroke in strokes)
            {
                this.AddStroke(stroke);
            }
        }
예제 #4
0
 public Position2d MoveTo(Position2d position)
 {
     this.X = position.X;
     this.Y = position.Y;
     return(this);
 }
예제 #5
0
 public Rect2d(Position2d position, Size2d size, Anchor2d anchor) : this(position, size, new Origin2d(anchor))
 {
 }
예제 #6
0
 public Rect2d(Position2d position, Size2d size) : this(position, size, DefaultOrigin)
 {
 }