Reference for pop_style
Restore a previously saved styling. This is part of the reference section.
Arc
Buffer
Data
Dialog
Ellipse
Geo Utils
Image
Joystick (future)
Keyboard
Line
Mouse / Touchscreen
Pixel
Rectangle
Renderers
Shape
Sound (future)
Style
pop_style
System
Text
Transform
Purpose
Restore the most recently saved styling configuration saved in style history, removing that styling from the history. This works as a stack (like a stack of plates) where the top of the pile is taken off and restored, removing it from that stack. This will overwrite the current style configuration in the sketch.
Snippet
Save a green fill and restore it later to draw a green rectangle.
sketch.set_fill('#00C000') # Set fill to green sketch.push_style() # Save the current styling sketch.set_fill('#C00000') # Set it to red sketch.pop_style() # Restore saved styling so fill is green again sketch.rect(50, 100, 150, 200)
Examples
Availability
Available on all platforms.