shapes

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package shapes contains various drawable shapes

Index

Constants

This section is empty.

Variables

View Source
var Get = gets{

	Box: func(e *entity.Entity) Box {
		return e.Get(TYPE.Box).(Box)
	},
}

Get a geometry component

View Source
var TYPE = types{
	Box: reflect.TypeOf(Box{}),
}

TYPE hold the reflect.Type for our shapes components

Functions

This section is empty.

Types

type Box

type Box struct {
	Size  geometry.Size // The box size
	Scale float32       // The box scale
}

Box is a rectangular shape that we could draw in a geometry.Point with a color.Solid or color.Gradient

func (Box) Contains

func (b Box) Contains(at geometry.Point, point geometry.Point) bool

Contains return if a box at a geometry.Point contains a point

Jump to

Keyboard shortcuts

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