Module: RSVGR::Samples

Defined in:
lib/rsvgr.rb

Defined Under Namespace

Classes: Grid, Plot

Class Method Summary collapse

Class Method Details

.face(args = {}) ⇒ Object



237
238
239
240
241
242
243
244
245
246
247
248
249
# File 'lib/rsvgr.rb', line 237

def self.face args = {}
    args[:scale_x] = args[:scale_y] = args[:size] if args[:size]
    args[:fill_color] = "yellow"
    args[:x] = 0.5
    args[:y] = 0.5
    args[:stroke_width] = 0.1
    args[:stroke_color] = :black
    Group.new(args) <<
        Circle.new <<
        Circle.new(x:-0.2, y:-0.2, r:0.1) <<
        Circle.new(x:+0.2, y:-0.2, r:0.1) <<
        Line.new(x1:-0.2, y1:+0.2, x2:+0.2, y2:+0.2)
end