mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
ebiten: remove ColorM.ReadElements
ReadElements is a new function as of v2.5, but at the same time, the colorm package is also added in v2.5. As ebiten.ColorM is deprecated, ebiten's ColorM.ReadElements should not be requried. Closes #2347
This commit is contained in:
parent
b75ed45d46
commit
f97d912605
16
colorm.go
16
colorm.go
@ -15,7 +15,6 @@
|
||||
package ebiten
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"image/color"
|
||||
|
||||
"github.com/hajimehoshi/ebiten/v2/internal/affine"
|
||||
@ -159,18 +158,3 @@ func (c *ColorM) IsInvertible() bool {
|
||||
func (c *ColorM) Invert() {
|
||||
c.impl = c.affineColorM().Invert()
|
||||
}
|
||||
|
||||
// ReadElements reads the body part and the translation part to the given float32 slices.
|
||||
//
|
||||
// len(body) must be 16 and len(translation) must be 4. Otherwise, ReadElements panics.
|
||||
//
|
||||
// Deprecated: as of v2.5. Use the colorm package instead.
|
||||
func (c *ColorM) ReadElements(body []float32, translation []float32) {
|
||||
if len(body) != 16 {
|
||||
panic(fmt.Sprintf("ebiten: len(body) must be 16 but %d", len(body)))
|
||||
}
|
||||
if len(translation) != 4 {
|
||||
panic(fmt.Sprintf("ebiten: len(translation) must be 4 but %d", len(translation)))
|
||||
}
|
||||
c.affineColorM().Elements(body, translation)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user