paint

package
v0.0.0-...-6902453 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorTexture

func ColorTexture(ops *op.Ops, c color.NRGBA) op.CallOp

func Group

func Group(ops *op.Ops, do func()) op.CallOp

Types

type BorderStroke

type BorderStroke struct {
	Top    StrokeStyle
	Right  StrokeStyle
	Bottom StrokeStyle
	Left   StrokeStyle
}

func (*BorderStroke) Eq

func (f *BorderStroke) Eq(v *BorderStroke) cmp.Result

func (*BorderStroke) PaintShape

func (f *BorderStroke) PaintShape(gtx layout.Context, s SizedShape)

func (*BorderStroke) SetBorderStroke

func (f *BorderStroke) SetBorderStroke(styles ...StrokeStyleWithPosition)

type BorderStrokeSetter

type BorderStrokeSetter interface {
	SetBorderStroke(styles ...StrokeStyleWithPosition)
}

type Clip

type Clip interface {
	Op(ops *op.Ops) clip.Op
}

func ClipFunc

func ClipFunc(fn func(ops *op.Ops) clip.Op) Clip

func ClipOutlineOf

func ClipOutlineOf(path clip.PathSpec) Clip

type ContentScale

type ContentScale struct {
	// contains filtered or unexported fields
}

func (*ContentScale) Fit

func (s *ContentScale) Fit(ops *op.Ops, imageSize image.Point, containerSize image.Point)

func (*ContentScale) SetContentScale

func (s *ContentScale) SetContentScale(scale contentscale.ContentScale)

type ContentScaleSetter

type ContentScaleSetter interface {
	SetContentScale(scale contentscale.ContentScale)
}

type CornerRadiusGetter

type CornerRadiusGetter interface {
	CornerRadius() CornerRadiusValues
}

type CornerRadiusSetter

type CornerRadiusSetter interface {
	SetCornerRadius(v unit.Dp, positions ...position.Position)
}

type CornerRadiusValues

type CornerRadiusValues struct {
	TopLeft     unit.Dp
	TopRight    unit.Dp
	BottomLeft  unit.Dp
	BottomRight unit.Dp
}

func (CornerRadiusValues) CornerRadius

func (r CornerRadiusValues) CornerRadius() CornerRadiusValues

func (*CornerRadiusValues) Eq

func (*CornerRadiusValues) SetCornerRadius

func (r *CornerRadiusValues) SetCornerRadius(dp unit.Dp, positions ...position.Position)

type Fill

type Fill struct {
	Color color.NRGBA
}

func (*Fill) Eq

func (f *Fill) Eq(v *Fill) cmp.Result

func (*Fill) PaintClip

func (f *Fill) PaintClip(gtx layout.Context, clip Clip)

func (*Fill) PaintOps

func (f *Fill) PaintOps(gtx layout.Context)

func (*Fill) SetFill

func (f *Fill) SetFill(c color.Color)

func (*Fill) Transparent

func (f *Fill) Transparent() bool

type FillSetter

type FillSetter interface {
	SetFill(c color.Color)
}

type Rect

type Rect struct {
	Width  unit.Dp
	Height unit.Dp
}

func NewRect

func NewRect() *Rect

func (*Rect) Eq

func (r *Rect) Eq(v *Rect) cmp.Result

func (*Rect) Equals

func (r *Rect) Equals(v any) cmp.Result

func (*Rect) Path

func (r *Rect) Path(gtx layout.Context, positions ...position.Position) *canvas.Path

func (*Rect) Rectangle

func (r *Rect) Rectangle(gtx layout.Context) image.Rectangle

func (*Rect) SetSize

func (r *Rect) SetSize(dp unit.Dp, types ...size.Type)

func (*Rect) Sized

func (r *Rect) Sized(t size.Type) size.SizingType

type RoundedRect

type RoundedRect struct {
	*Rect
	CornerRadiusValues
}

func NewRoundedRect

func NewRoundedRect() *RoundedRect

func (*RoundedRect) Eq

func (r *RoundedRect) Eq(v *RoundedRect) cmp.Result

func (*RoundedRect) Equals

func (r *RoundedRect) Equals(v any) cmp.Result

func (*RoundedRect) Path

func (r *RoundedRect) Path(gtx layout.Context, positions ...position.Position) *canvas.Path

type Shadow

type Shadow struct {
	// contains filtered or unexported fields
}

func (*Shadow) Eq

func (s *Shadow) Eq(v *Shadow) cmp.Result

func (*Shadow) Paint

func (s *Shadow) Paint(gtx layout.Context, shape SizedShape)

func (*Shadow) SetShadow

func (s *Shadow) SetShadow(elevation unit.Dp)

type ShadowSetter

type ShadowSetter interface {
	SetShadow(elevation unit.Dp)
}

type Shape

type Shape interface {
	Equals(v any) cmp.Result
	Rectangle(gtx layout.Context) image.Rectangle
	Path(gtx layout.Context, positions ...position.Position) *canvas.Path
}

type SizeSetter

type SizeSetter interface {
	SetSize(v unit.Dp, typs ...size.Type)
}

type SizedChecker

type SizedChecker interface {
	Sized(typ size.Type) size.SizingType
}

type SizedShape

type SizedShape interface {
	Shape

	SizeSetter
	SizedChecker
}

type StrokeStyle

type StrokeStyle struct {
	Width unit.Dp
	Color color.NRGBA
}

type StrokeStyleWithPosition

type StrokeStyleWithPosition struct {
	Position position.Position
	StrokeStyle
}

type Visibility

type Visibility struct {
	Visible bool
}

func (*Visibility) SetVisible

func (v *Visibility) SetVisible(visible bool)

type VisibleSetter

type VisibleSetter interface {
	SetVisible(visible bool)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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