mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 02:42:02 +01:00
parent
9aedafbb1a
commit
d407607168
16
image.go
16
image.go
@ -103,8 +103,11 @@ type DrawImageOptions struct {
|
|||||||
GeoM GeoM
|
GeoM GeoM
|
||||||
|
|
||||||
// ColorScale is a scale of color.
|
// ColorScale is a scale of color.
|
||||||
// ColorScale is slightly different from ColorM's Scale in terms of alphas:
|
//
|
||||||
// ColorScale is applied to premultiplied-alpha colors, while ColorM is applied to straight-alpha colors.
|
// 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).
|
||||||
|
//
|
||||||
// The default (zero) value is identity, which is (1, 1, 1, 1).
|
// The default (zero) value is identity, which is (1, 1, 1, 1).
|
||||||
ColorScale ColorScale
|
ColorScale ColorScale
|
||||||
|
|
||||||
@ -188,9 +191,12 @@ func (i *Image) adjustedRegion() graphicsdriver.Region {
|
|||||||
// DrawImage works more efficiently as batches
|
// DrawImage works more efficiently as batches
|
||||||
// when the successive calls of DrawImages satisfy the below conditions:
|
// when the successive calls of DrawImages satisfy the below conditions:
|
||||||
//
|
//
|
||||||
// - All render targets are same (A in A.DrawImage(B, op))
|
// - All render targets are the same (A in A.DrawImage(B, op))
|
||||||
// - All Blend values are same
|
// - All Blend values are the same
|
||||||
// - All Filter values are same
|
// - All Filter values are the same
|
||||||
|
//
|
||||||
|
// A whole image and its sub-image are considered to be the same, but some
|
||||||
|
// environments like browsers might not work efficiently (#2471).
|
||||||
//
|
//
|
||||||
// Even when all the above conditions are satisfied, multiple draw commands can
|
// Even when all the above conditions are satisfied, multiple draw commands can
|
||||||
// be used in really rare cases. Ebitengine images usually share an internal
|
// be used in really rare cases. Ebitengine images usually share an internal
|
||||||
|
Loading…
Reference in New Issue
Block a user