Skia
2DGraphicsLibrary
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SkAutoCanvasRestore Class Reference

Stack helper class to automatically call restoreToCount() on the canvas when this object goes out of scope. More...

#include <SkCanvas.h>

Inheritance diagram for SkAutoCanvasRestore:

Public Member Functions

 SkAutoCanvasRestore (SkCanvas *canvas, bool doSave)
 
void restore ()
 Perform the restore now, instead of waiting for the destructor. More...
 

Private Attributes

SkCanvasfCanvas
 
int fSaveCount
 

Detailed Description

Stack helper class to automatically call restoreToCount() on the canvas when this object goes out of scope.

Use this to guarantee that the canvas is restored to a known state.

Member Function Documentation

void SkAutoCanvasRestore::restore ( )
inline

Perform the restore now, instead of waiting for the destructor.

Will only do this once.


The documentation for this class was generated from the following file: