CanvasCraft.Capabilities (canvas_craft v0.2.0)

View Source

Capability and enums/typespecs for CanvasCraft primitive families and options.

Summary

Types

Blend modes

Clip operation mode

Feature atoms for capability discovery

Gradient stop: {offset 0..1, {r,g,b,a}}

Line cap style

Line join style

Functions

All known features

Return true if backend supports feature (based on capabilities/0)

Types

blend_mode()

@type blend_mode() ::
  :src_over
  | :src
  | :dst
  | :clear
  | :multiply
  | :screen
  | :overlay
  | :darken
  | :lighten
  | :color_dodge
  | :color_burn
  | :hard_light
  | :soft_light
  | :difference
  | :exclusion
  | :hue
  | :saturation
  | :color
  | :luminosity

Blend modes

clip_mode()

@type clip_mode() :: :intersect | :difference

Clip operation mode

feature()

@type feature() :: :images | :gradients | :filters | :blending | :clipping | :effects

Feature atoms for capability discovery

gradient_stop()

@type gradient_stop() :: {number(), {0..255, 0..255, 0..255, 0..255}}

Gradient stop: {offset 0..1, {r,g,b,a}}

line_cap()

@type line_cap() :: :butt | :round | :square

Line cap style

line_join()

@type line_join() :: :miter | :round | :bevel

Line join style

Functions

features()

All known features

supports?(backend, feat)

@spec supports?(module(), feature()) :: boolean()

Return true if backend supports feature (based on capabilities/0)