I see how to set the values for many system attributes, but I don’t see how to obtain the current value of a system attribute. For example, one can set the color to fill shapes via fill(), but how does one determine the current fill value? I would like to be able to save and restore system attributes, so that I can temporarily change them. For example:
// Draw something
drawComplexFigure(); // Changes the fill color several times (saves/restores current fill value)
// draw something using value of fill before call to drawComplexFigure.
My example is specific to fill, but I would like to be able to do this for all system attributes (font, stroke, textSize, textAlign, rectMode, etc).