[Mono-dev] Bug #75063 - Graphics.DrawImage(Image, PointF[]) throws exception

Bill Holmes billholmes54 at gmail.com
Mon Apr 24 09:43:35 EDT 2006


I was reading bug 75063 last night and the discussions matrix
rotations sounded familiar.


"I fixed a few issues but the bug is not completly fixed since I have
been unable to plement properly the matrix rotations to match MS
behaviour. Any help on this issue will be appreciated.

Jordi,"


I was looking into the libgdi code for problems I was experiencing
with the lineargradientbrush and I found a method (GdipCreateMatrix3)
that enabled me to solve my problems.   If I understand the method
correctly it creates a transformation matrix from a rectangle to three
points that define a parallelogram.  I believe that this is what is
needed to resove bug 75063.

My solution is to create a matrix using GdipCreateMatrix3 and apply it
to the current context.  After the paint I set the original matrix
back to the context.

The only test case I have is the one from the bug.  I tried to vary
the points several ways to compare to MS's output.

I am new to posting and am not sure what tests should be run and where
they are.  Any links or info that someone can pass along would be
helpful.

I have attached the image.c file from libgdiplus and the diff file as well.

-bill
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.zip
Type: application/zip
Size: 12659 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060424/04f06a4e/attachment.zip 


More information about the Mono-devel-list mailing list