Jump to navigation

Poupou's Corner of the Web

Looking for perfect security? Try a wireless brick.
Otherwise you may find some unperfect stuff here...


No so random links

On the visual side, the new region code is now in SVN along with the samples I used during it's development. As a good citizen (and at Miguel's request ;-), I have even documented the whole approach. As a bonus you also get some basic instructions on how to use Valgrind to debug memory leaks with Mono.

Further work on libgdiplus has fixed a lot of small bugs and we almost have clipping under control. Here's ZedGraph from a few weeks ago versus today (SVN). As you can see there is still work to do on the gradient brushes to get the intended results.

On the invisible (dark?) side, I've added a new rule to Gendarme. It is a very simple portability rule that checks where your code use \r and/or \n instead of Environment.NewLine. The main purpose was to show (again) how easy it is to use Mono.Cecil.dll to create a new rule. Sample is complete with the Makefile modifications and the unit tests!

3/31/2006 09:51:41 | Comments | Permalink

One last time ?

I completed the matrix support for every region case (I could think of). So this may very well be the last screenshot of the path-based region saga.

The intersection result (in blue) is translated by 50,50 pixels.

Now it's time to tests, clean and document the new sources and test applications.

3/14/2006 23:17:40 | Comments | Permalink

GDI+ Scans

Adding path-based regions involves re-writing a lot of existing GdipRegion* functions. However this is done so the actual, rectangle-based, code can co-exist with the new, path-based, code (i.e. yes, we're keeping the existing, working, code in there). Hopefully the new bugs won't affect too much existing applications depending on System.Drawing.dll.

In some case the new code is simpler - or at least simple enough. In other case the new code is more complex, sometimes only because the original code could be so simple, like for GdipGetRegionScans[Count]. Anyway so far I seem quite lucky with the current approach :-)

The original region (in blue) and the scans (in red), representing the
same shape using an array of rectangles, after the matrix is applied.

3/7/2006 22:18:47 | Comments | Permalink

Colorful Regions

Work on non-rectangular regions is progressing nicely. At least it's progressed enough that I can make screenshots again :-)

All the combine modes are supported, which means it's possible to do Union, Intersection, Complement, Excude and Xor on any shape using System.Drawing.

An intersection (blue) between two shapes (red and green)

An xor (blue) between the same two shapes (not displayed)

An complement (blue) between the two transformed shapes

Still more work is needed to transform (GdipTransformRegion) once a binary operation has been executed on a region (which is why Matrix #3 combobox is empty). And of course it needs tests, lots of them...

3/3/2006 10:47:41 | Comments | Permalink

The views expressed on this website/weblog are mine alone and do not necessarily reflect the views of my employer.