Driver - Enhanced FEZ Touch Driver

[title]Enhanced FEZ Touch Driver[/title]
This is an enhanced FEZ touch driver that builds upon the original GHI driver and the work of jasdev.

-Drawing functions optimized for speed / code size
-Bug fixes for display rotations
-Added basic geometric constructs: line, rectangle, point

I reverted back to the GHI fixed size font class as the proportional fonts were too slow for my current project. I do think the proportional fonts could be sped up quite a bit and the driver could be modified to allow either system to be ‘plugged in’.

Something is wonky with the file upload feature of the code site. It kept trying to upload forever when using IE but uploaded fine with FireFox. I just posted some code the other day using IE, has there been a change in the last week or so?

Nothing has changed. It’s an issue with IE that we’ll need to address.

Thanks Josh. Without the file attchment the rest of the page submitted fine.


This is very cool 8)

Thank you!

the clearscreen method is not using the passed color : this is how you have it

public void ClearScreen(Color color)
FillRectangle(new Rectangle(0, 0, Width - 1, Height - 1), FEZ_Components.FEZTouch.Color.White);

I changed the code (but i wanted to let you know) to :

       public void ClearScreen(Color color)
            FillRectangle(new Rectangle(0, 0, Width - 1, Height - 1),color);


please use code tags to increase readability

Thanks for catching that. I’ll re-upload the code. Not sure how that bug snuck in there, must have been due to reverting to a previous version at one point.

I ran the code with a Fez Panda II and a fez touch. I am getting a blank white screen. this is the case with all the projects. not sure what i am doing wrong. please help…

when i touch the screen i hit breakpoints but nothing is shown on the screen.

The original post states “Drawing functions optimized for speed / code size”. Any stats or unscientific “gut feel” measurements/analogies?

Eg: wow, It really blows the doors of the old version, noticeably faster, etc.

Thanks for the improved driver.

Here is some of the notes I kept. For example in DrawLine, Base
was GHI’s draw line implementation. The next line was how it worked in the 2.3 driver, the rest are with various things tried. In the end using the Bezier line was just a little slower and using point/slope but the Bezier implementation was a lot simpler and saved a many lines of code.


Base (100)		= 15341ms
2.x (100) SetDrawing	= 35862ms 
2.x (100) SetPixel	= 15934ms
2.x (100) SP Float	= 15864ms
2.x (100) ushort	= 15754ms
2.x (100) X iterator	= 15742ms
2.x (100) int setpixel	= 15396ms
2.x (100) Line Struct	= 16126ms


Base (100)		= 8253ms
2.x (100)		= 6478ms
2.x (100) Rect struct	= 6513ms


Base (100)		= 2586ms
2.x (100)		= 2616ms
2.x (100) Rect Struct	= 2692ms


Base (100)		= 10839ms
2.x (100)		= 8833ms
2.x (100) no copy, rect	= 8990ms