OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2014 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 #ifndef SkImage_BitmapBase_DEFINED |
| 9 #define SkImage_BitmapBase_DEFINED |
| 10 |
| 11 #include "SkImage_Base.h" |
| 12 |
| 13 class SkBitmap; |
| 14 |
| 15 class SkImage_BitmapBase : public SkImage_Base { |
| 16 public: |
| 17 SkImage_BitmapBase(int width, int height); |
| 18 SkImage_BitmapBase(const SkBitmap&); |
| 19 virtual ~SkImage_BitmapBase(); |
| 20 |
| 21 virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) const
SK_OVERRIDE; |
| 22 virtual void onDrawRectToRect(SkCanvas*, const SkRect* src, const SkRect& ds
t, |
| 23 const SkPaint*) const SK_OVERRIDE; |
| 24 |
| 25 virtual SkShader* onNewShader(SkShader::TileMode, |
| 26 SkShader::TileMode, |
| 27 const SkMatrix* localMatrix) const SK_OVERRIDE
; |
| 28 |
| 29 virtual bool isOpaque() const SK_OVERRIDE; |
| 30 |
| 31 protected: |
| 32 virtual const SkBitmap& getBitmap() const; |
| 33 |
| 34 private: |
| 35 SkBitmap fBitmap; |
| 36 |
| 37 typedef SkImage_Base INHERITED; |
| 38 }; |
| 39 |
| 40 #endif /* SkImage_BitmapBase_DEFINED */ |
| 41 |
OLD | NEW |