Top Level Namespace

Defined Under Namespace

Modules: FileUtils, Sevgi

Constant Summary collapse

SVG =

SVG-domain facade installed by require "sevgi".

Returns:

  • (Module)

    the public SVG operations and types

Sevgi::SVG

Instance Method Summary collapse

Instance Method Details

#SVG(document = :default, canvas = Undefined, **attributes) { ... } ⇒ Sevgi::Graphics::Document::Proto

Examples:

Build through the global library entrypoint

SVG(:minimal) { circle r: 4 }.Render

Builds an SVG document through the default top-level DSL entrypoint.

Parameters:

  • document (Symbol, String, Class) (defaults to: :default)

    document profile name or document class

  • canvas (Sevgi::Graphics::Canvas, Sevgi::Graphics::Paper, Symbol, String, Sevgi::Undefined, nil) (defaults to: Undefined)

    optional canvas or paper profile

  • attributes (Hash)

    root SVG attributes

Yields:

  • the document block evaluated in the SVG document context

Yield Returns:

  • (void)

Returns:

  • (Sevgi::Graphics::Document::Proto)

    a rendered SVG document object

Raises:

  • (Sevgi::ArgumentError)

    when the document, paper, or canvas arguments are invalid

See Also:



33
# File 'lib/sevgi.rb', line 33

def SVG(...) = Sevgi.SVG(...)