draw

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccentColor

func AccentColor(colorMode ebiten.ColorMode) color.Color

func AccentTintColor

func AccentTintColor() color.Color

AccentTintColor returns the tint marking the primary action of the theme.

func AppendNinePatchVertices

func AppendNinePatchVertices(vertices []ebiten.Vertex, indices []uint32, dstBounds, srcBounds image.Rectangle, cornerW, cornerH int, clr1, clr2 color.Color, renderingParts [3][3]bool) ([]ebiten.Vertex, []uint32)

func BackgroundColor

func BackgroundColor(colorMode ebiten.ColorMode) color.Color

func BackgroundColorFromTint

func BackgroundColorFromTint(colorMode ebiten.ColorMode, tint color.Color) color.Color

BackgroundColorFromTint returns the background color tinted with tint. A nil tint returns the color for an untinted background.

func BackgroundSecondaryColor

func BackgroundSecondaryColor(colorMode ebiten.ColorMode) color.Color

func BorderAccentColors

func BorderAccentColors(colorMode ebiten.ColorMode, borderType RoundedRectBorderType) (color.Color, color.Color)

func BorderAccentSecondaryColors

func BorderAccentSecondaryColors(colorMode ebiten.ColorMode, borderType RoundedRectBorderType) (color.Color, color.Color)

func BorderColors

func BorderColors(colorMode ebiten.ColorMode, borderType RoundedRectBorderType) (color.Color, color.Color)

func BorderDangerColors

func BorderDangerColors(colorMode ebiten.ColorMode) (color.Color, color.Color)

func ButtonBackgroundColorFromTint

func ButtonBackgroundColorFromTint(colorMode ebiten.ColorMode, tint color.Color, pressed bool, hovered bool) color.Color

ButtonBackgroundColorFromTint returns the background color for a button tinted with tint. A nil tint returns the color for an untinted button.

func CheckableControlBackgroundColor

func CheckableControlBackgroundColor(colorMode ebiten.ColorMode, checked bool, pressed bool, enabled bool) color.Color

func ContentBackgroundColor

func ContentBackgroundColor(colorMode ebiten.ColorMode, enabled bool) color.Color

ContentBackgroundColor returns the color for a surface that holds content, like a list or a text input.

func ControlColor

func ControlColor(colorMode ebiten.ColorMode, enabled bool) color.Color

func ControlSecondaryColor

func ControlSecondaryColor(colorMode ebiten.ColorMode, enabled bool) color.Color

func DangerTintColor

func DangerTintColor() color.Color

DangerTintColor returns the tint marking a destructive action or an error.

func DividerColor

func DividerColor(colorMode ebiten.ColorMode) color.Color

func DrawBlurredImage

func DrawBlurredImage(context *guigui.Context, dst *ebiten.Image, src *ebiten.Image, rate float64)

func DrawNinePatch

func DrawNinePatch(dst *ebiten.Image, bounds image.Rectangle, src *ebiten.Image, clr1, clr2 color.Color)

func DrawNinePatchParts

func DrawNinePatchParts(dst *ebiten.Image, bounds image.Rectangle, src *ebiten.Image, clr1, clr2 color.Color, renderingParts [3][3]bool)

func DrawRoundedCorners

func DrawRoundedCorners(dst *ebiten.Image, src *ebiten.Image, bounds image.Rectangle, radius int, op *ebiten.DrawImageOptions)

func DrawRoundedRect

func DrawRoundedRect(context *guigui.Context, dst *ebiten.Image, bounds image.Rectangle, clr color.Color, radius int)

func DrawRoundedRectBorder

func DrawRoundedRectBorder(context *guigui.Context, dst *ebiten.Image, bounds image.Rectangle, clr1, clr2 color.Color, radius int, borderWidth float32, borderType RoundedRectBorderType)

func DrawRoundedRectBorderWithSharpCorners

func DrawRoundedRectBorderWithSharpCorners(context *guigui.Context, dst *ebiten.Image, bounds image.Rectangle, clr1, clr2 color.Color, radius int, borderWidth float32, borderType RoundedRectBorderType, sharpCorners Corners)

func DrawRoundedRectWithSharpCorners

func DrawRoundedRectWithSharpCorners(context *guigui.Context, dst *ebiten.Image, bounds image.Rectangle, clr color.Color, radius int, sharpCorners Corners)

func DrawRoundedShadowRect

func DrawRoundedShadowRect(context *guigui.Context, dst *ebiten.Image, bounds image.Rectangle, clr color.Color, radius int)

func EqualColor

func EqualColor(c0, c1 color.Color) bool

func FocusBorderColor

func FocusBorderColor(colorMode ebiten.ColorMode) color.Color

func HeaderSeparatorColor

func HeaderSeparatorColor(colorMode ebiten.ColorMode, enabled bool) color.Color

func IconColor

func IconColor(colorMode ebiten.ColorMode) color.Color

func InfoTintColor

func InfoTintColor() color.Color

InfoTintColor returns the tint marking neutral information.

