Documentation ¶
Index ¶
- Constants
- func CharacterNames() string
- type Cast
- type Character
- type CharacterSet
- type ComicGen
- type ComicType
- type Emotion
- type Location
- type Message
- type MultiBounds
- func (m *MultiBounds) AddBound(l, t, r, b float64)
- func (m *MultiBounds) AddStringBounds(l, t, r, b float64)
- func (m *MultiBounds) Bounds() (l, t, r, b float64)
- func (m *MultiBounds) GetBound(i int) (float64, float64, float64, float64)
- func (m *MultiBounds) Length() int
- func (m *MultiBounds) Offset(offset *MultiBounds) *MultiBounds
- type Script
Constants ¶
View Source
const ( EmotionAngry Emotion = "angry" EmotionBored = "bored" EmotionHappy = "happy" EmotionHi = "hi" EmotionIdle = "idle" EmotionLove = "love" EmotionMe = "me" EmotionQuestion = "question" EmotionSad = "sad" EmotionScared = "scared" EmotionSmug = "smug" EmotionWalk = "walk" EmotionYell = "yell" EmotionYou = "you" )
All the possible emotion states.
View Source
const ReplacementUnicode = 0xF0000
Variables ¶
This section is empty.
Functions ¶
func CharacterNames ¶
func CharacterNames() string
Types ¶
type Cast ¶
type Cast struct {
CharacterSets []*CharacterSet
}
func (*Cast) AddCharacterSet ¶
func (c *Cast) AddCharacterSet(cs *CharacterSet) error
func (*Cast) GetCharacterSetByName ¶
func (c *Cast) GetCharacterSetByName(name string) *CharacterSet
func (*Cast) GetCharacters ¶
func (*Cast) LoadFromDirectory ¶
type Character ¶
type Character struct { FileName string `json:"filename"` Name string `json:"name"` Width int `json:"width"` Height int `json:"height"` Chance int `json:"chance"` Emotions map[Emotion][]int `json:"Emotions"` Image image.Image }
A Character contains the information necessary to draw one character in a comic.
type CharacterSet ¶
type CharacterSet struct { Name string `json:"name"` History string `json:"history"` Author string `json:"author"` AuthorID string `json:"authorID"` Locations []*Location `json:"location"` Characters []*Character `json:"characters"` }
func (*CharacterSet) GetMap ¶
func (cs *CharacterSet) GetMap() map[string]*Character
func (*CharacterSet) GetRandomCharacters ¶
func (cs *CharacterSet) GetRandomCharacters() []*Character
func (*CharacterSet) LoadFromFile ¶
func (cs *CharacterSet) LoadFromFile(path string) error
type ComicGen ¶
ComicGen is a comic generator!
func NewComicGen ¶
NewComicGen creates a new comic generator.
type ComicType ¶
type ComicType int
A ComicType specifies the type of comic to create.
const ( // ComicTypeSimple generates a comic with large text bubbles and avatars. ComicTypeSimple ComicType = iota // ComicTypeChat emulates Microsoft Comic Chat and creates a comic with characters and backgrounds. ComicTypeChat // ComicTypeTragedy is the same as ComicTypeChat but with unique characters. ComicTypeTragedy )
type Message ¶
type Message struct { Text string Author string Replacements map[string]string ImageUrl string // contains filtered or unexported fields }
Message contains a single message for a comment.
type MultiBounds ¶
MultiBounds is a struct containing bounds information for multiple lines of text.
func (*MultiBounds) AddBound ¶
func (m *MultiBounds) AddBound(l, t, r, b float64)
AddBound will add a new bound.
func (*MultiBounds) AddStringBounds ¶
func (m *MultiBounds) AddStringBounds(l, t, r, b float64)
AddStringBounds will add a new bound and automodify the bound to be positioned on the next line.
func (*MultiBounds) Bounds ¶
func (m *MultiBounds) Bounds() (l, t, r, b float64)
Bounds returns the total bounds of all lines.
func (*MultiBounds) Length ¶
func (m *MultiBounds) Length() int
Length returns the number of lines contained in the MultiBounds.
func (*MultiBounds) Offset ¶
func (m *MultiBounds) Offset(offset *MultiBounds) *MultiBounds
Offset returns a new MultiBound offset by another.
Click to show internal directories.
Click to hide internal directories.