Painting with a brush - 14 November 07

This uses the NextWindow touchsceen technology. You can find this in products like the HP touchsmart PC.

The touchscreen raises a special set of UMAJIN event called touch events.

- on_touch_down
- on_touch_move
- on_touch_up

These events pass you x, y, width, height and mod (which finger or modifier keyboard key is pressed).

Just like we raise mouse and pen events, the touch events allow you to take advantage of special features of the device.

Here Minoru is 'writing' on the touchscreen using a painbrush. As the bristles splay out the width and height of the touch area increases. I use this information to modulate the width of the stroke creating a nice caligraphic effect.

The other feature worth noting is I created four different paint textures. As the stroke becomes longer I swap up to a longer paint texture. This stops the natural paint look from being squashed or stretched.