Compare commits

...

2 Commits

Author SHA1 Message Date
Sasha Koshka 28cd889254 Removed tiler for now, needs to be rethought a bit 2023-09-08 20:57:15 -04:00
Sasha Koshka e682fdd9d8 Add icon for switch 2023-09-08 20:57:00 -04:00
4 changed files with 1 additions and 19 deletions

View File

@ -47,7 +47,6 @@ type Pen interface {
Stroke (color.Color) // Sets the stroke to a solid color
Fill (color.Color) // Sets the fill to a solid color
Texture (Texture) // Overlaps a texture onto the fill color
Tiler (Tiler) // Changes the way the texture is tiled
}
// Canvas is an image that supports drawing paths.

View File

@ -18,19 +18,3 @@ type TextureCloser interface {
Texture
io.Closer
}
// TileArea represents a tiled area of a texture.
type TileArea struct {
// Source specifies an area of the texture to sample.
Source image.Rectangle
// Destination specifies an area of the destination to draw the texture
// onto. If Destination is bigger than Source, the empty space will be
// filled by tiling the texture (clipped to source) normally.
Destination image.Rectangle
}
// Tiler is a type that changes the way a texture is drawn.
type Tiler interface {
Tile (image.Rectangle, Texture) []TileArea
}

View File

@ -136,8 +136,6 @@ type Box interface {
// transparent, it will be overlayed atop the color specified by
// SetColor().
SetTexture (canvas.Texture)
// SetTiler changes the way the texture is tiled.
SetTiler (canvas.Tiler)
// SetBorder sets the Border(s) of the box. The first Border will be the
// most outset, and the last Border will be the most inset.
SetBorder (...Border)

View File

@ -73,6 +73,7 @@ type Icon int; const (
// devices
IconDevice // generic
IconRouter
IconSwitch
IconServer
IconDesktop
IconLaptop