From 28cd889254eea5a4fdb21f7a93005d99954e8d2c Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Fri, 8 Sep 2023 20:57:15 -0400 Subject: [PATCH] Removed tiler for now, needs to be rethought a bit --- canvas/canvas.go | 1 - canvas/texture.go | 16 ---------------- object.go | 2 -- 3 files changed, 19 deletions(-) diff --git a/canvas/canvas.go b/canvas/canvas.go index 64d4273..8468f98 100644 --- a/canvas/canvas.go +++ b/canvas/canvas.go @@ -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. diff --git a/canvas/texture.go b/canvas/texture.go index fe269a5..6fb2a05 100644 --- a/canvas/texture.go +++ b/canvas/texture.go @@ -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 -} diff --git a/object.go b/object.go index 2b3d246..869cd45 100644 --- a/object.go +++ b/object.go @@ -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)