OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
10 * disclaimer. | 10 * disclaimer. |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 excludedInterval.unite(OffsetPolygonEdge(edge, outwardEdgeNormal(edg
e) * shapeMargin()).clippedEdgeXRange(y1, y2)); | 141 excludedInterval.unite(OffsetPolygonEdge(edge, outwardEdgeNormal(edg
e) * shapeMargin()).clippedEdgeXRange(y1, y2)); |
142 excludedInterval.unite(OffsetPolygonEdge(edge, inwardEdgeNormal(edge
) * shapeMargin()).clippedEdgeXRange(y1, y2)); | 142 excludedInterval.unite(OffsetPolygonEdge(edge, inwardEdgeNormal(edge
) * shapeMargin()).clippedEdgeXRange(y1, y2)); |
143 excludedInterval.unite(clippedCircleXRange(edge.vertex1(), shapeMarg
in(), y1, y2)); | 143 excludedInterval.unite(clippedCircleXRange(edge.vertex1(), shapeMarg
in(), y1, y2)); |
144 } | 144 } |
145 } | 145 } |
146 | 146 |
147 if (!excludedInterval.isEmpty()) | 147 if (!excludedInterval.isEmpty()) |
148 result.append(LineSegment(excludedInterval.x1(), excludedInterval.x2()))
; | 148 result.append(LineSegment(excludedInterval.x1(), excludedInterval.x2()))
; |
149 } | 149 } |
150 | 150 |
| 151 void PolygonShape::buildDisplayPaths(DisplayPaths& paths) const |
| 152 { |
| 153 if (!m_polygon.numberOfVertices()) |
| 154 return; |
| 155 paths.shape.moveTo(m_polygon.vertexAt(0)); |
| 156 for (size_t i = 1; i < m_polygon.numberOfVertices(); ++i) |
| 157 paths.shape.addLineTo(m_polygon.vertexAt(i)); |
| 158 paths.shape.closeSubpath(); |
| 159 } |
| 160 |
151 } // namespace WebCore | 161 } // namespace WebCore |
OLD | NEW |