OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2009 Apple Inc. All rights reserved. |
3 * 2006 Rob Buis <buis@kde.org> | 3 * 2006 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2007-2008 Torch Mobile, Inc. | 4 * Copyright (C) 2007-2008 Torch Mobile, Inc. |
5 * Copyright (C) 2013 Google Inc. All rights reserved. | 5 * Copyright (C) 2013 Google Inc. All rights reserved. |
6 * | 6 * |
7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
9 * are met: | 9 * are met: |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 93 |
94 void moveTo(const FloatPoint&); | 94 void moveTo(const FloatPoint&); |
95 void addLineTo(const FloatPoint&); | 95 void addLineTo(const FloatPoint&); |
96 void addQuadCurveTo(const FloatPoint& controlPoint, const FloatPoint& endPoi
nt); | 96 void addQuadCurveTo(const FloatPoint& controlPoint, const FloatPoint& endPoi
nt); |
97 void addBezierCurveTo(const FloatPoint& controlPoint1, const FloatPoint& con
trolPoint2, const FloatPoint& endPoint); | 97 void addBezierCurveTo(const FloatPoint& controlPoint1, const FloatPoint& con
trolPoint2, const FloatPoint& endPoint); |
98 void addArcTo(const FloatPoint&, const FloatPoint&, float radius); | 98 void addArcTo(const FloatPoint&, const FloatPoint&, float radius); |
99 void closeSubpath(); | 99 void closeSubpath(); |
100 | 100 |
101 void addArc(const FloatPoint&, float radius, float startAngle, float endAngl
e, bool anticlockwise); | 101 void addArc(const FloatPoint&, float radius, float startAngle, float endAngl
e, bool anticlockwise); |
102 void addRect(const FloatRect&); | 102 void addRect(const FloatRect&); |
| 103 void addEllipse(const FloatPoint&, float radiusX, float radiusY, float rotat
ion, float startAngle, float endAngle, bool anticlockwise); |
103 void addEllipse(const FloatRect&); | 104 void addEllipse(const FloatRect&); |
104 | 105 |
105 enum RoundedRectStrategy { | 106 enum RoundedRectStrategy { |
106 PreferNativeRoundedRect, | 107 PreferNativeRoundedRect, |
107 PreferBezierRoundedRect | 108 PreferBezierRoundedRect |
108 }; | 109 }; |
109 | 110 |
110 void addRoundedRect(const FloatRect&, const FloatSize& roundingRadii, Rounde
dRectStrategy = PreferNativeRoundedRect); | 111 void addRoundedRect(const FloatRect&, const FloatSize& roundingRadii, Rounde
dRectStrategy = PreferNativeRoundedRect); |
111 void addRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const
FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& b
ottomRightRadius, RoundedRectStrategy = PreferNativeRoundedRect); | 112 void addRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const
FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& b
ottomRightRadius, RoundedRectStrategy = PreferNativeRoundedRect); |
112 void addRoundedRect(const RoundedRect&); | 113 void addRoundedRect(const RoundedRect&); |
113 | 114 |
114 void translate(const FloatSize&); | 115 void translate(const FloatSize&); |
115 | 116 |
116 const SkPath& skPath() const { return m_path; } | 117 const SkPath& skPath() const { return m_path; } |
117 | 118 |
118 void apply(void* info, PathApplierFunction) const; | 119 void apply(void* info, PathApplierFunction) const; |
119 void transform(const AffineTransform&); | 120 void transform(const AffineTransform&); |
120 | 121 |
121 void addPathForRoundedRect(const FloatRect&, const FloatSize& topLeftRadius,
const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const Float
Size& bottomRightRadius, RoundedRectStrategy = PreferNativeRoundedRect); | 122 void addPathForRoundedRect(const FloatRect&, const FloatSize& topLeftRadius,
const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const Float
Size& bottomRightRadius, RoundedRectStrategy = PreferNativeRoundedRect); |
122 void addBeziersForRoundedRect(const FloatRect&, const FloatSize& topLeftRadi
us, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const Fl
oatSize& bottomRightRadius); | 123 void addBeziersForRoundedRect(const FloatRect&, const FloatSize& topLeftRadi
us, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const Fl
oatSize& bottomRightRadius); |
123 | 124 |
124 private: | 125 private: |
125 SkPath m_path; | 126 SkPath m_path; |
126 }; | 127 }; |
127 | 128 |
128 } | 129 } |
129 | 130 |
130 #endif | 131 #endif |
OLD | NEW |