| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 void addLineTo(const FloatPoint&); | 98 void addLineTo(const FloatPoint&); |
| 99 void addQuadCurveTo(const FloatPoint& controlPoint, const FloatPoint& endPoi
nt); | 99 void addQuadCurveTo(const FloatPoint& controlPoint, const FloatPoint& endPoi
nt); |
| 100 void addBezierCurveTo(const FloatPoint& controlPoint1, const FloatPoint& con
trolPoint2, const FloatPoint& endPoint); | 100 void addBezierCurveTo(const FloatPoint& controlPoint1, const FloatPoint& con
trolPoint2, const FloatPoint& endPoint); |
| 101 void addArcTo(const FloatPoint&, const FloatPoint&, float radius); | 101 void addArcTo(const FloatPoint&, const FloatPoint&, float radius); |
| 102 void closeSubpath(); | 102 void closeSubpath(); |
| 103 | 103 |
| 104 void addArc(const FloatPoint&, float radius, float startAngle, float endAngl
e, bool anticlockwise); | 104 void addArc(const FloatPoint&, float radius, float startAngle, float endAngl
e, bool anticlockwise); |
| 105 void addRect(const FloatRect&); | 105 void addRect(const FloatRect&); |
| 106 void addEllipse(const FloatRect&); | 106 void addEllipse(const FloatRect&); |
| 107 | 107 |
| 108 enum RoundedRectStrategy { | 108 void addRoundedRect(const FloatRect&, const FloatSize& roundingRadii); |
| 109 PreferNativeRoundedRect, | 109 void addRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const
FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& b
ottomRightRadius); |
| 110 PreferBezierRoundedRect | |
| 111 }; | |
| 112 | |
| 113 void addRoundedRect(const FloatRect&, const FloatSize& roundingRadii, Rounde
dRectStrategy = PreferNativeRoundedRect); | |
| 114 void addRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const
FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& b
ottomRightRadius, RoundedRectStrategy = PreferNativeRoundedRect); | |
| 115 void addRoundedRect(const RoundedRect&); | 110 void addRoundedRect(const RoundedRect&); |
| 116 | 111 |
| 117 void translate(const FloatSize&); | 112 void translate(const FloatSize&); |
| 118 | 113 |
| 119 const SkPath& skPath() const { return m_path; } | 114 const SkPath& skPath() const { return m_path; } |
| 120 | 115 |
| 121 void apply(void* info, PathApplierFunction) const; | 116 void apply(void* info, PathApplierFunction) const; |
| 122 void transform(const AffineTransform&); | 117 void transform(const AffineTransform&); |
| 123 | 118 |
| 124 void addPathForRoundedRect(const FloatRect&, const FloatSize& topLeftRadius,
const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const Float
Size& bottomRightRadius, RoundedRectStrategy = PreferNativeRoundedRect); | 119 void addPathForRoundedRect(const FloatRect&, const FloatSize& topLeftRadius,
const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const Float
Size& bottomRightRadius); |
| 125 void addBeziersForRoundedRect(const FloatRect&, const FloatSize& topLeftRadi
us, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const Fl
oatSize& bottomRightRadius); | 120 void addBeziersForRoundedRect(const FloatRect&, const FloatSize& topLeftRadi
us, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const Fl
oatSize& bottomRightRadius); |
| 126 | 121 |
| 127 // Updates the path to the union (inclusive-or) of itself with the given arg
ument. | 122 // Updates the path to the union (inclusive-or) of itself with the given arg
ument. |
| 128 bool unionPath(const Path& other); | 123 bool unionPath(const Path& other); |
| 129 | 124 |
| 130 private: | 125 private: |
| 131 SkPath m_path; | 126 SkPath m_path; |
| 132 }; | 127 }; |
| 133 | 128 |
| 134 } | 129 } |
| 135 | 130 |
| 136 #endif | 131 #endif |
| OLD | NEW |