Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CutCornerShapeUnspecified = &CutCornerShape{ Radius: unit.DpUnspecified, }
View Source
var RoundedCornerShapeUnspecified = &RoundedCornerShape{ Radius: unit.DpUnspecified, TopStart: unit.DpUnspecified, TopEnd: unit.DpUnspecified, BottomEnd: unit.DpUnspecified, BottomStart: unit.DpUnspecified, }
Functions ¶
func EqualShape ¶
func IsSpecifiedShape ¶
func SemanticEqualShape ¶
func StringShape ¶
Types ¶
type RoundedCornerShape ¶
type RoundedCornerShape struct {
// Uniform radius applied to all corners (used when per-corner fields are all zero)
Radius unit.Dp
// Per-corner radius (following LTR layout direction):
// TopStart = NW (top-left), TopEnd = NE (top-right)
// BottomEnd = SE (bottom-right), BottomStart = SW (bottom-left)
TopStart unit.Dp
TopEnd unit.Dp
BottomEnd unit.Dp
BottomStart unit.Dp
}
RoundedCornerShape supports uniform radius via Radius, or per-corner radius via TopStart (NW), TopEnd (NE), BottomEnd (SE), BottomStart (SW). Per-corner fields take precedence when any are non-zero. This follows Jetpack Compose's RoundedCornerShape API.
func (*RoundedCornerShape) CreateOutline ¶
type Shape ¶
type Shape interface {
CreateOutline(size image.Point, metric gioUnit.Metric) Outline
// contains filtered or unexported methods
}
var CircleShape Shape = &circleShape{}
CircleShape is a shape describing a circle.
var ShapeCircle Shape = &circleShape{}
Deprecated: Use CircleShape instead
var ShapeRectangle Shape = &rectangleShape{}
var ShapeUnspecified Shape = &ShapeUnspecifiedImpl{}
func CoalesceShape ¶
func CopyShape ¶
func CopyShape(s Shape, options ...ShapeOption) Shape
func MergeShape ¶
func TakeOrElseShape ¶
type ShapeOption ¶
type ShapeOption func(Shape)
func WithBottomEndRadius ¶
func WithBottomEndRadius(radius unit.Dp) ShapeOption
func WithBottomStartRadius ¶
func WithBottomStartRadius(radius unit.Dp) ShapeOption
func WithRadius ¶
func WithRadius(radius unit.Dp) ShapeOption
func WithTopEndRadius ¶
func WithTopEndRadius(radius unit.Dp) ShapeOption
RoundedCornerShape Options
type ShapeUnspecifiedImpl ¶
type ShapeUnspecifiedImpl struct {
}
func (*ShapeUnspecifiedImpl) CreateOutline ¶
Click to show internal directories.
Click to hide internal directories.