Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text/v2: Draw modifies the given GeoM unexpectedly #2954

Closed
11 tasks
hajimehoshi opened this issue Apr 7, 2024 · 0 comments
Closed
11 tasks

text/v2: Draw modifies the given GeoM unexpectedly #2954

hajimehoshi opened this issue Apr 7, 2024 · 0 comments
Labels
Milestone

Comments

@hajimehoshi
Copy link
Owner

Ebitengine Version

85c0f44

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • PlayStation 5
  • Xbox
  • Web Browsers

Go Version (go version)

go version go1.22.2 darwin/arm64

What steps will reproduce the problem?

Run this test:

func TestGeoM(t *testing.T) {
	img := ebiten.NewImage(30, 30)

	op := &text.DrawOptions{}
	text.Draw(img, "Hello", text.NewGoXFace(bitmapfont.Face), op)

	if got, want := op.GeoM, (ebiten.GeoM{}); got != want {
		t.Errorf("got: %v, want: %v", got, want)
	}
}

What is the expected result?

The test passes

What happens instead?

The test fails

--- FAIL: TestGeoM (0.00s)
    text_test.go:367: got: {0 0 0 0 24 0}, want: {0 0 0 0 0 0}
FAIL

Anything else you feel useful to add?

@eihigh reported this. Thanks!

@hajimehoshi hajimehoshi added the bug label Apr 7, 2024
@hajimehoshi hajimehoshi added this to the v2.7.1 milestone Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant