Documentation for gcanvas.ew v0.10.5
Table of Contents

Grid

Controls automatic grid drawing on the canvas


  • proc getGfxCanvasGridData(integer canvasID)    Get the grid data from the canvas, see GR_* for the meanings.
  • const GRID_*    Types of grid to be drawn, see setGfxCanvasGrid
  • const GR_*    sequence field positions for grid data for setGfxCanvasGridData and getGfxCanvasGridData
  • func setGfxCanvasGrid(integer canvasID, object params, integer gridtype, atom colour)   Set the type of grid (if any) is displayed on the canvas
  • proc setGfxCanvasGridData(integer canvasID, sequence griddata)    Set the grid data of the canvas, usually from data obtained from getGfxCanvasGridData

    Documentation for gcanvas.ew v0.10.5
    Table of Contents

    [proc]
    getGfxCanvasGridData
    (integer canvasID)

    Get the grid data from the canvas, see GR_* for the meanings.

    Category: Grid

    See Also: GRID_*, GR_*, setGfxCanvasGrid, setGfxCanvasGridData


    Documentation for gcanvas.ew v0.10.5
    Table of Contents

    [const]
    GRID_*

    Types of grid to be drawn, see setGfxCanvasGrid

    Category: Grid

    GRID_DOT is the only type currently implemented, since the grid is drawn OVER the rendered canvas...
    GRID_LINE would be a typical lined grid
    GRID_CHECKER would be an alternating grey/light grey checker pattern (like Gimp)

    See Also: getGfxCanvasGridData, GR_*, setGfxCanvasGrid, setGfxCanvasGridData


    Documentation for gcanvas.ew v0.10.5
    Table of Contents

    [const]
    GR_*

    sequence field positions for grid data for setGfxCanvasGridData and getGfxCanvasGridData

    Category: Grid

    GR_SPACE_X is the spacing between the vertical lines or dot columns
    GR_SPACE_Y is the spacing between the horizontal lines or dot rows
    GR_COLOUR GR_COLOR is the colour of the lines or dots, but ignored by GRID_CHECKER type
    GR_TYPE is on of the GRID_* constants

    See Also: getGfxCanvasGridData, GRID_*, setGfxCanvasGrid, setGfxCanvasGridData


    Documentation for gcanvas.ew v0.10.5
    Table of Contents

    [func]
    setGfxCanvasGrid
    (integer canvasID, object params, integer gridtype, atom colour)

    Set the type of grid (if any) is displayed on the canvas

    Category: Grid


    There is currently only one type implemented and the way this works may change
    as currently the grid is drawn last and it should probably be drawn first :-)
    params is either a single integer for both the x and y spacing of the grid (ie for both)
    or it is a sequence of {x,y} for an unequal horizontal and vertical spacing
    supply 0 to params in order to suppress the drawing of the grid
    gridtype is either GRID_DOT or one of the unimplemented types GRID_LINE or GRID_CHECKER see GRID_*
    colour is the colour of the grid

    See Also: getGfxCanvasGridData, GRID_*, GR_*, setGfxCanvasGridData


    Documentation for gcanvas.ew v0.10.5
    Table of Contents

    [proc]
    setGfxCanvasGridData
    (integer canvasID, sequence griddata)

    Set the grid data of the canvas, usually from data obtained from getGfxCanvasGridData

    Category: Grid

    See Also: getGfxCanvasGridData, GRID_*, GR_*, setGfxCanvasGrid