Scenic v0.8.0 Scenic.Primitive behaviour View Source

Link to this section Summary

Link to this section Types

Link to this type t() View Source
t() :: %Scenic.Primitive{
  data: any(),
  id: any(),
  module: atom(),
  parent_uid: integer(),
  styles: map(),
  transforms: map()
}

Link to this section Functions

Link to this function build(module, data, opts \\ []) View Source
build(module :: atom(), data :: any(), opts :: keyword()) ::
  Scenic.Primitive.t()
Link to this function contains_point?(primitive, point) View Source
contains_point?(primitive :: Scenic.Primitive.t(), point :: Scenic.Math.point()) ::
  map()
Link to this function delete_style(primitive, type) View Source
delete_style(primitive :: Scenic.Primitive.t(), type :: atom()) ::
  Scenic.Primitive.t()
Link to this function delete_transform(primitive, tx_type) View Source
delete_transform(primitive :: Scenic.Primitive.t(), type :: atom()) ::
  Scenic.Primitive.t()
Link to this function get(primitive) View Source
get(primitive :: Scenic.Primitive.t()) :: any()
Link to this function get_style(primitive, type, default \\ nil) View Source
get_style(primitive :: Scenic.Primitive.t(), type :: atom(), default :: any()) ::
  any()
Link to this function get_styles(primitive) View Source
get_styles(primitive :: Scenic.Primitive.t()) :: map()
Link to this function get_transform(primitive, tx_type, default \\ nil) View Source
get_transform(
  primitive :: Scenic.Primitive.t(),
  type :: atom(),
  default :: any()
) :: any()
Link to this function get_transforms(primitive) View Source
get_transforms(primitive :: Scenic.Primitive.t()) :: map()
Link to this function put(primitive, data, opts \\ []) View Source
put(primitive :: Scenic.Primitive.t(), data :: any(), opts :: list()) ::
  Scenic.Primitive.t()
Link to this function put_opts(primitive, opts) View Source
put_opts(primitive :: Scenic.Primitive.t(), opts :: keyword()) ::
  Scenic.Primitive.t()
Link to this function put_style(p, type, data) View Source
put_style(primitive :: Scenic.Primitive.t(), type :: atom(), data :: any()) ::
  Scenic.Primitive.t()
Link to this function put_styles(primitve, styles) View Source
put_styles(primitive :: Scenic.Primitive.t(), styles :: map()) ::
  Scenic.Primitive.t()
Link to this function put_transform(p, tx_list) View Source
Link to this function put_transform(p, tx_type, data) View Source
put_transform(
  primitive :: Scenic.Primitive.t(),
  type :: atom(),
  transform :: any()
) :: Scenic.Primitive.t()
Link to this function put_transforms(primitve, transforms) View Source
put_transforms(primitive :: Scenic.Primitive.t(), transforms :: map()) ::
  Scenic.Primitive.t()

Link to this section Callbacks

Link to this callback add_to_graph(map, any, opts) View Source
add_to_graph(map(), any(), opts :: keyword()) :: map()
Link to this callback contains_point?(any, {}) View Source
contains_point?(any(), {float(), float()}) :: true | false
Link to this callback default_pin(any) View Source
default_pin(any()) :: {float(), float()}
Link to this callback expand(any) View Source
expand(any()) :: any()
Link to this callback filter_styles(map) View Source
filter_styles(map()) :: map()
Link to this callback info(data) View Source
info(data :: any()) :: bitstring()
Link to this callback valid_styles() View Source
valid_styles() :: list()
Link to this callback verify(any) View Source
verify(any()) :: any()