vivid v0.4.1 Vivid.Group
Represents a collection of shapes which can be Rasterized in a single pass.
Group implements both the Enumerable
and Collectable
protocols.
Summary
Functions
Remove a shape from a Group
Initialize an empty group
Initialize a group from a list of shapes
Add a shape to a Group
Types
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 from a list of shapes.
Example
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]>]>