• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mlange-42 / ark-pixel / 13708837715

06 Mar 2025 09:48PM CUT coverage: 79.07%. First build
13708837715

push

github

web-flow
Add OpenGL window (#2)

68 of 86 new or added lines in 3 files covered. (79.07%)

68 of 86 relevant lines covered (79.07%)

32.02 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/window/util.go
1
package window
2

3
import (
4
        "math"
5

6
        "github.com/gopxl/pixel/v2/backends/opengl"
7
)
8

9
// Scale calculates the drawing scale for fitting a source region into a window's canvas.
10
func Scale(win *opengl.Window, srcWidth, srcHeight float64) float64 {
1✔
11
        winWidth, winHeight := win.Canvas().Bounds().W(), win.Canvas().Bounds().H()
1✔
12
        scX, scY := winWidth/float64(srcWidth), winHeight/float64(srcHeight)
1✔
13
        return math.Min(scX, scY)
1✔
14
}
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc