| Did you know ... | Search Documentation: |
| graphical->_redraw_area |
<-area,
the bounding box of the pixels affected by this graphical.
This method is called by the graphical infra-structure of XPCE and
should never be called directly. See also graphical->draw
and
graphical->compute.
This method may be redefined to create custom graphical
objects. It is not obligatory for the redefinition to call the method of
the super-class. The definition should not apply paint outside the graphical<-area
of the graphical. If there is no simple way to avoid this, use graphical->clip
and graphical->unclip
to ensure this.
The definition can use graphical->draw
to paint other graphical
objects or one or more of the primitive drawing operations listed below:
graphical ->draw_arcDraw ellipse-part or pie-part graphical ->draw_boxDraw rectangle graphical ->draw_fillFill/clear a rectangle graphical ->draw_imageDraw an image object graphical ->draw_lineDraw a line segment graphical ->draw_polyDraw a polygon graphical ->draw_textDraw a string
The pen, colours, etc. may be manipulated using the following methods:
graphical ->save_graphics_stateSave current settings graphical ->restore_graphics_stateRestore old values graphical ->graphics_stateModify graphics state
The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.
Another common approach to create custom graphics is by subclassing class device to define compound graphicals.