Beispiel #1
0
 public override object ConvertFrom(
     ITypeDescriptorContext context,
     CultureInfo culture,
     object value)
 {
     if (value.GetType() == typeof(string))
     {
         return((object)Point2F.Parse((string)value));
     }
     return(base.ConvertFrom(context, culture, value));
 }
Beispiel #2
0
 public Vector4F TransformTo4D(Point2F point)
 {
     return(new Vector4F((float)((double)this.M00 * (double)point.X + (double)this.M01 * (double)point.Y) + this.M03, (float)((double)this.M10 * (double)point.X + (double)this.M11 * (double)point.Y) + this.M13, (float)((double)this.M20 * (double)point.X + (double)this.M21 * (double)point.Y) + this.M23, (float)((double)this.M30 * (double)point.X + (double)this.M31 * (double)point.Y) + this.M33));
 }
Beispiel #3
0
        public Point2F TransformTo2D(Point2F point)
        {
            float num = (float)(1.0 / ((double)this.M30 * (double)point.X + (double)this.M31 * (double)point.Y + (double)this.M33));

            return(new Point2F(((float)((double)this.M00 * (double)point.X + (double)this.M01 * (double)point.Y) + this.M03) * num, ((float)((double)this.M10 * (double)point.X + (double)this.M11 * (double)point.Y) + this.M13) * num));
        }
Beispiel #4
0
 public Point2F Transform(Point2F point)
 {
     return(new Point2F((float)((double)this.M00 * (double)point.X + (double)this.M01 * (double)point.Y) + this.M02, (float)((double)this.M10 * (double)point.X + (double)this.M11 * (double)point.Y) + this.M12));
 }
Beispiel #5
0
 public Point3F(Point2F point, float z)
 {
     this.X = point.X;
     this.Y = point.Y;
     this.Z = z;
 }