The Winter 2008 CS130 Wine project focuses on GDI+. Here's some useful information and links for people working on this project.
GDI+ is a new version of GDI with more advanced graphics features. GDI is a Windows susbsystem that draws shapes, render fonts, etc.
TODO: General description of GDI+ Programming. Links, etc.
The table below lists the GDI+ functions known to be in use, along with the number of applications that use it.
The table is sortable if you click on the table headers.
You may also be interested in The list of Outstanding Bugs.
Click here to collapse/expand table
Function | Number of apps effected |
---|---|
GdipAddPathArcI | 1 |
GdipAddPathBezier | 1 |
GdipAddPathCurve | 1 |
GdipAddPathLine | 2 |
GdipAddPathPolygonI | 1 |
GdipAddPathRectangle | 2 |
GdipAddPathString | 2 |
GdipBitmapSetPixel | 2 |
GdipCloneBitmapAreaI | 5 |
GdipCloneFontFamily | 1 |
GdipCloneImage | 13 |
GdipCloneStringFormat | 2 |
GdipCombineRegionPath | 1 |
GdipCombineRegionRectI | 2 |
GdipCreateAdjustableArrowCap | 1 |
4 | |
GdipCreateBitmapFromGdiDib | 3 |
GdipCreateBitmapFromHBITMAP | 8 |
GdipCreateBitmapFromHICON | 1 |
GdipCreateBitmapFromResource | 3 |
GdipCreateCachedBitmap | 3 |
GdipCreateFont | 4 |
GdipCreateFontFamilyFromName | 4 |
GdipCreateFontFromDC | 4 |
GdipCreateHatchBrush | 4 |
GdipCreateHBITMAPFromBitmap | 1 |
GdipCreateRegion | 3 |
GdipCreateRegionRectI | 1 |
GdipCreateTexture | 3 |
GdipCreateTexture2I | 1 |
GdipDeleteCachedBitmap | 3 |
GdipDeleteFontFamily | 4 |
GdipDeletePrivateFontCollection | 1 |
GdipDeleteRegion | 3 |
3 | |
2 | |
GdipDrawCachedBitmap | 3 |
GdipDrawClosedCurve2I | 2 |
GdipDrawCurve2I | 2 |
GdipDrawEllipseI | 3 |
GdipDrawImagePointRect | 2 |
GdipDrawImagePointRectI | 2 |
GdipDrawImageRect | 3 |
GdipDrawImageRectI | 8 |
9 | |
GdipDrawPieI | 2 |
GdipDrawPolygon | 2 |
GdipDrawPolygonI | 2 |
GdipDrawRectangle | 2 |
GdipFillClosedCurveI | 2 |
GdipFillEllipse | 2 |
GdipFillEllipseI | 3 |
GdipFillPieI | 2 |
GdipFillRegion | 1 |
GdipFlush | 1 |
GdipGetClip | 1 |
GdipGetDC | 7 |
GdipGetDpiX | 1 |
GdipGetDpiY | 1 |
GdipGetEncoderParameterList | 2 |
GdipGetEncoderParameterListSize | 2 |
GdipGetFamily | 1 |
GdipGetFamilyName | 1 |
GdipGetFontCollectionFamilyCount | 2 |
GdipGetFontCollectionFamilyList | 1 |
GdipGetFontSize | 2 |
GdipGetGenericFontFamilySansSerif | 4 |
GdipGetHatchBackgroundColor | 1 |
GdipGetHatchForegroundColor | 3 |
GdipGetHatchStyle | 2 |
GdipGetImageDecoders | 1 |
GdipGetImageDecodersSize | 1 |
3 | |
12 | |
15 | |
GdipGetImagePalette | 1 |
GdipGetImagePaletteSize | 1 |
GdipGetImageThumbnail | 5 |
GdipGetLineColors | 2 |
GdipGetLineRectI | 2 |
GdipGetLineWrapMode | 2 |
GdipGetPathWorldBoundsI | 1 |
GdipGetPenFillType | 2 |
GdipGetPenMode | 2 |
GdipGetPenWidth | 2 |
GdipGetPropertyCount | 1 |
GdipGetPropertyItem | 2 |
GdipGetRegionHRgn | 2 |
GdipGetTextContrast | 1 |
GdipGraphicsClear | 5 |
GdipImageRotateFlip | 2 |
GdipIsClipEmpty | 1 |
GdipIsStyleAvailable | 1 |
GdipIsVisibleRegionPointI | 1 |
6 | |
GdipLoadImageFromFileICM | 2 |
GdipMeasureCharacterRanges | 2 |
GdipNewInstalledFontCollection | 1 |
GdipNewPrivateFontCollection | 1 |
GdipPrivateAddFontFile | 1 |
GdipReleaseDC | 7 |
GdipResetWorldTransform | 4 |
8 | |
GdipSetClipRect | 1 |
GdipSetClipRegion | 2 |
GdipSetEmpty | 2 |
GdipSetImageAttributesRemapTable | 1 |
GdipSetLineColors | 3 |
GdipSetLinePresetBlend | 2 |
GdipSetPenCompoundArray | 1 |
GdipSetPenMode | 2 |
GdipSetPropertyItem | 1 |
GdipSetStringFormatFlags | 2 |
GdipSetStringFormatMeasurableCharacterRanges | 1 |
GdipSetTextContrast | 1 |
GdipStringFormatGetGenericDefault | 1 |
GdipTranslateLineTransform | 1 |
GdipTranslateRegionI | 1 |
GdipTranslateTextureTransform | 1 |
GdipWarpPath | 2 |
The Windows SDK comes with a command line compiler, and the headers / libraries necessary to compile win32 programs.
After installing the SDK, you can start a shell via: Programs -> Microsoft Windows SDK -> CMD Shell
So now, let's say you have a program called cs130proj, and its source files are: proj.c and utils.c. To compile this project, run:
cl -c proj.c cl -c utils.c cl -o cs130proj.exe proj.obj utils.obj foo.lib bar.lib
A simple makefile for this would look like:
LIBRARIES = foo.lib bar.lib APP = cs130proj.exe OBJ = proj.obj utils.obj all: $(APP) $(APP): $(OBJ) $(CC) -o $(APP) $(OBJ) $(LIBRARIES) .c.obj: $(CC) -c $< clean: del $(APP) $(OBJ)
See also: Using Microsoft C++ Toolkit on Linux
We need to make sure the conformance tests we write work on Windows to begin with. This means we need to compile and run the tests on Windows.
With GDI+, the Windows SDK header files conflict with the Wine gdiplus header files. To get around that, do the following:
Copy wine-version/include/gdiplus*.h to wine-version/dlls/gdiplus/tests/wine/.
You also need to copy wine-version/include/wine/test.h to
wine-version/dlls/gdiplus/tests/wine/test.h.
Then, from wine-version/dlls/gdiplus/tests, run:
cl -DSTANDALONE -D_X86_ foo.c gdiplus.lib -I .\wine
This will generate the test program foo.exe.
There's more information on this subject here and here.
5 minute intro to
Wine development (may not apply all that much to gdiplus)
The GdiPlus Wiki Page (possibly a
better starting point)
Overview page
I subscribe to: wine-devel, wine-patches, wine-cvs, and wine-bugs. You probably
should only subscribe to wine-devel and wine-patches. The wine-patches mailing
list is relatively high in traffic, so be prepared to set up email filters.
Wine Developer's
Guide - Writing Conformance tests
More on Wine Testing (not Wine Tasting)
Examples: Gdiplus: Pen, Comctl32: Status Bar
Also: Nightly Test Results
Wine has a couple useful macros for testing.
The first one is ok().
ok(test, output_msg, args...);
test can be anything statement, and if it evaluates to true,
then the test passes. Otherwise, the test fails and Wine prints an error
message.
output_msg, args... - output_msg is a string in the same
format used by printf() and args... are the variable
arguments for values in the format string.
Example: result = MyFunction(arg1, arg2, arg3); ok(result == 5, "Expected 5, got %d\n", r);
Sometimes a test case will work on Windows, but it is known not to work with Wine. For such a case, put it inside a todo_wine() statement. This has several effects: (1) the failure is listed as a todo instead, (2) when the problem gets fixed eventually, the todo will become a failure to alert you, (3) this separates known failures from new failures that can occur through regression.
Compiling the entire Wine tree can be a time consuming process (8-20 minutes on a modern machine. Fortunately, most of the time we will just be making changes in the dlls/gdiplus/ directory, so it's not so bad. If you are on a multi-core/processor machine, remember to use make's -j option to speed up the process.
Here's a list of packages needed to compile Wine on certain Linux distributions.
To compile Windows program with Wine, use winegcc/wineg++. It takes the same arguments as gcc, so to compile and link a program with gdiplus, run: winegcc -o foo foo.c -lgdiplus.
Wine switched from CVS to Git for revision
control. (Git is also used by the Linux Kernel - It's written by this guy named
Linus) Here's a couple documents to get started:
Using Git With Wine
More info about Wine and Git
The Wine Git Tree
In case you didn't know: patch and diff.
Generating and Submitting Patches
Example: Patch sent to wine-patches, Patch accepted on wine-cvs
When sending in the email, attaching the patch should work in most case. (It least it does for me with Mutt and Gmail) Pasting your code into the body of the email may not work right because many email clients wrap text. It's also nice to include the diffstat as shown here:
dlls/riched20/editor.c | 26 ++++++++++++++++++-------- dlls/riched20/tests/editor.c | 10 +++++----- 2 files changed, 23 insertions(+), 13 deletions(-)
To generate this, run:
diffstat -w 72 your.patch
If you are using Git to generate the patches with git-format-patch, then you do not need to run diffstat. It's automatically done for you.
Bugzilla is a bug tracking system. This is the Wine Bugzilla.
Here is A sample bug (#10431). There's a lot of information on this page, some of the fields are explained here.
This is the current list of open bugs for gdiplus.
This is a list of applications people have filed bugs for, along with the list of functions needed to make the application work. The functions names in bold are the ones causing the most immediate crash. Click on the [*] in the left-most column to collapse/expand that row.
You may also be interested in The list of GDI+ Functions.
Bug | Application | Function Needed | Status | Notes | |
---|---|---|---|---|---|
[*] | 8919 | CSS Tab Designer 2 |
GdipCloneBitmapAreaI
GdipCloneImage GdipCreateBitmapFromGdiDib GdipCreateBitmapFromHBITMAP GdipCreateCachedBitmap GdipCreateHatchBrush GdipDeleteCachedBitmap GdipDrawCachedBitmap GdipDrawClosedCurve2I GdipDrawCurve2I GdipDrawEllipseI GdipDrawImagePointRect GdipDrawImageRectI GdipDrawPieI GdipDrawPolygonI GdipFillClosedCurveI GdipFillEllipseI GdipFillPieI GdipGetDC GdipGetEncoderParameterList GdipGetEncoderParameterListSize GdipGetHatchBackgroundColor GdipGetHatchForegroundColor GdipGetHatchStyle GdipGetLineColors GdipGetLineRectI GdipGetLineWrapMode GdipGetPenFillType GdipGetPenMode GdipGetPenWidth GdipGraphicsClear GdipReleaseDC GdipSetLineColors GdipSetPenMode |
7 / 42 |
Hey, this app kinda works now. |
[*] | 9364 | Pando |
GdipAddPathRectangle
GdipAddPathString GdipCloneBitmapAreaI GdipCloneImage GdipCreateBitmapFromHBITMAP GdipCreateBitmapFromResource GdipCreateFont GdipCreateFontFamilyFromName GdipCreateHatchBrush GdipCreateTexture GdipDeleteFontFamily GdipDrawImageRect GdipDrawImageRectI GdipDrawPolygon GdipDrawRectangle GdipFillEllipseI GdipGetFontSize GdipSetLinePresetBlend GdipWarpPath |
2 / 21 |
|
[*] | 9362 | Incredimail |
More? |
0 / NA |
I had trouble installing this. Dan says it's gotten past its gdiplus issues |
[*] | 9366 | Quicktime Player |
GdipAddPathBezier
GdipAddPathLine GdipCloneBitmapAreaI GdipCloneImage GdipCloneStringFormat GdipCombineRegionPath GdipCombineRegionRectI GdipCreateBitmapFromHBITMAP GdipCreateFont GdipCreateFontFromDC GdipCreateRegion GdipCreateRegionRectI GdipCreateTexture GdipDeleteRegion GdipDrawImageRectI GdipFillRegion GdipFlush GdipGetDC GdipGetGenericFontFamilySansSerif GdipGetImageThumbnail GdipGetPathWorldBoundsI GdipGetRegionHRgn GdipGraphicsClear GdipMeasureCharacterRanges GdipReleaseDC GdipSetClipRegion GdipSetEmpty GdipSetStringFormatFlags GdipSetStringFormatMeasurableCharacterRanges GdipStringFormatGetGenericDefault GdipTranslateLineTransform |
4 / 35 |
Need to set Windows version to Windows XP in winecfg. Quicktime oftentimes blank the screen. |
[*] | 9678 | Buro Plus Next 8.5 |
More? |
0 / NA |
Need to register (in German) to download |
[*] | 9860 | MSN Messenger 8.1 |
GdipCloneImage
GdipCreateBitmapFromHBITMAP GdipDrawImageRectI GdipGetClip GdipGetDC GdipGetImagePalette GdipGetImagePaletteSize GdipGetPropertyItem GdipGetTextContrast GdipIsClipEmpty GdipReleaseDC GdipResetWorldTransform GdipSetClipRect GdipSetClipRegion GdipSetTextContrast GdipTranslateRegionI |
3 / 19 |
Need to set Wine Version to XP. It kinda starts up, doesn't really work yet. |
[*] |
9963 10431 |
GPSMapEdit |
GdipGetImageDecoders GdipGetImageDecodersSize |
3 / 5 |
|
[*] | 10269 | Art Rage Starter Edition 2.5 |
More? |
0 / NA |
Is this downloadable? |
[*] | 10285 | Google Talk |
|
3 / 3 |
Installer no longer crashes due to gdiplus issues |
[*] | 10449 | Broken Cross Disk Manager |
GdipCloneImage
GdipCreateBitmapFromHBITMAP GdipGetImageThumbnail |
5 / 8 |
|
[*] | 10700 | Dragon Natural Speaking |
GdipSetLinePresetBlend |
1 / 2 |
|
[*] | 10785 | Slingplayer |
GdipCloneImage
GdipCombineRegionRectI GdipCreateRegion GdipCreateTexture2I GdipDeleteRegion GdipDrawImageRectI GdipGetDC GdipGetImageThumbnail GdipGetRegionHRgn GdipIsVisibleRegionPointI GdipLoadImageFromFileICM GdipReleaseDC GdipSetEmpty GdipSetImageAttributesRemapTable |
5 / 19 |
Flaky installer |
[*] | 10788 | Windows Movie Maker |
GdipAddPathPolygonI
GdipAddPathRectangle GdipAddPathString GdipCloneFontFamily GdipCloneImage GdipCloneStringFormat GdipCreateBitmapFromGdiDib GdipCreateBitmapFromHBITMAP GdipCreateBitmapFromHICON GdipCreateBitmapFromResource GdipCreateFont GdipCreateFontFamilyFromName GdipCreateFontFromDC GdipDeleteFontFamily GdipDrawImagePointRectI GdipDrawImageRect GdipDrawImageRectI GdipGetFamily GdipGetFamilyName GdipGetFontCollectionFamilyCount GdipGetFontCollectionFamilyList GdipGetFontSize GdipGetGenericFontFamilySansSerif GdipGetImageThumbnail GdipGetPropertyItem GdipGraphicsClear GdipImageRotateFlip GdipIsStyleAvailable GdipNewInstalledFontCollection GdipResetWorldTransform GdipSetLineColors GdipSetPropertyItem GdipSetStringFormatFlags GdipTranslateTextureTransform GdipWarpPath |
5 / 40 |
Need to set Windows version to Windows XP in winecfg. |
[*] | 10903 | Visere |
GdipAddPathArcI
GdipAddPathCurve GdipAddPathLine GdipCloneImage GdipCreateBitmapFromHBITMAP GdipCreateFontFromDC GdipCreateHBITMAPFromBitmap GdipCreateTexture GdipDrawImageRect GdipGetDC GdipGetImageThumbnail GdipImageRotateFlip GdipReleaseDC GdipResetWorldTransform |
4 / 18 |
|
[*] | 10980 | ConvertImage |
GdipGetPropertyCount |
3 / 4 |
Source code available Pretty much works now, as long as we convert to BMP |
[*] | 10981 | Anti-Grain Geometry GDI Demo |
GdipCloneImage
GdipCreateAdjustableArrowCap GdipDrawImagePointRectI GdipFillEllipse GdipGraphicsClear |
0 / 5 |
Source code available |
[*] | 10982 | ClearScale |
GdipBitmapSetPixel
GdipCloneImage GdipCreateFontFamilyFromName GdipDeleteFontFamily |
4 / 8 |
|
[*] | 11033 | My Sirius Studio |
GdipGetGenericFontFamilySansSerif
More? |
0 / NA |
Need to set Windows version to Windows XP in winecfg, needs .NET |
[*] | 11054 | EasyGPS |
GdipBitmapSetPixel
GdipCloneBitmapAreaI GdipCloneImage GdipCreateBitmapFromResource GdipCreateCachedBitmap GdipCreateFont GdipCreateFontFamilyFromName GdipCreateHatchBrush GdipDeleteCachedBitmap GdipDeleteFontFamily GdipDeletePrivateFontCollection GdipDrawCachedBitmap GdipDrawEllipseI GdipDrawPolygon GdipDrawRectangle GdipFillEllipse GdipGetDpiX GdipGetDpiY GdipGetFontCollectionFamilyCount GdipGetGenericFontFamilySansSerif GdipNewPrivateFontCollection GdipPrivateAddFontFile GdipResetWorldTransform GdipSetPenCompoundArray |
1 / 25 |
|
[*] | 11086 | Noiseware |
GdipCreateBitmapFromHBITMAP GdipCloneImage |
3/ 5 |
|
[*] | 11225 | Amazon MP3 Downloader |
GdipCloneImage
GdipCreateFontFromDC GdipDrawImageRectI GdipGetDC GdipLoadImageFromFileICM??? GdipMeasureCharacterRanges??? GdipReleaseDC |
1 / 8 |
Need to set Windows version to Windows XP in winecfg. |
[*] | No Bug # | PowerWorld Simulator |
GdipCloneBitmapAreaI
GdipCloneImage GdipCreateBitmapFromGdiDib GdipCreateBitmapFromHBITMAP GdipCreateCachedBitmap GdipCreateHatchBrush GdipDeleteCachedBitmap GdipDrawCachedBitmap GdipDrawClosedCurve2I GdipDrawCurve2I GdipDrawEllipseI GdipDrawImagePointRect GdipDrawImageRectI GdipDrawPieI GdipDrawPolygonI GdipFillClosedCurveI GdipFillEllipseI GdipFillPieI GdipGetDC GdipGetEncoderParameterList GdipGetEncoderParameterListSize GdipGetHatchBackgroundColor GdipGetHatchForegroundColor GdipGetHatchStyle GdipGetLineColors GdipGetLineRectI GdipGetLineWrapMode GdipGetPenFillType GdipGetPenMode GdipGetPenWidth GdipGraphicsClear GdipReleaseDC GdipSetLineColors GdipSetPenMode |
7 / 41 |
Comes with gdiplus.dll. |
/~leiz/software/wine/cs130_w08.php last updated on Wed Dec 31 1969