DescriptionRework SVG path normalization code
This CL moves normalization code from the SVGPathParser::emit* methods,
into a emitSegment method on a new helper object NormalizingConsumer.
Normalization is a fairly uniform process, and with a more uniform
datastructure to work on (PathSegmentData), it can be simplified.
The new NormalizingConsumer::emitSegment accepts a non-normalized
segment, which it maps to a normalized segment in a few steps:
1) Convert relative points to absolute.
2) Convert smooth/quadratic/arc parametrizations to cubics.
3) Convert non-normalized verbs to normalized.
4) Update normalization state.
Normalization state (currentPoint, subPathPoint, etc.) is also moved to
the new helper class. The coordinate mode (SVGPathParser::m_mode) is no
longer needed and removed.
The checks for quadratic/cubic curve classes are turned into functions.
BUG=467592
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=192445
Patch Set 1 #
Messages
Total messages: 7 (2 generated)
|