func ItemHighlightedBackgroundColor

func ItemHighlightedBackgroundColor(colorMode ebiten.ColorMode) color.Color

func ItemHighlightedTextColor

func ItemHighlightedTextColor(colorMode ebiten.ColorMode) color.Color

func ItemHoveredBackgroundColor

func ItemHoveredBackgroundColor(colorMode ebiten.ColorMode) color.Color

func ItemSelectedDisabledBackgroundColor

func ItemSelectedDisabledBackgroundColor(colorMode ebiten.ColorMode) color.Color

func ItemSelectedUnfocusedBackgroundColor

func ItemSelectedUnfocusedBackgroundColor(colorMode ebiten.ColorMode) color.Color

func ItemStripeBackgroundColor

func ItemStripeBackgroundColor(colorMode ebiten.ColorMode) color.Color
func MenuBackgroundColor(colorMode ebiten.ColorMode, enabled bool) color.Color

MenuBackgroundColor returns the color for the surface of a menu.

func MixColors

func MixColors(clr0, clr1 color.Color, rate float64) color.Color

func OverlapsWithRoundedCorner

func OverlapsWithRoundedCorner(bounds image.Rectangle, radius int, srcBounds image.Rectangle) bool

func OverlayBackgroundColor

func OverlayBackgroundColor(colorMode ebiten.ColorMode) color.Color

func OverlayBorderColor

func OverlayBorderColor(colorMode ebiten.ColorMode) color.Color

func PopupBackgroundColor

func PopupBackgroundColor(colorMode ebiten.ColorMode) color.Color

func PopupBackgroundColorFromTint

func PopupBackgroundColorFromTint(colorMode ebiten.ColorMode, tint color.Color) color.Color

PopupBackgroundColorFromTint returns the background color for a popup tinted with tint. A nil tint returns the color for an untinted popup.

func PopupDarkBackgroundColor

func PopupDarkBackgroundColor(colorMode ebiten.ColorMode, openingRate float64) color.Color

func PressedButtonBackgroundColor

func PressedButtonBackgroundColor(colorMode ebiten.ColorMode, hovered bool) color.Color

PressedButtonBackgroundColor returns the color for a button that is kept pressed.

func PrimaryButtonBackgroundColor

func PrimaryButtonBackgroundColor(colorMode ebiten.ColorMode, pressed bool, hovered bool) color.Color

func RadioButtonMarkColor

func RadioButtonMarkColor(colorMode ebiten.ColorMode, enabled bool) color.Color

func ScaleAlpha

func ScaleAlpha(clr color.Color, alpha float64) color.Color

func ScrollBarColor

func ScrollBarColor(colorMode ebiten.ColorMode) color.Color

func ShadowColor

func ShadowColor(colorMode ebiten.ColorMode) color.Color

func SliderTickColor

func SliderTickColor(colorMode ebiten.ColorMode) color.Color

func SuccessTintColor

func SuccessTintColor() color.Color

SuccessTintColor returns the tint marking a successful result.

func TextActiveCompositionColor

func TextActiveCompositionColor(colorMode ebiten.ColorMode) color.Color

func TextCaretColor

func TextCaretColor(colorMode ebiten.ColorMode) color.Color

func TextColor

func TextColor(colorMode ebiten.ColorMode, enabled bool) color.Color

func TextColorFromTint

func TextColorFromTint(colorMode ebiten.ColorMode, tint color.Color) color.Color

TextColorFromTint returns the color for text tinted with tint. A nil tint returns the color for enabled text.

func TextInactiveCompositionColor

func TextInactiveCompositionColor(colorMode ebiten.ColorMode) color.Color

func TextOnAccentColor

func TextOnAccentColor(colorMode ebiten.ColorMode) color.Color

func TextSelectionColor

func TextSelectionColor(colorMode ebiten.ColorMode) color.Color

func ThumbColor

func ThumbColor(colorMode ebiten.ColorMode, enabled bool) color.Color

func ThumbHoveredColor

func ThumbHoveredColor(colorMode ebiten.ColorMode) color.Color

func ThumbPressedColor

func ThumbPressedColor(colorMode ebiten.ColorMode) color.Color

func TrackColor

func TrackColor(colorMode ebiten.ColorMode, on bool, pressed bool) color.Color

func TrackFillColor

func TrackFillColor(colorMode ebiten.ColorMode, enabled bool) color.Color

TrackFillColor returns the color for the filled part of a track.

func WarningTintColor

func WarningTintColor() color.Color

WarningTintColor returns the tint marking a condition that needs attention.

Types

type Corners

type Corners struct {
	TopStart    bool
	TopEnd      bool
	BottomStart bool
	BottomEnd   bool
}

type RoundedRectBorderType

type RoundedRectBorderType int
const (
	RoundedRectBorderTypeRegular RoundedRectBorderType = iota
	RoundedRectBorderTypeInset
	RoundedRectBorderTypeOutset
)

Jump to

Keyboard shortcuts

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