color.RGBA is no longer hardcoded
This commit is contained in:
parent
6e316d18bc
commit
778cdb6827
@ -13,11 +13,13 @@ type Drawer struct { TypeSetter }
|
||||
// Draw draws the drawer's text onto the specified canvas at the given offset.
|
||||
func (drawer Drawer) Draw (
|
||||
destination draw.Image,
|
||||
color color.RGBA,
|
||||
color color.Color,
|
||||
offset image.Point,
|
||||
) (
|
||||
updatedRegion image.Rectangle,
|
||||
) {
|
||||
source := image.NewUniform(color)
|
||||
|
||||
drawer.For (func (
|
||||
index int,
|
||||
char rune,
|
||||
@ -39,7 +41,7 @@ func (drawer Drawer) Draw (
|
||||
draw.DrawMask (
|
||||
destination,
|
||||
destinationRectangle,
|
||||
image.NewUniform(color), image.Point { },
|
||||
source, image.Point { },
|
||||
mask, maskPoint,
|
||||
draw.Over)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user