Documentation
¶
Index ¶
- Constants
- func SetMaterialSymbolsCacheDir(dir string)
- type GainFader
- type LevelMeter
- type LevelMeterPeakHold
- type MaterialSymbolsFontParams
- func (p *MaterialSymbolsFontParams) Assert() error
- func (p *MaterialSymbolsFontParams) FillEmptyWithDefault()
- func (p *MaterialSymbolsFontParams) GetIconPath(codePoint string, size int) (*canvas.Path, error)
- func (p *MaterialSymbolsFontParams) RenderIcon(codePoint string, iconSize, imgSize, offsetX, offsetY int, ...) (*image.RGBA, error)
- func (p *MaterialSymbolsFontParams) RenderIconCanvas(codePoint string, iconSize, imgSize, offsetX, offsetY int, ...) (*canvas.Canvas, error)
- func (p *MaterialSymbolsFontParams) RenderIconSVG(codePoint string, iconSize, imgSize, offsetX, offsetY int, ...) (string, error)
- func (p *MaterialSymbolsFontParams) RenderIconWithShadow(codePoint string, iconSize, imgSize, offsetX, offsetY int, ...) (image.Image, error)
- func (p *MaterialSymbolsFontParams) String() string
- type StatusIndicator
- type StatusIndicatorRowStyle
- type StatusIndicatorShape
Constants ¶
View Source
const ( StatusIndicatorShapeCircle = iota StatusIndicatorShapeSquare )
Variables ¶
This section is empty.
Functions ¶
func SetMaterialSymbolsCacheDir ¶
func SetMaterialSymbolsCacheDir(dir string)
SetMaterialSymbolsCacheDir set the cache directory for Material Symbols fonts. If not set, the system temporary directory will be used. The fonts cache file is named "materialSymbolsCache.json".
Types ¶
type GainFader ¶
type GainFader struct {
Color struct {
Background color.Color
Boarder color.Color
ForegroundNormal color.Color
ForegroundOveramplified color.Color
}
Width int
Height int
RoundedCorners bool
BoarderWidth int
BoarderColorIsForeground bool
DbMin float64
DbMax float64
}
func NewGainFader ¶
func NewGainFader() *GainFader
type LevelMeter ¶
type LevelMeter struct {
DbMin float64
DbGood float64
DbMax float64
PeakHold LevelMeterPeakHold
PeakDecayDbPerSec float64
Image struct {
Width int
Height int
Padding struct {
Top int
Right int
Bottom int
Left int
}
BackgroundColor color.Color
}
Cell struct {
Length int
Margin struct {
X int
Y int
}
Color struct {
Normal color.Color
Good color.Color
Clipped color.Color
NormalOff color.Color
GoodOff color.Color
ClippedOff color.Color
}
}
// contains filtered or unexported fields
}
func NewLevelMeter ¶
func NewLevelMeter(channelCount int) *LevelMeter
func (*LevelMeter) RenderHorizontal ¶
func (p *LevelMeter) RenderHorizontal(db []float64) (image.Image, error)
func (*LevelMeter) RenderVertical ¶
func (p *LevelMeter) RenderVertical(db []float64) (image.Image, error)
render with RenderHorizontal and rotate 90 degrees
type LevelMeterPeakHold ¶
type LevelMeterPeakHold int
const ( LevelMeterPeakHoldNone LevelMeterPeakHold = iota LevelMeterPeakHoldShowPeak LevelMeterPeakHoldFillPeak LevelMeterPeakHoldFillPeakShowCurrent )
type MaterialSymbolsFontParams ¶
type MaterialSymbolsFontParams struct {
Style string `json:"style"` // "Outlined" | "Rounded" | "Sharp"
Opsz string `json:"opsz"` // "20" | "24" | "40" | "48"
Wght string `json:"wght"` // "100" | "200" | "300" | "400" | "500" | "600" | "700"
Fill string `json:"fill"` // "0" | "1"
Grad string `json:"grad"` // "-25" | "-0" | "200"
}
func (*MaterialSymbolsFontParams) Assert ¶
func (p *MaterialSymbolsFontParams) Assert() error
func (*MaterialSymbolsFontParams) FillEmptyWithDefault ¶
func (p *MaterialSymbolsFontParams) FillEmptyWithDefault()
func (*MaterialSymbolsFontParams) GetIconPath ¶
func (*MaterialSymbolsFontParams) RenderIcon ¶
func (*MaterialSymbolsFontParams) RenderIconCanvas ¶
func (*MaterialSymbolsFontParams) RenderIconSVG ¶
func (*MaterialSymbolsFontParams) RenderIconWithShadow ¶
func (*MaterialSymbolsFontParams) String ¶
func (p *MaterialSymbolsFontParams) String() string
type StatusIndicator ¶
type StatusIndicator struct {
Width, Height int
Rows []StatusIndicatorRowStyle
}
type StatusIndicatorRowStyle ¶
type StatusIndicatorRowStyle struct {
ColorsTrue []color.Color
ColorsFalse []color.Color
Shape StatusIndicatorShape
ItemMargin float64
ItemSize float64
ItemCornerRadius float64
MarginTop float64
MarginLeft float64 // only used if Rtl is false
MarginRight float64 // only used if Rtl is true
Rtl bool
}
type StatusIndicatorShape ¶
type StatusIndicatorShape int
Click to show internal directories.
Click to hide internal directories.