Monday, October 26, 2009

Alex made some headway over the weekend on Project Resistance with the ResistorView and doing some drawing.  Now (on the WinMo classic emulator) it looks like this:

Notice the white border around the bands.  Nicely enough, Alex gave me a bug item for this, so I started looking at it this morning, thinking that maybe the images simply have some non-transparency problem along the edges.  Well, not so simple.  Here's a close up (using Paint.NET if you're curious) along the right edge of a Ring1 Yellow band (the one used for generating this view):

 

You can see that there's nothing wrong here.  What appears to be happening is that pixels with partial transparency (or partial opacity if you're a glass-half-empty kind of person) are getting incorrectly rendered as white.  So now we're off to chase down a redering problem instead of spending time developing logic for our actual business problem.  My off-the-cuff guess is that it's because we're storing the bands as a Bitmap class, which probably has no notion of an alpha channel, and therefore is just replacing these pixels with white.

It's worth noting that just getting this far with drawing has been heavily reliant on non-CF classes, and if my guess on the Bitmap being the problem is corrrect it means that even more of the drawing code will rely on objects not in the CF.  Again, this exemplifies the pain of creating WinMo apps that have the aethetics users have come to expect since iPhone came on the scene.

10/26/2009 11:14:06 AM (Eastern Daylight Time, UTC-04:00)  #    Comments [11]  |