Edit me


import "fyne.io/fyne/canvas"


type Rectangle

type Rectangle struct {
	FillColor   color.Color // The rectangle fill color
	StrokeColor color.Color // The rectangle stroke color
	StrokeWidth float32     // The stroke width of the rectangle

Rectangle describes a colored rectangle primitive in a Fyne canvas

func NewRectangle

func NewRectangle(color color.Color) *Rectangle

NewRectangle returns a new Rectangle instance

func (*Rectangle) Hide

func (r *Rectangle) Hide()

Hide will set this object to not be visible

func (*Rectangle) MinSize

func (r *Rectangle) MinSize() fyne.Size

MinSize returns the specified minimum size, if set, or {1, 1} otherwise

func (*Rectangle) Move

func (r *Rectangle) Move(pos fyne.Position)

Move the rectangle object to a new position, relative to its parent / canvas

func (*Rectangle) Position

func (r *Rectangle) Position() fyne.Position

CurrentPosition gets the current position of this rectangle object, relative to its parent / canvas

func (*Rectangle) Refresh

func (r *Rectangle) Refresh()

Refresh causes this object to be redrawn in it’s current state

func (*Rectangle) Resize

func (r *Rectangle) Resize(size fyne.Size)

Resize sets a new size for the rectangle object

func (*Rectangle) SetMinSize

func (r *Rectangle) SetMinSize(size fyne.Size)

SetMinSize specifies the smallest size this object should be

func (*Rectangle) Show

func (r *Rectangle) Show()

Show will set this object to be visible

func (*Rectangle) Size

func (r *Rectangle) Size() fyne.Size

CurrentSize returns the current size of this rectangle object

func (*Rectangle) Visible

func (r *Rectangle) Visible() bool

IsVisible returns true if this object is visible, false otherwise