class Magick::RVG::Pattern
def add_primitives(gc, style)
- Private: -
def add_primitives(gc, style) name = __id__.to_s gc.pattern(name, @x, @y, @width, @height) do add_viewbox_primitives(@width, @height, gc) @content.each { |element| element.add_primitives(gc) } end gc.__send__(style, name) end
def initialize(width = 0, height = 0, x = 0, y = 0)
raster images and container objects. You can include graphic objects by
The pattern can be composed of shapes (rectangle, circles, etc.), text,
Define the pattern in the block.
offsets.
The pattern will be repeated at x+m*width and y+n*height
The +width+ and +height+ arguments define the viewport.
Create a pattern that can be used with the :fill or :stroke styles.
def initialize(width = 0, height = 0, x = 0, y = 0) super() @width, @height, @x, @y = Magick::RVG.convert_to_float(width, height, x, y) @content = Content.new yield(self) if block_given? end