| OLD | NEW |
| 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_PATH_H_ | 5 #ifndef SKY_ENGINE_CORE_PAINTING_PATH_H_ |
| 6 #define SKY_ENGINE_CORE_PAINTING_PATH_H_ | 6 #define SKY_ENGINE_CORE_PAINTING_PATH_H_ |
| 7 | 7 |
| 8 #include "math.h" | 8 #include "math.h" |
| 9 | 9 |
| 10 #include "sky/engine/core/painting/Rect.h" | 10 #include "sky/engine/core/painting/Rect.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 void lineTo(float x, float y) | 36 void lineTo(float x, float y) |
| 37 { | 37 { |
| 38 m_path.lineTo(x, y); | 38 m_path.lineTo(x, y); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void arcTo(const Rect& rect, float startAngle, float sweepAngle, bool forceM
oveTo) | 41 void arcTo(const Rect& rect, float startAngle, float sweepAngle, bool forceM
oveTo) |
| 42 { | 42 { |
| 43 m_path.arcTo(rect.sk_rect, startAngle*180.0/M_PI, sweepAngle*180.0/M_PI,
forceMoveTo); | 43 m_path.arcTo(rect.sk_rect, startAngle*180.0/M_PI, sweepAngle*180.0/M_PI,
forceMoveTo); |
| 44 } | 44 } |
| 45 | 45 |
| 46 void addOval(const Rect& oval) |
| 47 { |
| 48 m_path.addOval(oval.sk_rect); |
| 49 } |
| 50 |
| 46 void close() | 51 void close() |
| 47 { | 52 { |
| 48 m_path.close(); | 53 m_path.close(); |
| 49 } | 54 } |
| 50 | 55 |
| 51 const SkPath& path() const { return m_path; } | 56 const SkPath& path() const { return m_path; } |
| 52 | 57 |
| 53 private: | 58 private: |
| 54 CanvasPath(); | 59 CanvasPath(); |
| 55 | 60 |
| 56 SkPath m_path; | 61 SkPath m_path; |
| 57 }; | 62 }; |
| 58 | 63 |
| 59 } // namespace blink | 64 } // namespace blink |
| 60 | 65 |
| 61 #endif // SKY_ENGINE_CORE_PAINTING_PATH_H_ | 66 #endif // SKY_ENGINE_CORE_PAINTING_PATH_H_ |
| OLD | NEW |