- LICENSE AND COPYRIGHT
SVG::Rasterize::State::Text - state of a text/text content node
Text and text content nodes need special functionality. The hardest part belongs to the character data nodes, which contain the actual text. Their characters might have specific position settings, which may be inherited from upstream
This class implements a process_node_extra method overloading the empty one of SVG::Rasterize::State. This method splits character data into atoms where an atom (this term is coined by me while chunk and block are taken from the
SVG specification) is a sequence of characters that can be handed to the rasterization engine in one go. Note that the atoms defined here might be split up further directly before rasterization due to bidirectional text.
Inherited from SVG::Rasterize::State.
Readonly attribute. Holds the reference to an array of HASH references. The array is filled during initialization. Each hash has the following entries:
x: explicit x value if given
y: explicit y value if given
dx: explicit dx value if given
dy: explicit dy value if given
rotate: explicit rotate value if given
chunkID: number of the text chunk this atom belongs to
only present for first atom of each chunk, leftover of processing, should not be used
number of the independent text block this atom belongs to
only present for first atom of each block, leftover of processing, should not be used
number of the atom, equal to the length of text before this atom thereby allowing further splitting without renumbering
cdata: the actual characters of this atom
state: weak reference to this object.
ARRAY reference, list of explicit x positions that this element still has to offer.
Same for y.
Same for dx.
Same for dy.
Same for rotate.
Overloads the empty method of SVG::Rasterize::State.
Has two modes of operation. For elements, it saves the position attributes if present into buffer copies from which they can be shifted by character data child nodes.
For character data nodes, it splits the string into atoms assigning position values (if provided by ancestors) to the characters.
Called by process_node_extra. Takes a list of atom HASH references and pushes them to the text_atoms list. Calls itself on the ancestor
textPath element. At this call, it sets chunkID, blockID, and atomID.
Not documented, yet. Sorry.
Not documented, yet. Sorry.
These methods are just documented for myself. You can read on to satisfy your voyeuristic desires, but be aware of that they might change or vanish without notice in a future version.
This piece of documentation is mainly here to make the
PODcoverage test happy.
make_ro_accessorto make the readonly accessors throw an exception object (of class
SVG::Rasterize::Exception::Attribute) instead of just croaking.
<perl at lutzgehlen.de>
Copyright 2011 Lutz Gehlen.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.