Module: Sevgi::Graphics::Mixtures::Inkscape::InstanceMethods

Defined in:
lib/sevgi/graphics/mixtures/inkscape.rb

Instance Method Summary collapse

Instance Method Details

#InkscapeTemplateInfo(name:, desc: nil, author: nil, date: nil, keywords: nil) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/sevgi/graphics/mixtures/inkscape.rb', line 8

def InkscapeTemplateInfo(name:, desc: nil, author: nil, date: nil, keywords: nil)
  Element(:"inkscape:_templateinfo") do
    Element(:"inkscape:_name", name)
    Element(:"inkscape:_shortdesc", desc) if desc
    Element(:"inkscape:date", date) if date
    Element(:"inkscape:author", author) if author
    Element(:"inkscape:_keywords", [ *keywords ].join(" ")) if keywords
  end
end

#Layer(mod, *args, **kwargs, &block) ⇒ Object



18
19
20
21
# File 'lib/sevgi/graphics/mixtures/inkscape.rb', line 18

def Layer(mod, *args, **kwargs, &block)
  kwargs = kwargs.merge(id: mod.to_s.split("::").last.capitalize.to_sym) unless kwargs.key?(:id)
  layer(**kwargs) { Call(mod, *args, &block) }
end

#layer(&block) ⇒ Object



23
24
25
# File 'lib/sevgi/graphics/mixtures/inkscape.rb', line 23

def layer(**, &block)
  g("inkscape:groupmode": "layer", "sodipodi:insensitive": "true", **, &block)
end

#symbol!(&block) ⇒ Object

Internal symbol which does not show up Symbols Menu



28
29
30
# File 'lib/sevgi/graphics/mixtures/inkscape.rb', line 28

def symbol!(**, &block)
  g(role: "inkscape:symbol", **, &block)
end