mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
Fix misspellings
This commit is contained in:
parent
c30918261b
commit
cbe4844fa0
@ -252,7 +252,7 @@ type TouchEnd struct {
|
||||
Primary bool
|
||||
}
|
||||
|
||||
// TouchCancel occurs when a touch is canceled. This can happen in various situations, depending on the underlying platform, for example when the aplication loses focus.
|
||||
// TouchCancel occurs when a touch is canceled. This can happen in various situations, depending on the underlying platform, for example when the application loses focus.
|
||||
type TouchCancel struct {
|
||||
// ID identifies the touch that caused the touch event.
|
||||
ID int
|
||||
|
@ -274,7 +274,7 @@ var (
|
||||
Members: membersTouch,
|
||||
},
|
||||
{
|
||||
Comment: "TouchCancel occurs when a touch is canceled. This can happen in various situations, depending on the underlying platform, for example when the aplication loses focus.",
|
||||
Comment: "TouchCancel occurs when a touch is canceled. This can happen in various situations, depending on the underlying platform, for example when the application loses focus.",
|
||||
Members: []Member{
|
||||
{
|
||||
Comment: "ID identifies the touch that caused the touch event.",
|
||||
|
@ -252,7 +252,7 @@ type TouchEnd struct {
|
||||
Primary bool
|
||||
}
|
||||
|
||||
// TouchCancel occurs when a touch is canceled. This can happen in various situations, depending on the underlying platform, for example when the aplication loses focus.
|
||||
// TouchCancel occurs when a touch is canceled. This can happen in various situations, depending on the underlying platform, for example when the application loses focus.
|
||||
type TouchCancel struct {
|
||||
// ID identifies the touch that caused the touch event.
|
||||
ID int
|
||||
|
@ -24,8 +24,8 @@ import (
|
||||
type rectToPixels struct {
|
||||
m map[image.Rectangle][]byte
|
||||
|
||||
lastr image.Rectangle
|
||||
lastpix []byte
|
||||
lastR image.Rectangle
|
||||
lastPix []byte
|
||||
}
|
||||
|
||||
func (rtp *rectToPixels) addOrReplace(pixels []byte, x, y, width, height int) {
|
||||
@ -45,8 +45,8 @@ func (rtp *rectToPixels) addOrReplace(pixels []byte, x, y, width, height int) {
|
||||
if r == newr {
|
||||
// Replace the region.
|
||||
rtp.m[r] = copied
|
||||
if r == rtp.lastr {
|
||||
rtp.lastpix = copied
|
||||
if r == rtp.lastR {
|
||||
rtp.lastPix = copied
|
||||
}
|
||||
return
|
||||
}
|
||||
@ -57,8 +57,8 @@ func (rtp *rectToPixels) addOrReplace(pixels []byte, x, y, width, height int) {
|
||||
|
||||
// Add the region.
|
||||
rtp.m[newr] = copied
|
||||
if newr == rtp.lastr {
|
||||
rtp.lastpix = copied
|
||||
if newr == rtp.lastR {
|
||||
rtp.lastPix = copied
|
||||
}
|
||||
}
|
||||
|
||||
@ -84,16 +84,16 @@ func (rtp *rectToPixels) at(i, j int) (byte, byte, byte, byte, bool) {
|
||||
var pix []byte
|
||||
|
||||
var r *image.Rectangle
|
||||
if pt := image.Pt(i, j); pt.In(rtp.lastr) {
|
||||
r = &rtp.lastr
|
||||
pix = rtp.lastpix
|
||||
if pt := image.Pt(i, j); pt.In(rtp.lastR) {
|
||||
r = &rtp.lastR
|
||||
pix = rtp.lastPix
|
||||
} else {
|
||||
for rr := range rtp.m {
|
||||
if pt.In(rr) {
|
||||
r = &rr
|
||||
rtp.lastr = rr
|
||||
rtp.lastR = rr
|
||||
pix = rtp.m[rr]
|
||||
rtp.lastpix = pix
|
||||
rtp.lastPix = pix
|
||||
break
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user