1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_GFX_SCOPED_CANVAS_H_
6 #define UI_GFX_SCOPED_CANVAS_H_
8 #include "ui/gfx/canvas.h"
12 // Saves the drawing state, and restores the state when going out of scope.
15 explicit ScopedCanvas(gfx::Canvas
* canvas
) : canvas_(canvas
) {
23 void SetCanvas(gfx::Canvas
* canvas
) {
33 DISALLOW_COPY_AND_ASSIGN(ScopedCanvas
);
38 #endif // UI_GFX_SCOPED_CANVAS_H_