module RSVGR::Samples

Public Class Methods

face(args = {}) click to toggle source
# 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