Working with Drawables

From Lianjapedia
Revision as of 06:30, 13 December 2017 by Barrymavin (Talk | contribs)

Jump to: navigation, search

Under construction

Overview

Container and Image objects are drawable.

The draw(operation, args) method can be used to superimpose a drawing on top of a container or image.

You create a "drawing" by issuing a list of drawing operations specified by the draw() method.

Operations consist of: clear, moveto, lineto, point, rectangle, fill, eclipse, image, save, restore, pen, font, brush.

This functionality can be used in data collection applications such as insurance inspection to draw on top of photos.

You can detect mouseDown, mouseUp and mouseMove events by declaring delegates for these and issue draw() operations.

There are several new methods and properties that can be used to draw; mouseDown(), mousex and mousey.

The example_drawable app included in the distribution shows you how to use this functionality.

Example