public override Rect TransformBounds(Rect r1) { _tmp2[0] = new Drawing.PointF((float)r1.Left, (float)r1.Top); _tmp2[1] = new Drawing.PointF((float)r1.Right, (float)r1.Top); _tmp2[2] = new Drawing.PointF((float)r1.Right, (float)r1.Bottom); _tmp2[3] = new Drawing.PointF((float)r1.Left, (float)r1.Bottom); //find a new bound return(new Rect(_tmp2[0].X, _tmp2[0].Y, _tmp2[2].X - _tmp[0].X, _tmp2[2].Y - _tmp2[1].Y)); }
public static void TransformPoints(this Affine aff, PixelFarm.Drawing.PointF[] points) { for (int i = 0; i < points.Length; ++i) { Drawing.PointF p = points[i]; float x = p.X; float y = p.Y; aff.Transform(ref x, ref y); points[i] = new Drawing.PointF(x, y); } }
public override Point Transform(Point p) { _tmp[0] = new Drawing.PointF((float)p.X, (float)p.Y); mm1.TransformPoints(_tmp); return(new Point(_tmp[0].X, _tmp[0].Y)); }