clip

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ellipse

type Ellipse = clip.Ellipse

type FRRect added in v0.4.0

type FRRect struct {
	Rect FRect
	// The corner radii.
	SE, SW, NW, NE float32
}

FRRect represents the clip area of a rectangle with rounded corners.

Specify a square with corner radii equal to half the square size to construct a circular clip area.

func UniformFRRect added in v0.4.0

func UniformFRRect(rect FRect, radius float32) FRRect

func (FRRect) IntoPath added in v0.4.0

func (rr FRRect) IntoPath(p *clip.Path)

func (FRRect) Op added in v0.4.0

func (rr FRRect) Op(ops *op.Ops) Op

Op returns the op for the rounded rectangle.

func (FRRect) Path added in v0.4.0

func (rr FRRect) Path(ops *op.Ops) PathSpec

Path returns the PathSpec for the rounded rectangle.

func (FRRect) Push added in v0.4.0

func (rr FRRect) Push(ops *op.Ops) Stack

Push the rectangle clip on the clip stack.

type FRect

type FRect struct {
	Min f32.Point
	Max f32.Point
}

func (FRect) Contains added in v0.4.0

func (r FRect) Contains(pt f32.Point) bool

func (FRect) Dx added in v0.4.0

func (r FRect) Dx() float32

func (FRect) Dy added in v0.4.0

func (r FRect) Dy() float32

func (FRect) IntoPath

func (r FRect) IntoPath(p *clip.Path)

func (FRect) IntoPathR

func (r FRect) IntoPathR(p *clip.Path)

func (FRect) Op

func (r FRect) Op(ops *op.Ops) clip.Op

func (FRect) Path

func (r FRect) Path(ops *op.Ops) clip.PathSpec

type Op

type Op = clip.Op

type Outline

type Outline = clip.Outline

type Path

type Path = clip.Path

type PathSpec

type PathSpec = clip.PathSpec

type RRect

type RRect = clip.RRect

type Rect

type Rect = clip.Rect

type RectangularOutline

type RectangularOutline struct {
	Rect  FRect
	Width float32
}

func (RectangularOutline) Op

func (out RectangularOutline) Op(ops *op.Ops) clip.Op

type Stack

type Stack = clip.Stack

type Stroke

type Stroke = clip.Stroke

Jump to

Keyboard shortcuts

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