OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 size_t m_currentOffset; | 66 size_t m_currentOffset; |
67 unsigned char m_bytes[sizeof(unsigned short) + sizeof(FloatPoint) * 3]; | 67 unsigned char m_bytes[sizeof(unsigned short) + sizeof(FloatPoint) * 3]; |
68 SVGPathByteStream& m_byteStream; | 68 SVGPathByteStream& m_byteStream; |
69 }; | 69 }; |
70 | 70 |
71 SVGPathByteStreamBuilder::SVGPathByteStreamBuilder(SVGPathByteStream& byteStream
) | 71 SVGPathByteStreamBuilder::SVGPathByteStreamBuilder(SVGPathByteStream& byteStream
) |
72 : m_byteStream(byteStream) | 72 : m_byteStream(byteStream) |
73 { | 73 { |
74 } | 74 } |
75 | 75 |
76 void SVGPathByteStreamBuilder::moveTo(const FloatPoint& targetPoint, bool, PathC
oordinateMode mode) | 76 void SVGPathByteStreamBuilder::moveTo(const FloatPoint& targetPoint, PathCoordin
ateMode mode) |
77 { | 77 { |
78 CoalescingBuffer buffer(m_byteStream); | 78 CoalescingBuffer buffer(m_byteStream); |
79 buffer.writeSegmentType(mode == RelativeCoordinates ? PathSegMoveToRel : Pa
thSegMoveToAbs); | 79 buffer.writeSegmentType(mode == RelativeCoordinates ? PathSegMoveToRel : Pa
thSegMoveToAbs); |
80 buffer.writeFloatPoint(targetPoint); | 80 buffer.writeFloatPoint(targetPoint); |
81 } | 81 } |
82 | 82 |
83 void SVGPathByteStreamBuilder::lineTo(const FloatPoint& targetPoint, PathCoordin
ateMode mode) | 83 void SVGPathByteStreamBuilder::lineTo(const FloatPoint& targetPoint, PathCoordin
ateMode mode) |
84 { | 84 { |
85 CoalescingBuffer buffer(m_byteStream); | 85 CoalescingBuffer buffer(m_byteStream); |
86 buffer.writeSegmentType(mode == RelativeCoordinates ? PathSegLineToRel : Pat
hSegLineToAbs); | 86 buffer.writeSegmentType(mode == RelativeCoordinates ? PathSegLineToRel : Pat
hSegLineToAbs); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 buffer.writeFloatPoint(targetPoint); | 145 buffer.writeFloatPoint(targetPoint); |
146 } | 146 } |
147 | 147 |
148 void SVGPathByteStreamBuilder::closePath() | 148 void SVGPathByteStreamBuilder::closePath() |
149 { | 149 { |
150 CoalescingBuffer buffer(m_byteStream); | 150 CoalescingBuffer buffer(m_byteStream); |
151 buffer.writeSegmentType(PathSegClosePath); | 151 buffer.writeSegmentType(PathSegClosePath); |
152 } | 152 } |
153 | 153 |
154 } // namespace blink | 154 } // namespace blink |
OLD | NEW |