| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 void addArc(const FloatPoint&, float radius, float startAngle, float endAngl
e, bool anticlockwise); | 105 void addArc(const FloatPoint&, float radius, float startAngle, float endAngl
e, bool anticlockwise); |
| 106 void addRect(const FloatRect&); | 106 void addRect(const FloatRect&); |
| 107 void addEllipse(const FloatPoint&, float radiusX, float radiusY, float rotat
ion, float startAngle, float endAngle, bool anticlockwise); | 107 void addEllipse(const FloatPoint&, float radiusX, float radiusY, float rotat
ion, float startAngle, float endAngle, bool anticlockwise); |
| 108 void addEllipse(const FloatRect&); | 108 void addEllipse(const FloatRect&); |
| 109 | 109 |
| 110 void addRoundedRect(const FloatRect&, const FloatSize& roundingRadii); | 110 void addRoundedRect(const FloatRect&, const FloatSize& roundingRadii); |
| 111 void addRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const
FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& b
ottomRightRadius); | 111 void addRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const
FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& b
ottomRightRadius); |
| 112 void addRoundedRect(const RoundedRect&); | 112 void addRoundedRect(const RoundedRect&); |
| 113 | 113 |
| 114 void addPath(const Path&, const AffineTransform&); |
| 115 |
| 114 void translate(const FloatSize&); | 116 void translate(const FloatSize&); |
| 115 | 117 |
| 116 const SkPath& skPath() const { return m_path; } | 118 const SkPath& skPath() const { return m_path; } |
| 117 | 119 |
| 118 void apply(void* info, PathApplierFunction) const; | 120 void apply(void* info, PathApplierFunction) const; |
| 119 void transform(const AffineTransform&); | 121 void transform(const AffineTransform&); |
| 120 | 122 |
| 121 void addPathForRoundedRect(const FloatRect&, const FloatSize& topLeftRadius,
const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const Float
Size& bottomRightRadius); | 123 void addPathForRoundedRect(const FloatRect&, const FloatSize& topLeftRadius,
const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const Float
Size& bottomRightRadius); |
| 122 void addBeziersForRoundedRect(const FloatRect&, const FloatSize& topLeftRadi
us, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const Fl
oatSize& bottomRightRadius); | 124 void addBeziersForRoundedRect(const FloatRect&, const FloatSize& topLeftRadi
us, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const Fl
oatSize& bottomRightRadius); |
| 123 | 125 |
| 124 // Updates the path to the union (inclusive-or) of itself with the given arg
ument. | 126 // Updates the path to the union (inclusive-or) of itself with the given arg
ument. |
| 125 bool unionPath(const Path& other); | 127 bool unionPath(const Path& other); |
| 126 | 128 |
| 127 private: | 129 private: |
| 128 void addEllipse(const FloatPoint&, float radiusX, float radiusY, float start
Angle, float endAngle, bool anticlockwise); | 130 void addEllipse(const FloatPoint&, float radiusX, float radiusY, float start
Angle, float endAngle, bool anticlockwise); |
| 129 | 131 |
| 130 SkPath m_path; | 132 SkPath m_path; |
| 131 }; | 133 }; |
| 132 | 134 |
| 133 #if !ASSERT_DISABLED | 135 #if !ASSERT_DISABLED |
| 134 PLATFORM_EXPORT bool ellipseIsRenderable(float startAngle, float endAngle); | 136 PLATFORM_EXPORT bool ellipseIsRenderable(float startAngle, float endAngle); |
| 135 #endif | 137 #endif |
| 136 | 138 |
| 137 } | 139 } |
| 138 | 140 |
| 139 #endif | 141 #endif |
| OLD | NEW |