All Manuals > CAPI User Guide and Reference Manual > 23 LW-GT Reference Entries

NextPrevUpTopContentsIndex

make-a-drawing-call

make-draw-arc

make-draw-circle

make-draw-ellipse

make-draw-line

make-draw-lines

make-draw-polygon

make-draw-rectangle

Functions
Summary

Create and return an apply-drawing-object.

Package

lw-gt

Signatures

make-a-drawing-call function arguments &optional pass-pane-p => apply-drawing-object

make-draw-arc x y width height start-angle sweep-angle &rest args => apply-drawing-object

make-draw-circle x y radius &rest args => apply-drawing-object

make-draw-ellipse x y x-radius y-radius &rest args => apply-drawing-object

make-draw-line from-x from-y to-x to-y &rest args => apply-drawing-object

make-draw-lines lines &rest args => apply-drawing-object

make-draw-polygon points &rest args => apply-drawing-object

make-draw-rectangle x y width height &rest args => apply-drawing-object

Arguments

See below.

Values

apply-drawing-object

An apply-drawing-object.

Description

Each of the functions make-a-drawing-call, make-draw-line, make-draw-lines, make-draw-polygon, make-draw-ellipse, make-draw-circle, make-draw-rectangle and make-draw-arc creates and returns an apply-drawing-object.

For make-a-drawing-call, the drawing is done by applying the function function to arguments . When pass-pane-p is true, function is applied to the "root pane" (see drawing-object) followed by arguments . function should typically draw something, but it does not have to, and may do other things. The default value of pass-pane-p is true.

For the other functions, the drawing is done using the corresponding Graphics Ports function:

make-draw-arc

draw-arc

make-draw-circle

draw-circle

make-draw-ellipse

draw-ellipse

make-draw-line

draw-line

make-draw-lines

draw-lines

make-draw-polygon

draw-polygon

make-draw-rectangle

draw-rectangle

The arguments for each of these functions are the same as the arguments of the corresponding Graphics Ports function (but the y is interpreted from the bottom, see below), excluding the first argument ( pane ).

Once created, the drawing object can be used in the drawing-object slot of an objects-displayer or a pinboard-objects-displayer, but more commonly it would be passed to one of the positioning/fitting functions (position-object, fit-object and so on), which will position and scale it with, by drawing the object inside a context of Graphics Ports transformation.

At the top level, the y coordinate is reversed, so the y argument is measured from the bottom of the objects-displayer or pinboard-objects-displayer, as opposed to the default which is from the top down. A fitting object in the hierarchy may change that.

apply-drawing-objects can be used repeatedly and concurrently in the same or different panes. The ones that are created by the make-draw-* functions are fixed, but for objects created by make-a-drawing-call, the supplied function may depend on values that change, and hence needs to be redisplayed when these values change. Use force-objects-redraw on the root of the hierarchy (an objects-displayer or a pinboard-objects-displayer) to do that.

See drawing-object for description of the drawing operation.

See also

objects-displayer
pinboard-objects-displayer
position-object
fit-object
position-and-fit-object
Lower level - drawing objects and objects displayers


CAPI User Guide and Reference Manual (Unix version) - 3 Aug 2017

NextPrevUpTopContentsIndex