Merge branch 'main' of git.tebibyte.media:sashakoshka/tomo
This commit is contained in:
commit
14d1836209
@ -3,11 +3,11 @@ package artist
|
|||||||
import "math"
|
import "math"
|
||||||
import "image"
|
import "image"
|
||||||
import "image/color"
|
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.
|
// FillEllipse draws a filled ellipse with the specified pattern.
|
||||||
func FillEllipse (
|
func FillEllipse (
|
||||||
destination tomo.Canvas,
|
destination canvas.Canvas,
|
||||||
source Pattern,
|
source Pattern,
|
||||||
bounds image.Rectangle,
|
bounds image.Rectangle,
|
||||||
) (
|
) (
|
||||||
@ -36,7 +36,7 @@ func FillEllipse (
|
|||||||
// StrokeEllipse draws the outline of an ellipse with the specified line weight
|
// StrokeEllipse draws the outline of an ellipse with the specified line weight
|
||||||
// and pattern.
|
// and pattern.
|
||||||
func StrokeEllipse (
|
func StrokeEllipse (
|
||||||
destination tomo.Canvas,
|
destination canvas.Canvas,
|
||||||
source Pattern,
|
source Pattern,
|
||||||
weight int,
|
weight int,
|
||||||
bounds image.Rectangle,
|
bounds image.Rectangle,
|
||||||
|
|||||||
@ -2,14 +2,14 @@ package artist
|
|||||||
|
|
||||||
import "image"
|
import "image"
|
||||||
import "image/color"
|
import "image/color"
|
||||||
import "git.tebibyte.media/sashakoshka/tomo"
|
import "git.tebibyte.media/sashakoshka/tomo/canvas"
|
||||||
|
|
||||||
// TODO: draw thick lines more efficiently
|
// TODO: draw thick lines more efficiently
|
||||||
|
|
||||||
// Line draws a line from one point to another with the specified weight and
|
// Line draws a line from one point to another with the specified weight and
|
||||||
// pattern.
|
// pattern.
|
||||||
func Line (
|
func Line (
|
||||||
destination tomo.Canvas,
|
destination canvas.Canvas,
|
||||||
source Pattern,
|
source Pattern,
|
||||||
weight int,
|
weight int,
|
||||||
min image.Point,
|
min image.Point,
|
||||||
@ -46,7 +46,7 @@ func Line (
|
|||||||
}
|
}
|
||||||
|
|
||||||
func lineLow (
|
func lineLow (
|
||||||
destination tomo.Canvas,
|
destination canvas.Canvas,
|
||||||
source Pattern,
|
source Pattern,
|
||||||
weight int,
|
weight int,
|
||||||
min image.Point,
|
min image.Point,
|
||||||
@ -82,7 +82,7 @@ func lineLow (
|
|||||||
}
|
}
|
||||||
|
|
||||||
func lineHigh (
|
func lineHigh (
|
||||||
destination tomo.Canvas,
|
destination canvas.Canvas,
|
||||||
source Pattern,
|
source Pattern,
|
||||||
weight int,
|
weight int,
|
||||||
min image.Point,
|
min image.Point,
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
package artist
|
package artist
|
||||||
|
|
||||||
import "image"
|
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.
|
// Paste transfers one canvas onto another, offset by the specified point.
|
||||||
func Paste (
|
func Paste (
|
||||||
destination tomo.Canvas,
|
destination canvas.Canvas,
|
||||||
source tomo.Canvas,
|
source canvas.Canvas,
|
||||||
offset image.Point,
|
offset image.Point,
|
||||||
) (
|
) (
|
||||||
updatedRegion image.Rectangle,
|
updatedRegion image.Rectangle,
|
||||||