Blog
Page: 0 ... 5 ... 10 ... 15 ... 20 ... 25 ... 30 34 35 36 37 38 39 40 41 42 ... 45 ... 50 ... 55 ... 60 ... 65 ... 70
SVG Debug Output For Rendering
Date: 2/5/2007
I've got a bug in my GPath code where in more complicated vector art it misses a segment out and draws incorrectly. So because I can't come up with a simple case to help debug it I've added a lot of logging to the code that is #define'd in and out. I wanted a way to visualize the segments being passed into the rendering stage and so I made the logging output paths in SVG format which I can paste into a file for viewing:

http://memecode.com/images/blog/path-debug.svg

What you see in that image is a lot of segments each making up a vertical part of the vector art. No segment can be horizontal or double back on itself, i.e. it's either purely upwards or purely downwards. The error is in the capital "C" where there is no vertical cap on the bottom ending of the stroke joining segment 32 to segment 37. Thus putting out the in/out segment count for those scan lines and creating a visual artifact to the right of that missing segment.

I created the random colours with:
printf("color=\"%06.6X\"", rand() % 0xffffff);


I just thought this method of creating visual debugging info was cute and might be useful to others working with graphical things.

Update: Bug is fixed. But man that code is a mess. I really never want to have to touch it again.
(0) Comments | Add Comment

O Thunderbird you art hilarious...
Date: 2/5/2007
WWDC Scam:


Haw haw.
(0) Comments | Add Comment

Scribe/Mac Beta
Date: 20/4/2007
A new build of Scribe for the Mac has been released and it's had a lot of work poured into it. I expect that most things work now so I'm calling it beta instead of alpha. The change list for Test16 is epic.

I'm now using it as my main mail client to get some miles on the code base. So far so good. I've left it running for days on end with no crashes or out of character memory usage.

A Win32 release will follow shortly. However the Linux port is really broken, I'm having all sorts of trouble fixing some X protocol errors. Although I'm learning a lot more about X than I really wanted to know. I've rewritten the window manager support for the Linux port and it'd be really nice to get that out in the field.

There is a intermittent crash in the account connection shutdown code. This is the main thing blocking the windows build from being labeled "stable".
(3) Comments | Add Comment

Recursive Grep On Multiple File Types
Date: 19/4/2007
This is how I script a recursive grep for source code:
find . \( -iname "*.cpp" -or -iname "*.h" \) -exec grep -nH "$1" {} \;
There might be a way of automating the list of extensions to search, or letting the user supply that in a command line argument but my script foo is not up to converting that to the argument format required by "find".
(0) Comments | Add Comment

Why what a sweet sound...
Date: 16/4/2007
...that of 1000 billboards being cut down.

Now who do I have to write to so that happens in my city?

Update: Now with photos! :)
(0) Comments | Add Comment

Mac Scribe
Date: 12/4/2007
I've been tinkering away on the Mac build of Scribe everyday working on the hard to find little bugs that get left over after all the easy stuff is done. And I had some doozy bugs this week. The first was caused by OS X doing sub-pixel kerning and that mixed with per word metrics in the edit control didn't work. But I eventually nailed that, after spending far too long barking up the wrong trees. Then I had a weird issue where some text would be painted in the wrong colour, even though I checked and re-checked I was passing in the right colours. So it turns out that some of the views were actually attached to the view heirarchy and by way of Lgi's virtual view code were getting kinda painted anyway. So I fixed that and in doing so broke a bunch of other stuff, lots of window weren't attaching at the right place. So it took a while to sort that out. Then some text still wasn't getting painted in the right colour. So I started poking around again and I noticed that openning a mail window would cause the bug to appear. So begins some hours of commenting out parts of code, checking if the bug appears, and then commenting out other parts of code etc. I eventually isolated the problem and found I was reallocating the SysFont handle that had previously been used to create GDisplayString object (text laid out for display) and of course chaos ensued.

But it's getting very close to being ready for a beta release. I've started fixing things in the calendar as well. Thats coming along nicely. I also still need to fix the dynamically generated sub-menus in the main window and show an empty menu when a window other than the main app window is shown, otherwise I get all sorts of weird commands from the menu ending up in say a mail window. Although that might not be the best solution. Still thinking about that.
(0) Comments | Add Comment