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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 124 |
125 void addArc(const FloatPoint&, float radius, float startAngle, float endAngl
e, bool anticlockwise); | 125 void addArc(const FloatPoint&, float radius, float startAngle, float endAngl
e, bool anticlockwise); |
126 void addRect(const FloatRect&); | 126 void addRect(const FloatRect&); |
127 void addEllipse(const FloatPoint&, float radiusX, float radiusY, float rotat
ion, float startAngle, float endAngle, bool anticlockwise); | 127 void addEllipse(const FloatPoint&, float radiusX, float radiusY, float rotat
ion, float startAngle, float endAngle, bool anticlockwise); |
128 void addEllipse(const FloatRect&); | 128 void addEllipse(const FloatRect&); |
129 | 129 |
130 void addRoundedRect(const FloatRect&, const FloatSize& roundingRadii); | 130 void addRoundedRect(const FloatRect&, const FloatSize& roundingRadii); |
131 void addRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const
FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& b
ottomRightRadius); | 131 void addRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const
FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& b
ottomRightRadius); |
132 void addRoundedRect(const RoundedRect&); | 132 void addRoundedRect(const RoundedRect&); |
133 | 133 |
| 134 void addPath(const Path&, const AffineTransform&); |
| 135 |
134 void translate(const FloatSize&); | 136 void translate(const FloatSize&); |
135 | 137 |
136 const SkPath& skPath() const { return m_path; } | 138 const SkPath& skPath() const { return m_path; } |
137 | 139 |
138 void apply(void* info, PathApplierFunction) const; | 140 void apply(void* info, PathApplierFunction) const; |
139 void transform(const AffineTransform&); | 141 void transform(const AffineTransform&); |
140 | 142 |
141 void addPathForRoundedRect(const FloatRect&, const FloatSize& topLeftRadius,
const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const Float
Size& bottomRightRadius); | 143 void addPathForRoundedRect(const FloatRect&, const FloatSize& topLeftRadius,
const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const Float
Size& bottomRightRadius); |
142 void addBeziersForRoundedRect(const FloatRect&, const FloatSize& topLeftRadi
us, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const Fl
oatSize& bottomRightRadius); | 144 void addBeziersForRoundedRect(const FloatRect&, const FloatSize& topLeftRadi
us, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const Fl
oatSize& bottomRightRadius); |
143 | 145 |
144 // Updates the path to the union (inclusive-or) of itself with the given arg
ument. | 146 // Updates the path to the union (inclusive-or) of itself with the given arg
ument. |
145 bool unionPath(const Path& other); | 147 bool unionPath(const Path& other); |
146 | 148 |
147 private: | 149 private: |
148 void addEllipse(const FloatPoint&, float radiusX, float radiusY, float start
Angle, float endAngle, bool anticlockwise); | 150 void addEllipse(const FloatPoint&, float radiusX, float radiusY, float start
Angle, float endAngle, bool anticlockwise); |
149 | 151 |
150 SkPath m_path; | 152 SkPath m_path; |
151 }; | 153 }; |
152 | 154 |
153 #if !ASSERT_DISABLED | 155 #if !ASSERT_DISABLED |
154 PLATFORM_EXPORT bool ellipseIsRenderable(float startAngle, float endAngle); | 156 PLATFORM_EXPORT bool ellipseIsRenderable(float startAngle, float endAngle); |
155 #endif | 157 #endif |
156 | 158 |
157 } | 159 } |
158 | 160 |
159 #endif | 161 #endif |
OLD | NEW |