Documentation
¶
Index ¶
- Variables
- func EqualBorderStroke(a, b *BorderStroke) bool
- func IsSpecifiedBorderStroke(bs *BorderStroke) bool
- func SameBorderStroke(a, b *BorderStroke) bool
- func SemanticEqualBorderStroke(a, b *BorderStroke) bool
- func StringBorderStroke(bs *BorderStroke) string
- type BorderStroke
- func CoalesceBorderStroke(ptr, def *BorderStroke) *BorderStroke
- func CopyBorderStroke(bs *BorderStroke, options ...BorderStrokeOption) *BorderStroke
- func MergeBorderStroke(a, b *BorderStroke) *BorderStroke
- func NewBorderStroke(width unit.Dp, brush graphics.Brush) *BorderStroke
- func NewBorderStrokeWithColor(width unit.Dp, color graphics.Color) *BorderStroke
- func TakeOrElseBorderStroke(bs, defaultBS *BorderStroke) *BorderStroke
- type BorderStrokeOption
Constants ¶
This section is empty.
Variables ¶
var BorderStrokeUnspecified = &BorderStroke{ Width: unit.DpUnspecified, Brush: graphics.BrushUnspecified, }
1. BorderStrokeUnspecified is the sentinel singleton for an unspecified BorderStroke.
Functions ¶
func EqualBorderStroke ¶
func EqualBorderStroke(a, b *BorderStroke) bool
9. EqualBorderStroke returns true if a and b are semantically equal.
func IsSpecifiedBorderStroke ¶
func IsSpecifiedBorderStroke(bs *BorderStroke) bool
2. IsSpecifiedBorderStroke returns true if the BorderStroke is specified (not nil and not the Unspecified singleton).
func SameBorderStroke ¶
func SameBorderStroke(a, b *BorderStroke) bool
7. SameBorderStroke returns true if a and b are the same pointer or both unspecified.
func SemanticEqualBorderStroke ¶
func SemanticEqualBorderStroke(a, b *BorderStroke) bool
8. SemanticEqualBorderStroke checks field-by-field equality.
func StringBorderStroke ¶
func StringBorderStroke(bs *BorderStroke) string
5. StringBorderStroke returns a string representation of BorderStroke.
Types ¶
type BorderStroke ¶
type BorderStroke struct {
// Width of the border. Use unit.DpHairline for a one-pixel border.
Width unit.Dp
// Brush to paint the border with.
Brush graphics.Brush
}
BorderStroke specifies the stroke to draw a border with.
func CoalesceBorderStroke ¶
func CoalesceBorderStroke(ptr, def *BorderStroke) *BorderStroke
6. CoalesceBorderStroke returns ptr if not nil, otherwise returns def.
func CopyBorderStroke ¶
func CopyBorderStroke(bs *BorderStroke, options ...BorderStrokeOption) *BorderStroke
10. CopyBorderStroke creates a copy with optional modifications.
func MergeBorderStroke ¶
func MergeBorderStroke(a, b *BorderStroke) *BorderStroke
4. MergeBorderStroke merges two BorderStrokes, preferring b's specified values over a's.
func NewBorderStroke ¶
func NewBorderStroke(width unit.Dp, brush graphics.Brush) *BorderStroke
NewBorderStroke creates a new BorderStroke with the given width and brush.
func NewBorderStrokeWithColor ¶
func NewBorderStrokeWithColor(width unit.Dp, color graphics.Color) *BorderStroke
NewBorderStrokeWithColor creates a new BorderStroke with the given width and solid color. This is a convenience function equivalent to NewBorderStroke(width, &graphics.SolidColor{Value: color}).
func TakeOrElseBorderStroke ¶
func TakeOrElseBorderStroke(bs, defaultBS *BorderStroke) *BorderStroke
3. TakeOrElseBorderStroke returns bs if specified, otherwise returns defaultBS.
type BorderStrokeOption ¶
type BorderStrokeOption func(*BorderStroke)
BorderStrokeOption is a functional option for CopyBorderStroke.
func WithBorderStrokeBrush ¶
func WithBorderStrokeBrush(brush graphics.Brush) BorderStrokeOption
WithBorderStrokeBrush sets the brush option.
func WithBorderStrokeWidth ¶
func WithBorderStrokeWidth(width unit.Dp) BorderStrokeOption
WithBorderStrokeWidth sets the width option.
Directories
¶
| Path | Synopsis |
|---|---|
|
next
|
|
|
text/input
Package input provides text field state management and editing infrastructure.
|
Package input provides text field state management and editing infrastructure. |
|
text/input/internal
Package internal provides internal implementation details for text input.
|
Package internal provides internal implementation details for text input. |
|
text/input/internal/selection
Package selection provides selection state management for text fields.
|
Package selection provides selection state management for text fields. |
|
text/input/internal/undo
Package undo provides undo/redo infrastructure for text editing.
|
Package undo provides undo/redo infrastructure for text editing. |
|
text/modifiers
Package modifiers provides text modifier implementations for foundation text components.
|
Package modifiers provides text modifier implementations for foundation text components. |
|
text/selection
Package selection provides text selection functionality for Compose Foundation.
|
Package selection provides text selection functionality for Compose Foundation. |