Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 96 - 2615_KEC
P. 96

    Drawing blocks:  These  blocks
                        are used to draw shapes, text
                        and images on the Canvas.

                        o  Call      Canvas.DrawCircle
                           (centerX, centerY, radius,
                           fill): Draws a circle at  the
                           specified coordinates with a
                           given radius.

                        o  Call  Canvas.DrawLine  (x1,
                           y1, x2, y2): Draws  a line

                           between  two  points  (x1,  y1)
                           and (x2, y2).
                        o  Call  Canvas.DrawPoint  (x,
                           y): Draws a  single  point  at

                           the specified coordinates.
                        o  Call     Canvas.DrawShape

                           (pointList,     fill):   Draws
                           a shape  using a list of
                           coordinates.

                        o  Call Canvas.DrawText (text, x, y): Draws text at the specified coordinates.

                        o  Call Canvas.DrawTextAtAngle  (text, x, y, angle): Draws  text  at  the  specified
                           coordinates and angle.
                         Touch  and Gesture Blocks: These blocks  handle touch  and gesture  events on the
                        Canvas.

                        o  When Canvas.Touched (x, y, touchedAnySprite): Triggered when the user touches
                           the Canvas. Provides the coordinates (x, y) of the touch.

                        o  When  Canvas.Dragged  (startX,  startY, currentX,  currentY,  prevX, prevY,
                           draggedAnySprite): Triggered  when the  user drags  their  finger on  the  Canvas.
                           Provides the coordinates (x, y) of the drag.

                        o  When Canvas.TouchUp (x, y): Triggered when the user lifts their finger from the
                           Canvas. Provides the coordinates (x, y) of the release.

                        o  When  Canvas.TouchDown  (x, y): Triggered  when the  user initially  touches  the
                           Canvas. Provides the coordinates (x, y) of the touch.

                        o  When Canvas.Flung (x, y, speed, heading, xvel, yvel, flungSprite): Triggered when
                           the user flings (swipes quickly) on the Canvas. Provides the coordinates (x, y), speed

                           and heading of the fling.

                       94   Premium Edition-V

| 91 92 93 94 95 96 97 98 99 100 101 |