PpopStyle
processing
The PpushStyle
function saves the current style settings and PpopStyle
restores the prior settings; these functions are always used together. They allow you to change the style settings and later return to what you had. When a new style is started with PpushStyle
, it builds on the current style information. The PpushStyle
and PpopStyle
functions can be nested to provide more control (see example for a demonstration.)
Link to original Processing doc
PpopStyle is available since version 1.0.0.
See also
Signatures
Examples
// @preview image
100 100 '2D3' PGraphics
130 Pbackground //gray
0 50 33 33 Pellipse //default style, left circle
PpushStyle // Start a new style
10 PstrokeWeight
204 103 0 Pfill
33 50 33 33 Pellipse //left middle circle
PpushStyle // Start another new style
0 102 153 Pstroke
66 50 33 33 Pellipse //right middle circle
PpopStyle //restore previous style
PpopStyle // Restore original style
100 50 33 33 Pellipse //right circle
Pencode