Canvas and Graphics

In this chapter, we will cover the following recipes:

  • Understanding the coordinate system
  • Drawing lines and arrows
  • Writing text on a canvas
  • Adding shapes to the canvas
  • Finding items by their position
  • Moving canvas items
  • Detecting collisions between items
  • Deleting items from a canvas
  • Binding events to canvas items
  • Rendering a canvas into a PostScript file
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset