Documentation ¶
Index ¶
- type Component
- func (component Component) GetJSONFormat() interface{}
- func (component Component) SetNamedProperties(properties render.NamedProperties) (render.Component, error)
- func (component Component) VerifyAndSetJSONData(data interface{}) (render.Component, render.NamedProperties, error)
- func (component Component) Write(canvas render.Canvas) (render.Canvas, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct { NamedPropertiesMap map[string][]string Centre image.Point Radius int Colour color.NRGBA }
Component implements the Component interface for circles
func (Component) GetJSONFormat ¶
func (component Component) GetJSONFormat() interface{}
GetJSONFormat returns the JSON structure of a circle component
func (Component) SetNamedProperties ¶
func (component Component) SetNamedProperties(properties render.NamedProperties) (render.Component, error)
SetNamedProperties processes the named properties and sets them into the circle properties
func (Component) VerifyAndSetJSONData ¶
func (component Component) VerifyAndSetJSONData(data interface{}) (render.Component, render.NamedProperties, error)
VerifyAndSetJSONData processes the data parsed from JSON and uses it to set circle properties and fill the named properties map
Click to show internal directories.
Click to hide internal directories.