|
Lines 129-134
static inline void appendArc(Vector<FloatPoint>& vertices, const FloatPoint& arc
a/Source/WebCore/rendering/ExclusionPolygon.cpp_sec1
|
| 129 |
vertices.append(endArcVertex); |
129 |
vertices.append(endArcVertex); |
| 130 |
} |
130 |
} |
| 131 |
|
131 |
|
|
|
132 |
static inline void snapVerticesToLayoutUnitGrid(Vector<FloatPoint>& vertices) |
| 133 |
{ |
| 134 |
for (unsigned i = 0; i < vertices.size(); ++i) |
| 135 |
vertices[i].set(LayoutUnit(vertices[i].x()).toFloat(), LayoutUnit(vertices[i].y()).toFloat()); |
| 136 |
} |
| 137 |
|
| 132 |
static inline FloatPolygon *computeShapePaddingBounds(const FloatPolygon& polygon, float padding, WindRule fillRule) |
138 |
static inline FloatPolygon *computeShapePaddingBounds(const FloatPolygon& polygon, float padding, WindRule fillRule) |
| 133 |
{ |
139 |
{ |
| 134 |
Vector<FloatPoint>* paddedVertices = new Vector<FloatPoint>(); |
140 |
Vector<FloatPoint>* paddedVertices = new Vector<FloatPoint>(); |
|
Lines 146-151
static inline FloatPolygon *computeShapePaddingBounds(const FloatPolygon& polygo
a/Source/WebCore/rendering/ExclusionPolygon.cpp_sec2
|
| 146 |
appendArc(*paddedVertices, thisEdge.vertex1(), padding, prevOffsetEdge.vertex2(), thisOffsetEdge.vertex1(), true); |
152 |
appendArc(*paddedVertices, thisEdge.vertex1(), padding, prevOffsetEdge.vertex2(), thisOffsetEdge.vertex1(), true); |
| 147 |
} |
153 |
} |
| 148 |
|
154 |
|
|
|
155 |
snapVerticesToLayoutUnitGrid(*paddedVertices); |
| 149 |
return new FloatPolygon(adoptPtr(paddedVertices), fillRule); |
156 |
return new FloatPolygon(adoptPtr(paddedVertices), fillRule); |
| 150 |
} |
157 |
} |
| 151 |
|
158 |
|
|
Lines 166-171
static inline FloatPolygon *computeShapeMarginBounds(const FloatPolygon& polygon
a/Source/WebCore/rendering/ExclusionPolygon.cpp_sec3
|
| 166 |
appendArc(*marginVertices, thisEdge.vertex1(), margin, prevOffsetEdge.vertex2(), thisOffsetEdge.vertex1(), false); |
173 |
appendArc(*marginVertices, thisEdge.vertex1(), margin, prevOffsetEdge.vertex2(), thisOffsetEdge.vertex1(), false); |
| 167 |
} |
174 |
} |
| 168 |
|
175 |
|
|
|
176 |
snapVerticesToLayoutUnitGrid(*marginVertices); |
| 169 |
return new FloatPolygon(adoptPtr(marginVertices), fillRule); |
177 |
return new FloatPolygon(adoptPtr(marginVertices), fillRule); |
| 170 |
} |
178 |
} |
| 171 |
|
179 |
|