Glimmr Canvas-Based Drawing

version 2/101030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter - Element properties related to the canvas

    A g-element has a g-canvas called the associated canvas.

    [We can say that a given element "is displayed on" a canvas, or that a canvas "displays" an element.]

    Displayedness relates a g-element (called A) to a g-canvas (called B) when B is the associated canvas of A. The verb to be displayed on implies the displayedness relation.

    The verb to display (he displays, they display, he displayed) implies the reversed displayedness relation.

    [The origin, layer, alignment, and scaling factors are specified by the author and represent the positioning of the element in relation to the canvas.]
    A g-element has a list of numbers called the origin. The origin of a g-element is usually {0, 0}.

    A g-element has a number called the display-layer. The display-layer of a g-element is usually 1.

    A g-element has a real number called the scaling factor. The scaling factor of a g-element is usually 1.0000. The scaling factor property translates into I6 as "scaling_factor".

    [These are used only if asymmetrical scaling is enabled.]
    A g-element has a real number called the x-scaling factor. The x-scaling factor of a g-element is usually 1.0000. The x-scaling factor property translates into I6 as "x_factor".

    A g-element has a real number called the y-scaling factor. The y-scaling factor of a g-element is usually 1.0000. The y-scaling factor property translates into I6 as "y_factor".

    A g-element can be left-aligned, center-aligned, or right-aligned (this is its alignment property). A g-element is usually left-aligned.