[Mono-bugs] [Bug 75063][Nor] Changed - Graphics.DrawImage(Image,
PointF[]) throws exception
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon May 30 11:15:07 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by davide.morelli at parser.it.
http://bugzilla.ximian.com/show_bug.cgi?id=75063
--- shadow/75063 2005-05-27 05:31:22.000000000 -0400
+++ shadow/75063.tmp.11619 2005-05-30 11:15:07.000000000 -0400
@@ -2,13 +2,13 @@
Product: Mono: Class Libraries
Version: 1.1
OS: Mac OS X 10.3
OS Details:
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Normal
Component: Sys.Drawing.
AssignedTo: mono-bugs at ximian.com
ReportedBy: davide.morelli at parser.it
QAContact: mono-bugs at ximian.com
TargetMilestone: ---
@@ -70,6 +70,43 @@
always
Additional Information:
I am using mono 1.1.7
os: 10.3 tiger
hw: MacMini
+
+------- Additional Comments From davide.morelli at parser.it 2005-05-30 11:15 -------
+digging in the source code I noticed that Graphics.DrawImage
+correctly calls GDIPlus.GdipDrawImagePoints but
+GDIPlus.GdipDrawImagePoints does something that doesn't look
+correct, see: http://svn.myrealbox.com/source/trunk/libgdiplus/src/
+
+this algorithm IMHO is not correct:
+/* points are upper left, upper right, lower left. fourth point is
+extrapolated. */
+GpStatus
+GdipDrawImagePoints (GpGraphics *graphics, GpImage *image, GDIPCONST
+GpPointF *dstPoints, int count)
+{
+ float x, y, width, height;
+
+ g_return_val_if_fail (graphics != NULL, InvalidParameter);
+ g_return_val_if_fail (image != NULL, InvalidParameter);
+ g_return_val_if_fail (dstPoints != NULL, InvalidParameter);
+ g_return_val_if_fail (count != 3, InvalidParameter);
+
+ x = dstPoints[0].X;
+ y = dstPoints[0].Y;
+ width = dstPoints[1].X - dstPoints[0].X;
+ height = dstPoints[2].Y - dstPoints[2].Y;
+
+ return GdipDrawImageRect (graphics, image, x, y, width,
+height);
+}
+
+this code should be correct if I pass 3 PointF like these:
+{(10,10), (100,10), (10,100)}
+but NOT with
+{(10,10), (100,0), (0,100)} <-- here is a rotation and a stretch
+
+so this should be a libgdiplus issue
+
More information about the mono-bugs
mailing list