public static Bitmap generateElementBitmap(PonyVille ponyVille, SizeF s, ViewParameters p) { int w = (int)(s.Width * p.ZoomRatio); int h = (int)(s.Height * p.ZoomRatio); if (w == 0) { w = 1; } if (h == 0) { h = 1; } Bitmap b = new Bitmap(w, h); Bitmap pony = ponyVille.getBitmap(); Graphics g = Graphics.FromImage(b); g.InterpolationMode = InterpolationMode.HighQualityBicubic; Point[] pts = new Point[3]; pts[0] = new Point(0, 0); pts[1] = new Point(w, 0); pts[2] = new Point(0, h); g.DrawImage(pony, pts); pony.Dispose(); return(b); }
public PonyVilleView(PonyVille p) : base(p) { this.p = p; }