Review Request: Rough implementation of GdipBeginContainer and GdipEndContainer

Andrew Eikum andrew at brightnightgames.com
Tue Jun 30 22:48:52 CDT 2009


Attached to this email is a rough implementation of the main GDI+
containers functions.  It performs correctly in a few simple tests I
ran on it, but it's not quite ready to send off to wine-patches.  I'd
like to get some feedback here, since I'm certain that I'm doing some
things wrong.  I'm wondering about two things specifically.  Since the
vast majority of my programming experience has been with object
oriented languages, I'm not used to how to do things in C.

First, where should the utility functions and variables go?  Right
now, they're just thrown in above the functions I'm working on.  It
seems messy to me to have, for example, low and high (which need to be
renamed) declared where they are.  Do they belong there (or, rather,
near the top of graphics.c like some other utility functions), or
should they be placed elsewhere?

Second, I implemented a simple linked list to manage the stack of
GpGraphics objects.  I would imagine that there's some standard way of
doing stacks, rather than creating a simple one with utility functions
as I have here.  Can someone point me in the direction of the proper
way to do stacks like this in C?

Finally, while the code's still rough and needs cleaning up,
correctness checking, using Windows types and const properly, etc., am
I doing anything glaringly wrong?  As I mentioned, it works as
expected in the tests I've done, so I can't be too far off the mark :)

Thanks for taking a look,
Andrew

Patch attached.
Also available at:
http://www.brightnightgames.com/wine/gdipcontainers.patch

---
 dlls/gdiplus/graphics.c |  125 ++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 119 insertions(+), 6 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gdiplus-Rough-implementation-of-GdipBeginContainer-a.patch
Type: text/x-patch
Size: 4486 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20090630/759da77b/attachment.bin>


More information about the wine-devel mailing list