Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Side by Side Diff: sky/engine/core/painting/Canvas.h

Issue 1204783003: Adds basic sprite sheet support to sprites (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Adds basic sprite sheet support to sprites (fixed issues) Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SKY_ENGINE_CORE_PAINTING_CANVAS_H_ 5 #ifndef SKY_ENGINE_CORE_PAINTING_CANVAS_H_
6 #define SKY_ENGINE_CORE_PAINTING_CANVAS_H_ 6 #define SKY_ENGINE_CORE_PAINTING_CANVAS_H_
7 7
8 #include "sky/engine/core/painting/CanvasPath.h" 8 #include "sky/engine/core/painting/CanvasPath.h"
9 #include "sky/engine/core/painting/Paint.h" 9 #include "sky/engine/core/painting/Paint.h"
10 #include "sky/engine/core/painting/Picture.h" 10 #include "sky/engine/core/painting/Picture.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void drawPaint(const Paint* paint); 50 void drawPaint(const Paint* paint);
51 void drawRect(const Rect& rect, const Paint* paint); 51 void drawRect(const Rect& rect, const Paint* paint);
52 void drawRRect(const RRect* rrect, const Paint* paint); 52 void drawRRect(const RRect* rrect, const Paint* paint);
53 void drawOval(const Rect& rect, const Paint* paint); 53 void drawOval(const Rect& rect, const Paint* paint);
54 void drawCircle(float x, float y, float radius, const Paint* paint); 54 void drawCircle(float x, float y, float radius, const Paint* paint);
55 void drawPath(const CanvasPath* path, const Paint* paint); 55 void drawPath(const CanvasPath* path, const Paint* paint);
56 void drawImage(const CanvasImage* image, 56 void drawImage(const CanvasImage* image,
57 float x, 57 float x,
58 float y, 58 float y,
59 const Paint* paint); 59 const Paint* paint);
60 void drawImageRect(const CanvasImage* image, Rect& src, Rect& dst, Paint* pa int);
60 61
61 SkCanvas* skCanvas() { return m_canvas; } 62 SkCanvas* skCanvas() { return m_canvas; }
62 63
63 protected: 64 protected:
64 PassRefPtr<DisplayList> finishRecording(); 65 PassRefPtr<DisplayList> finishRecording();
65 66
66 bool isRecording() const { return m_canvas; } 67 bool isRecording() const { return m_canvas; }
67 68
68 private: 69 private:
69 FloatSize m_size; 70 FloatSize m_size;
70 RefPtr<DisplayList> m_displayList; 71 RefPtr<DisplayList> m_displayList;
71 SkCanvas* m_canvas; 72 SkCanvas* m_canvas;
72 }; 73 };
73 74
74 } // namespace blink 75 } // namespace blink
75 76
76 #endif // SKY_ENGINE_CORE_PAINTING_CANVAS_H_ 77 #endif // SKY_ENGINE_CORE_PAINTING_CANVAS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698