Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter::DlAutoCanvasRestore Class Reference

#include <dl_canvas.h>

Public Member Functions

 DlAutoCanvasRestore (DlCanvas *canvas, bool do_save)
 
 ~DlAutoCanvasRestore ()
 
void Restore ()
 

Detailed Description

Definition at line 239 of file dl_canvas.h.

Constructor & Destructor Documentation

◆ DlAutoCanvasRestore()

flutter::DlAutoCanvasRestore::DlAutoCanvasRestore ( DlCanvas canvas,
bool  do_save 
)
inline

Definition at line 241 of file dl_canvas.h.

241 : canvas_(canvas) {
242 if (canvas) {
243 canvas_ = canvas;
244 restore_count_ = canvas->GetSaveCount();
245 if (do_save) {
246 canvas_->Save();
247 }
248 } else {
249 canvas_ = nullptr;
250 restore_count_ = 0;
251 }
252 }
virtual void Save()=0

◆ ~DlAutoCanvasRestore()

flutter::DlAutoCanvasRestore::~DlAutoCanvasRestore ( )
inline

Definition at line 254 of file dl_canvas.h.

Member Function Documentation

◆ Restore()

void flutter::DlAutoCanvasRestore::Restore ( )
inline

Definition at line 256 of file dl_canvas.h.

256 {
257 if (canvas_) {
258 canvas_->RestoreToCount(restore_count_);
259 canvas_ = nullptr;
260 }
261 }
virtual void RestoreToCount(int restore_count)=0

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