| Did you know ... | Search Documentation: |
| Instance variables |
|gradient|image|{foreground,background}*->background:
background).<-status
of a figure is a name indicating which graphicals of the figure should
be visible: if figure<-status
equals all_active, all
device<-graphicals
are visible, otherwise only graphicals with the same name as figure<-status
are made visible.
This mechanism may be used to define graphical
objects that should be switched between different states. Consider the
example where we want to have a diagram which can be displayed opened
and as an icon. The code below outlines a possible
approach:
create_closable_diagram(F) :-
new(F, figure),
send(F, status, opened),
send(F, display, new(BM, bitmap('my_icon'))),
send(BM, name, closed),
send(BM, recogniser,
click_gesture(left, '', double,
message(F, status, opened),
send(F, display, new(F2, figure)),
send(F2, name, opened),
...
<create the real diagram on F2>
<-pen
to draw a visible frame at a distance from the contents.<-pen/figure<-elevation.
0 yields a square outline.elevation object describing a 3-D appearance (raised,
sunken, shadow, ...) of the figure's box. @nil
disables the effect.|shadow*normal
paints it over what is below. The other modes are those of Cairo and CSS mix-blend-mode, e.g., multiply
darkens what is below by the colours of the figure, as overlapping
transparent inks would. A figure that is not normal is
drawn on a temporary surface, as is one with graphical<-opacity
below 1, which is combined with the blend mode.
Defaults: normal
<-fill_rule.
The points of the path are in the coordinate system of the graphicals of
the figure, so the clipping region moves, rotates and scales with them
under figure<-transform.
The path itself is not displayed. Clipping affects drawing only:
graphicals that are clipped away still receive events. After modifying
the path, send figure->clip_path
again to redraw the figure.
Defaults: @nil
transform applied to the figure's
contents.
@nil means no
transform. The transform is applied to the children while drawing,
hit-testing and computing the bounding box, so a rotated/scaled figure
is still selectable by the mouse and reports a tight bounding box in its
parent's coordinates. The convenience methods figure->translate, figure->scale, figure->rotate
and figure->shear
compose operations into this transform without the caller having to
manage the transform
object explicitly.->compute.
Damage handling and child event dispatch use this to keep paint and hit
tests correct under rotation/scale.