After getting burnt to a crisp working on my deck, I made some more headway on the GDI+ porting project. The list of classes which I've ported is growing longer and the list of classes remaining is growing shorter.
Here's the breakdown of the porting thus far:
Finished Classes
----------------
class Brush;
class HatchBrush;
class SolidBrush;
class FontFamily;
class FontCollection;
class InstalledFontCollection;
class PrivateFontCollection;
Partial Classes
----------------
class Graphics; -- this class goes on for EVER!
class Pen; -- all done except for a few functions
class Matrix; -- ditto
class Font; -- ditto
Remaining Classes
-----------------
class Bitmap;
class Metafile;
class GraphicsPath;
class PathIterator;
class Region;
class Image;
class TextureBrush;
class LinearGradientBrush;
class PathGradientBrush;
class ImageAttributes;
class CachedBitmap;
So, as you can see, I've made a dent in the classes and am almost half-way done in terms of classes. However, a the remaining classes have a lot more functionality in them and so they'll take a lot longer to port than the first half of the classes. I'd say I'm about 1/3 of the way done.
The neat new visual things that I've accomplished are: added support for drawing lines, bezier curves, arcs, pies, rectangle and ellipses (ellipsii?). Here's the latest screen shot for my proof-of-concept application:

You'll notice that I drew a rectangle around the string which was drawn (proof that MeasureString works). Then I modified the line caps which the pen uses to be rounded, and drew (from left-to-right, top-to-bottom) a line, an arc, a bezier curve, an ellipse and a pie. You can also see the installed font family list in this screen shot as well. The code for all those goreous things looks like this:[rbcode]
dim gfx as new GdiPlusGraphics( g.Handle( Graphics.HandleTypeHDC ) )
dim myFont as new GdiPlusFont( "MS Sans Serif", 16, FontStyle.Strikeout )
dim origin as new PointF( 10, 10 )
dim brush as new GdiPlusSolidBrush( new GdiPlusColor( 128, 0, 0, 255 ) )
dim theStr as String = "ABCÃÂÃ‘Ã’à ¸Âà ¸‚à ¸ƒ"
dim s as Status
s = gfx.DrawString( theStr, -1, myFont, origin, brush )
dim layout as new SizeF( g.Width - 10, g.Height - 10 )
dim boundingBox as new RectF
s = gfx.MeasureString( theStr, -1, myFont, origin, layout, boundingBox )
dim pen as new GdiPlusPen( new GdiPlusColor( 255, 255, 0, 0 ), 3 )
s = gfx.DrawRectangle( pen, boundingBox )
s = pen.SetWidth( 11 )
s = pen.SetColor( new GdiPlusColor( 255, 0, 0, 255 ) )
s = pen.SetLineCap( LineCap.Round, LineCap.Round, DashCap.Triangle )
s = gfx.DrawLine( pen, 25, 50, 25, 150 )
s = gfx.DrawArc( pen, 30.0, 0.0, 100.0, 100.0, 0, 90 )
s = gfx.DrawBezier( pen, 25, 175, 50, 200, 0, 250, 25, 300 )
s = gfx.DrawEllipse( pen, 60, 175, 50, 100 )
s = gfx.DrawPie( pen, 120, 175, 100, 150, 0, -180 )[/rbcode]
One thing which I should note is: while I am demonstrating the Integer versions of the APIs, there is also a Single version of each of them which does sub-pixel rendering. It just so happens that I test the Single version first, and then implement the Integer version last.
I'm hoping to get to images relatively soon so I can start drawing pictures on the screen. But I suspect that's going to be a huge undertaking; the Image class is daunting enough, but I have to do the Bitmap class as well! I'll also add the last drawing primitive (curve) at some point; I ran out of steam before adding it last night.
All in all, things are moving along really quickly. I'm very pleased with my progress so far, and hopefully it continues to flow.
If you want anything tested, feel free to issue a pre-alpha. I'm sure we can break your spirit with plenty of nit-picking if required ;-)
Heh, perhaps. I'm still not certain what I'm going to do with this project (give it away, sell it, horde it and gloat, etc). So no alphas until I know what I'm doing with that regard.