ebiten: update comments

Updates #2171
This commit is contained in:
Hajime Hoshi 2023-03-20 11:04:55 +09:00
parent 337cde76b4
commit acf05b8d2b
2 changed files with 2 additions and 2 deletions

View File

@ -90,7 +90,7 @@ func (c *ColorScale) SetA(a float32) {
//
// Scale is slightly different from colorm.ColorM's Scale in terms of alphas.
// ColorScale is applied to premultiplied-alpha colors, while colorm.ColorM is applied to straight-alpha colors.
// Thus, colorm.ColorM.Scale(r, g, b, a) equals to ColorScale.Scale(r*a, g*a, b*a, a).
// Thus, ColorM.Scale(r, g, b, a) equals to ColorScale.Scale(r*a, g*a, b*a, a).
func (c *ColorScale) Scale(r, g, b, a float32) {
c.r_1 = (c.r_1+1)*r - 1
c.g_1 = (c.g_1+1)*g - 1

View File

@ -114,7 +114,7 @@ type DrawImageOptions struct {
//
// ColorScale is slightly different from colorm.ColorM's Scale in terms of alphas.
// ColorScale is applied to premultiplied-alpha colors, while colorm.ColorM is applied to straight-alpha colors.
// Thus, colorm.ColorM.Scale(r, g, b, a) equals to ColorScale.Scale(r*a, g*a, b*a, a).
// Thus, ColorM.Scale(r, g, b, a) equals to ColorScale.Scale(r*a, g*a, b*a, a).
//
// The default (zero) value is identity, which is (1, 1, 1, 1).
ColorScale ColorScale