builtin

package
v0.0.0-...-d623aaa Latest Latest
Warning

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

Go to latest
Published: May 28, 2018 License: ISC Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Namespace = "https://yuml.ovo.ovh/schema/components/1.0"

Variables

View Source
var AllComponents = map[string]components.ComponentProvider{
	"Page":   makePage,
	"Canvas": makeCanvas,
	"Image":  makeImage,
	"Label":  makeLabel,
}

Functions

This section is empty.

Types

type Canvas

type Canvas struct {
	components.Base
	// contains filtered or unexported fields
}

Canvas is a container that has absolute positioning and sizing regardless of parent/siblings. While Canvas can hold multiple childrens, those childrens will share the same position/size so they will all overlap each other. It is therefore recommended to only put one component inside a Canvas.

func (*Canvas) Draw

func (c *Canvas) Draw()

func (*Canvas) SetBounds

func (c *Canvas) SetBounds(bounds components.Bounds)

func (*Canvas) SetPosition

func (c *Canvas) SetPosition(position image.Point)

func (*Canvas) SetRect

func (c *Canvas) SetRect(rect image.Rectangle)

func (*Canvas) SetSize

func (c *Canvas) SetSize(size image.Point)

func (*Canvas) String

func (c *Canvas) String() string

type Image

type Image struct {
	components.Drawable
	// contains filtered or unexported fields
}

Image is a simple box that can contain an image or any sort of drawable surface

func (*Image) ClearFlags

func (i *Image) ClearFlags()

func (*Image) Draw

func (i *Image) Draw()

func (*Image) SetImage

func (i *Image) SetImage(img *image.RGBA)

func (*Image) SetPath

func (i *Image) SetPath(src string) error

func (*Image) ShouldDraw

func (i *Image) ShouldDraw() bool

func (*Image) String

func (i *Image) String() string

type Label

type Label struct {
	components.Base
	components.Text
}

Label is a drawable text label

func (*Label) Draw

func (l *Label) Draw()

Draw draws the label on screen

func (*Label) ShouldDraw

func (l *Label) ShouldDraw() bool

ShouldDraw returns whether the label needs to be re-drawn

func (*Label) String

func (l *Label) String() string

type Page

type Page struct {
	components.Base
	// contains filtered or unexported fields
}

Page is a special canvas container with less checks

func (*Page) Draw

func (r *Page) Draw()

func (*Page) SetRect

func (r *Page) SetRect(rect image.Rectangle)

func (*Page) SetSize

func (r *Page) SetSize(size image.Point)

func (*Page) ShouldDraw

func (r *Page) ShouldDraw() bool

func (*Page) String

func (r *Page) String() string

Jump to

Keyboard shortcuts

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