Class: Prawn::SVG::Elements::DirectRenderBase
- Defined in:
- lib/prawn/svg/elements/direct_render_base.rb
Overview
This element base class is used for elements that render directly to the Prawn canvas.
Initially when I wrote prawn-svg, I was expecting to have multiple renderers and thought separating the codebase from the Prawn renderer would be a good idea. However, it turns out that the Prawn renderer was the only one that was targeted, and it ended up being tightly coupled with the Prawn library.
This class is probably how I should have written it. Direct render is required to do text rendering properly because we need to know the width of all the things we print. As of the time of this comment it’s the only system that uses DirectRenderBase in prawn-svg.
Direct Known Subclasses
Constant Summary
Constants inherited from Base
Base::COMMA_WSP_REGEXP, Base::MissingAttributesError, Base::PAINT_TYPES, Base::SVG_NAMESPACE, Base::SkipElementError, Base::SkipElementQuietly
Constants included from Attributes::Stroke
Attributes::Stroke::CAP_STYLE_TRANSLATIONS, Attributes::Stroke::JOIN_STYLE_TRANSLATIONS
Instance Attribute Summary
Attributes inherited from Base
#attributes, #base_calls, #calls, #document, #parent_calls, #properties, #source, #state
Instance Method Summary collapse
-
#render(prawn, renderer) ⇒ Object
Called by Renderer when it finds the svg:render call added below.
Methods inherited from Base
Methods included from TransformParser
Methods included from PDFMatrix
#load_matrix, #matrix_for_pdf, #rotation_matrix, #scale_matrix, #translation_matrix
Methods included from Attributes::Space
Methods included from Attributes::Stroke
#parse_stroke_attributes_and_call
Methods included from Attributes::ClipPath
#parse_clip_path_attribute_and_call
Methods included from Attributes::Opacity
#parse_opacity_attributes_and_call
Methods included from Attributes::Transform
#parse_transform_attribute_and_call
Constructor Details
This class inherits a constructor from Prawn::SVG::Elements::Base
Instance Method Details
#render(prawn, renderer) ⇒ Object
Called by Renderer when it finds the svg:render call added below.
14 |
# File 'lib/prawn/svg/elements/direct_render_base.rb', line 14 def render(prawn, renderer); end |