| Did you know ... | Search Documentation: |
| graphical->graphics_state |
|pixmap],
background=[colour|pixmap]..., send(Gr, graphics_state, pen := 2, colour := red), ...
It is not allowed to return from graphical->_redraw_area
with a modified state. Therefore redraw-methods that modify the state
should normally use graphical->save_graphics_state
and graphical->restore_graphics_state.
Here is a typical example, drawing a thicker line.
'_redraw_area'(MyGr, Area:area) :->
send(MyGr, save_graphics_state),
send(MyGr, graphics_state, pen := 2),
send(MyGr, draw_line, 0,0,100,100),
send(MyGr, restore_graphics_state).
NOTE: It is generally advised to paint graphical objects that require the same graphics state together. So, if you need to paint alternating thick and thin lines, first draw all thick lines and then all thin lines instead of switching the state between each line.