Updated everything else to match

This commit is contained in:
2023-02-02 01:48:16 -05:00
parent 99942466f8
commit 892c74a9da
40 changed files with 304 additions and 759 deletions

View File

@@ -3,11 +3,11 @@ package artist
import "math"
import "image"
import "image/color"
import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/canvas"
// FillEllipse draws a filled ellipse with the specified pattern.
func FillEllipse (
destination tomo.Canvas,
destination canvas.Canvas,
source Pattern,
bounds image.Rectangle,
) (
@@ -36,7 +36,7 @@ func FillEllipse (
// StrokeEllipse draws the outline of an ellipse with the specified line weight
// and pattern.
func StrokeEllipse (
destination tomo.Canvas,
destination canvas.Canvas,
source Pattern,
weight int,
bounds image.Rectangle,

View File

@@ -2,14 +2,14 @@ package artist
import "image"
import "image/color"
import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/canvas"
// TODO: draw thick lines more efficiently
// Line draws a line from one point to another with the specified weight and
// pattern.
func Line (
destination tomo.Canvas,
destination canvas.Canvas,
source Pattern,
weight int,
min image.Point,
@@ -46,7 +46,7 @@ func Line (
}
func lineLow (
destination tomo.Canvas,
destination canvas.Canvas,
source Pattern,
weight int,
min image.Point,
@@ -82,7 +82,7 @@ func lineLow (
}
func lineHigh (
destination tomo.Canvas,
destination canvas.Canvas,
source Pattern,
weight int,
min image.Point,

View File

@@ -1,12 +1,12 @@
package artist
import "image"
import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/canvas"
// Paste transfers one canvas onto another, offset by the specified point.
func Paste (
destination tomo.Canvas,
source tomo.Canvas,
destination canvas.Canvas,
source canvas.Canvas,
offset image.Point,
) (
updatedRegion image.Rectangle,
@@ -31,7 +31,7 @@ func Paste (
// FillRectangle draws a filled rectangle with the specified pattern.
func FillRectangle (
destination tomo.Canvas,
destination canvas.Canvas,
source Pattern,
bounds image.Rectangle,
) (
@@ -61,7 +61,7 @@ func FillRectangle (
// StrokeRectangle draws the outline of a rectangle with the specified line
// weight and pattern.
func StrokeRectangle (
destination tomo.Canvas,
destination canvas.Canvas,
source Pattern,
weight int,
bounds image.Rectangle,

View File

@@ -6,7 +6,7 @@ import "unicode"
import "image/draw"
import "golang.org/x/image/font"
import "golang.org/x/image/math/fixed"
import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/canvas"
type characterLayout struct {
x int
@@ -95,7 +95,7 @@ func (drawer *TextDrawer) SetAlignment (align Align) {
// Draw draws the drawer's text onto the specified canvas at the given offset.
func (drawer *TextDrawer) Draw (
destination tomo.Canvas,
destination canvas.Canvas,
source Pattern,
offset image.Point,
) (