Plot.DrawPushState

Prototypes

void DrawPushState()

Remarks

This method saves the current state of the drawing subsystem so it can be restored later using Plot.DrawPopState. The state includes the brush characteristics, the pen characteristics, the text characteristics, the active drawing region, and the active coordinate system.

Example
x = { 1 2 3 4 5 6 7 8 };
y = { 2 1 4 5 6 5 6 9 };
declare ScatterPlot plot;
plot = ScatterPlot.Create( "Sample Data", x, y );
plot.DrawUseDataCoordinates();
plot.DrawSetBrushColor( RED );
plot.DrawRectangle( 3, 3, 4, 4, true );
plot.DrawPushState(); /* save the red brush */
plot.DrawSetBrushColor( YELLOW );
plot.DrawSetPenColor( MAGENTA );
plot.DrawRectangle( 4, 4, 5, 5, true );
plot.DrawPopState(); /* restore previous brush and pen */
plot.DrawRectangle( 5, 5, 6, 6, true );
See Also

Plot.DrawPopState
Plot.DrawResetState