Create() public static method

public static Create ( float x = 0.0f, float y = 0.0f ) : Point
x float
y float
return Point
Ejemplo n.º 1
0
        /// <summary>
        /// Returns a vector containing the positions of the four edges of the given rectangle.
        /// </summary>
        public Point[] GetPositions()
        {
            Point[] outP = new Point[4];

            for (int i = 0; i < 4; ++i)
            {
                outP[i] = Point.Create();
            }
            outP[0].X = Left; outP[0].Y = Top;
            outP[1].X = Right; outP[1].Y = Top;
            outP[2].X = Left;  outP[2].Y = Bottom;
            outP[3].X = Right; outP[3].Y = Bottom;
            return(outP);
        }
Ejemplo n.º 2
0
 public Point TransformPoint(float x, float y)
 {
     return(Point.Create(A * x + C * y + Tx, B * x + D * y + Ty));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Returns a point that is transformed by this matrix
 /// </summary>
 public Point TransformPoint(Point point)
 {
     return(Point.Create(A * point.X + C * point.Y + Tx, B * point.X + D * point.Y + Ty));
 }