comment

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2019 License: MIT Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Width      float32
	Height     float32
	XScale     float32
	YScale     float32
	XOffset    float32
	YOffset    float32
	Author     string
	Background string
	Shadow     string
	Stroke     string
	Visible    bool
	Text       []interface{}
}

Info hold advanced settings of comment N.B.: You should NOT mutate any value directly.

func New

func New(options ...Option) *Info

New create and returns option set for comment

func (*Info) Set

func (i *Info) Set(options ...Option)

Set sets new options for option set

type Option

type Option func(o *Info)

Option is helper type to set options for comment

func Author

func Author(author string) Option

Author adds author information to comment

func Background

func Background(rgb string) Option

Background sets background color for comment

func Height

func Height(height float32) Option

Height sets height of comment

func Shadow

func Shadow(rgb string) Option

Shadow sets shadow color for comment

func Stroke

func Stroke(rgb string) Option

Stroke sets stroke color for comment

func Text

func Text(parts ...interface{}) Option

Text sets rich text of comment

func Visible

func Visible(visible bool) Option

Visible sets visibility of comment

func Width

func Width(width float32) Option

Width sets width of comment

func XOffset

func XOffset(offset float32) Option

XOffset sets x-offset value for comment

func XScale

func XScale(scale float32) Option

XScale sets x-scaling value for comment

func YOffset

func YOffset(offset float32) Option

YOffset sets y-offset value for comment

func YScale

func YScale(scale float32) Option

YScale sets y-scaling value for comment

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL