vivid v0.1.0 Vivid.Group
Represents a collection of shapes which can be Rasterized in a single pass.
Summary
Functions
Remove a shape from a Group
Initialize a group either empty or from a list of shapes
Add a shape to a Group
Functions
Remove a shape from a Group
Example
iex> line = Vivid.Line.init(Vivid.Point.init(1,1), Vivid.Point.init(10,10))
...> Vivid.Group.init([line])
...> |> Vivid.Group.delete(line)
%Vivid.Group{shapes: MapSet.new()}
Initialize a group either empty or from a list of shapes.
Examples
iex> circle = Vivid.Circle.init(Vivid.Point.init(5,5), 5)
...> line = Vivid.Line.init(Vivid.Point.init(1,1), Vivid.Point.init(10,10))
...> Vivid.Group.init([circle, line])
#Vivid.Group<[#Vivid.Line<[origin: #Vivid.Point<{1, 1}>, termination: #Vivid.Point<{10, 10}>]>, #Vivid.Circle<[center: #Vivid.Point<{5, 5}>, radius: 5]>]>
iex> Vivid.Group.init
%Vivid.Group{shapes: MapSet.new()}