Class Magick::RVG::ClipPath
In: lib/rvg/clippath.rb
Parent: Object
Enum GeometryValue Stylable RVG\n[lib/rvg/clippath.rb\nlib/rvg/container.rb\nlib/rvg/deep_equal.rb\nlib/rvg/describable.rb\nlib/rvg/embellishable.rb\nlib/rvg/misc.rb\nlib/rvg/paint.rb\nlib/rvg/pathdata.rb\nlib/rvg/rvg.rb\nlib/rvg/stretchable.rb\nlib/rvg/stylable.rb\nlib/rvg/text.rb\nlib/rvg/transformable.rb\nlib/rvg/units.rb] Transformable Stretchable Embellishable Describable Duplicatable Comparable Image ImageList Array Geometry HatchFill Draw lib/RMagick.rb lib/rvg/misc.rb Application ObjectData Pre_ObjectData_Descriptor Envelope Post_ObjectData_Descriptor IPTC Magick dot/m_14_0.png

Methods

new  

Included Modules

ShapeConstructors UseConstructors TextConstructors Describable Stylable Duplicatable

Public Class methods

Create a clipping path. Within the block create an outline from one or more paths, basic shapes, text objects, or use. Everything drawn within the outline will be displayed. Anything drawn outside the outline will not.

If the clipping path contains a use, it must directly reference path, basic shape, or text objects.

Attach the clipping path to an object with the :clip_path style.

[Source]

    # File lib/rvg/clippath.rb, line 25
25:             def initialize(clip_path_units='userSpaceOnUse')
26:                 super()
27:                 if ! ['userSpaceOnUse', 'objectBoundingBox'].include?(clip_path_units)
28:                     raise ArgumentError, "undefined value for clip path units: #{clip_path_units}"
29:                 end
30:                 @clip_path_units = clip_path_units
31:                 @content = Content.new
32:                 yield(self) if block_given?
33:             end

[Validate]