1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
# Responsible for fill shapes
class RGhost::ShapeContent < RGhost::PsObject
DEFAULT_OPTIONS = {
fill: true, color: "#F0FFFF"
}
# You can use parameter :color(facade for Color.create) or disable using :fill => false
def initialize(options = {})
super("") {}
@options = DEFAULT_OPTIONS.dup.merge(options)
end
def ps
p = RGhost::PsObject.new
p.raw :gsave
p.set RGhost::Color.create(@options[:color]) if @options[:color]
p.raw :fill if @options[:fill]
p.raw :grestore
p
end
end
|