[Mono-bugs] [Bug 404608] Changes to draw metafiles are needed

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Jun 28 09:57:18 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=404608

User MikeGratsas at techemail.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=404608#c2





--- Comment #2 from Mike Gratsas <MikeGratsas at techemail.com>  2008-06-28 07:57:17 MDT ---
Created an attachment (id=224996)
 --> (https://bugzilla.novell.com/attachment.cgi?id=224996)
Test case for an issue

Please note that metafile support is a incomplete feature on Unix using
libgdiplus only. On Windows gdiplus.dll developed by Microsoft is used by Mono.
I expect OS compatibility is an important feature of Mono.
If you wish you can split this enhancement to two bugs, but the main problem is
related with System.Drawing.
You could use my recently added example to detect Bug 402172 - [win32]
ImageAttributes.GetAdjustedPalette method implementation is invalid.
You will need to have some metafile and try to convert it to disabled bitmap.
The application should work. By replacing example code processing image by
uncommenting line in MainForm.cs
 ControlPaint.DrawImageDisabled(destGraphics, srcImage, 0, 0, background);
and commenting the rest code, i.e.


           using (Graphics destGraphics = Graphics.FromImage(destBitmap))
            {
                destGraphics.Clear(background);
                ControlPaint.DrawImageDisabled(destGraphics, srcImage, 0, 0,
background);
/*
                using (ImageAttributes imageAttrs = new ImageAttributes())
                {
                    ColorMatrix matrix = new
ColorMatrix(disabledMatrixElements);
                    imageAttrs.ClearColorKey();
                    imageAttrs.SetColorMatrix(matrix);
                    destGraphics.DrawImage(srcImage, new Rectangle(0, 0,
imageSize.Width, imageSize.Height),
                        srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height,
pageUnit, imageAttrs);
                }
*/
            }
you see an issue drawing metafile with origin point not equal to {0, 0}.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list