Sha256: 089516924034e58deb394098a56a3009776449249f9a214e4be29d63c587bc60

Contents?: true

Size: 511 Bytes

Versions: 5

Compression:

Stored size: 511 Bytes

Contents

module Prawn::SVG::Attributes::ClipPath
  def parse_clip_path_attribute_and_call
    return unless (clip_path = properties.clip_path)
    return if clip_path == 'none'

    clip_path_element = extract_element_from_url_id_reference(clip_path, 'clipPath')

    if clip_path_element.nil?
      document.warnings << 'Could not resolve clip-path URI to a clipPath element'
    else
      add_call_and_enter 'save_graphics_state'
      add_calls_from_element clip_path_element
      add_call 'clip'
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
prawn-svg-0.36.2 lib/prawn/svg/attributes/clip_path.rb
prawn-svg-0.36.1 lib/prawn/svg/attributes/clip_path.rb
prawn-svg-0.36.0 lib/prawn/svg/attributes/clip_path.rb
prawn-svg-0.35.1 lib/prawn/svg/attributes/clip_path.rb
prawn-svg-0.35.0 lib/prawn/svg/attributes/clip_path.rb