Skip to content

Graphics: Canvas bitmap

RichardHerz edited this page Apr 6, 2018 · 2 revisions

HTML canvas elements are used to draw bitmap graphic images using Javascript, and vector graphics mapped to bitmaps.

In the LiveCode project, represent the area of a canvas element in this way:

  1. place a button on the card
  2. set the name of the button with the first word as CANVAS followed by a space and at least one more word - this naming convention is used on export to generate the canvas element
  3. set the style of the button to rectangle
  4. set the showBorder property of the button to true
  5. set the size and location of the button to represent the area of the canvas element

Note that elsewhere in this project I may have used the phrase "plotCanvas" or "plot canvas." Those phrases are meant to represent an LC group and HTML div element into which plots generated by the flot.js library are placed. The flot.js library uses the word "canvas" to describe the div into which it places plots.

Clone this wiki locally