import "fyne.io/fyne/v2/canvas"
  

Usage

type RegularPolygon

  type RegularPolygon struct {
	FillColor    color.Color // The polygon fill color
	StrokeColor  color.Color // The polygon stroke color
	StrokeWidth  float32     // The stroke width of the polygon
	CornerRadius float32     // The radius of the polygon corners
	Angle        float32     // Angle of polygon, in degrees (positive means clockwise, negative means counter-clockwise direction).
	Sides        uint        //	Amount of sides of polygon.
}
  

RegularPolygon describes a colored regular polygon primitive in a Fyne canvas. The rendered portion will be in the center of the available space.

Since: 2.8

func NewRegularPolygon

  func NewRegularPolygon(sides uint, color color.Color) *RegularPolygon
  

NewRegularPolygon returns a new RegularPolygon instance

Since: 2.8

func (*RegularPolygon) Hide

  func (r *RegularPolygon) Hide()
  

Hide will set this polygon to not be visible

func (*RegularPolygon) MinSize

  func (o *RegularPolygon) MinSize() fyne.Size
  

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

func (*RegularPolygon) Move

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

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

func (*RegularPolygon) Position

  func (o *RegularPolygon) Position() fyne.Position
  

Position gets the current position of this canvas object, relative to its parent.

func (*RegularPolygon) Refresh

  func (r *RegularPolygon) Refresh()
  

Refresh causes this polygon to be redrawn with its configured state.

func (*RegularPolygon) Resize

  func (r *RegularPolygon) Resize(s fyne.Size)
  

Resize on a polygon updates the new size of this object. If it has a stroke width this will cause it to Refresh.

func (*RegularPolygon) SetMinSize

  func (o *RegularPolygon) SetMinSize(size fyne.Size)
  

SetMinSize specifies the smallest size this object should be.

func (*RegularPolygon) Show

  func (o *RegularPolygon) Show()
  

Show will set this object to be visible.

func (*RegularPolygon) Size

  func (o *RegularPolygon) Size() fyne.Size
  

Size returns the current size of this canvas object.

func (*RegularPolygon) Visible

  func (o *RegularPolygon) Visible() bool
  

Visible returns true if this object is visible, false otherwise.