Project Resistance, Day 4: graphic fixes and more gesturing

We’ve made more today progress on Project Resistance.  It turns out that the earlier bug was indeed due to the fact that in the Compact Framework Color.Transparent is not a transparent color.  How intuitive.  If you do Graphics.Clear(Color.Transparent) what actually occurs is that the underlying bitmap gets filled with white.  We (and by “we” I mean “Alex”) had to create some utility functions to directly manipulate the HDC and do actual transparency. 


Again, it’s more than a little awkward, and how Microsoft might expect the vast majority of developers out there to get this right I’m not sure.  Even if everyone could write this code, I still think they shouldn’t have to.  We should be focused on solving our business problems, not solving platform problems.


At any rate, we got a fix into the code, and I added gesturing support for the resistance bands in the ResistorView as well.


 



You can see that the background is not right, but that’s an offset math issue (again due to the inability to draw transparent controls on a Form) that should be simple to fix.  Yes, the View for the numeric data at the bottom is hideous, but right now it’s simply there to ensure that events get properly wired from the view above, down to the controller and back out.  Making it look good will require work from the graphic designer.


As a side note, Alex seems to be having some difficulties using SVN as a CodePlex client and that’s why the fix took so long to get published.  I’m not having any problems with the TFS client.

One Comment

Leave a Reply