Skia.Document (Skia v0.1.1)

Copy Markdown View Source

Immutable drawing document built by the fluent API and DSL.

A document is pure Elixir data until it is handed to a renderer. The native renderer can consume the command list in one batch instead of crossing the NIF boundary for every drawing operation.

Summary

Types

t()

@type t() :: %Skia.Document{
  commands: [Skia.Command.t()],
  height: pos_integer(),
  width: pos_integer()
}

Functions

append(document, command)

@spec append(t(), Skia.Command.t()) :: t()

commands(document)

@spec commands(t()) :: [Skia.Command.t()]

new(width, height)

@spec new(pos_integer(), pos_integer()) :: t()