avyos.dev/pkg/graphics/renderer
package renderer
Overview
No package-level documentation is provided.
| Export Group | Count |
|---|---|
| Constants | 0 |
| Variables | 0 |
| Functions | 14 |
| Types | 0 |
Functions
ClampRoundedRadius
func ClampRoundedRadius(r image.Rectangle, radius int) intDrawAALine
func DrawAALine(buf *core.Buffer, x0, y0, x1, y1, width float64, c color.NRGBA)DrawAALine draws an antialiased line with width and alpha blending.
DrawFocusRing
func DrawFocusRing(buf *core.Buffer, bounds image.Rectangle, radius int, ringColor color.NRGBA, ringWidth, ringOffset int)DrawFocusRing draws an outward focus ring around bounds.
DrawListRowFill
func DrawListRowFill(buf *core.Buffer, row image.Rectangle, radius int, solid, top, bottom color.NRGBA)DrawListRowFill draws either a solid or gradient list row fill.
DrawRoundedShadow
func DrawRoundedShadow(
buf *core.Buffer,
shadowRect image.Rectangle,
radius int,
shadowColor color.NRGBA,
shadowBase color.NRGBA,
spread int,
gap int,
)DrawRoundedShadow draws a soft shadow outside a rounded rect. shadowRect is the target rounded rectangle already offset into its final position.
DrawVerticalGradient
func DrawVerticalGradient(buf *core.Buffer, r image.Rectangle, radius int, top, bottom color.NRGBA)DrawVerticalGradient draws a vertical gradient in r, clipping to rounded corners when radius>0.
MixColors
func MixColors(a, b color.NRGBA, t float64) color.NRGBAMixColors linearly blends color a->b by t in [0..1].
PointInRoundedRect
func PointInRoundedRect(x, y int, r image.Rectangle, radius int) boolPointInRoundedRectAt
func PointInRoundedRectAt(px, py float64, r image.Rectangle, radius int) boolPointInRoundedRectAtClamped
func PointInRoundedRectAtClamped(px, py float64, r image.Rectangle, radius int) boolRoundedRectCoverage
func RoundedRectCoverage(x, y int, r image.Rectangle, radius int) float64RoundedRectOutsideDistance
func RoundedRectOutsideDistance(px, py float64, r image.Rectangle, radius int) float64RoundedRectSignedDistance
func RoundedRectSignedDistance(px, py float64, r image.Rectangle, radius int) float64TrimTextToWidth
func TrimTextToWidth(font *gfxfont.Font, text string, maxWidth int, align string) stringTrimTextToWidth shortens text to fit maxWidth, keeping right-alignment behavior.