Merge fixes: one Rule, ArtifactKind, CommandRun and abs32 across groups

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 14:38:42 -04:00
1 parent 009b2bfaf4
commit 847612f244
6 files changed
+6 -37

No files matched your search

-9
View File
@@ -1,9 +0,0 @@
package internal
import "github.com/egoist/mygo/ui"
// Rule draws a pixel-aligned 1 DIP horizontal line at y.
func Rule(p *ui.Painter, x0, x1, y float32, c ui.Color) {
yy := ruleY(p, y)
p.Line(x0, yy, x1, yy, 1, c)
}
-6
View File
@@ -189,12 +189,6 @@ func Sector(cx, cy, r0, r1 float32, a0, a1 float64) *ui.Path {
return &path
}
// Rule draws a pixel-aligned 1 DIP horizontal line at y.
func Rule(p *ui.Painter, x0, x1, y float32, c ui.Color) {
yy := ruleY(p, y)
p.Line(x0, yy, x1, yy, 1, c)
}
// AxisY draws grid lines and tick labels left of plot.
func AxisY(p *ui.Painter, plot ui.Rect, s Linear, ticks []float64, label func(float64) string, size float32, k theme.Tokens) {
for _, t := range ticks {
+6
View File
@@ -6,6 +6,12 @@ import (
"github.com/egoist/mygo/ui"
)
// Rule draws a pixel-aligned 1 DIP horizontal line at y.
func Rule(p *ui.Painter, x0, x1, y float32, c ui.Color) {
yy := ruleY(p, y)
p.Line(x0, yy, x1, yy, 1, c)
}
// ruleY moves y to where a 1 DIP line fills whole device pixels.
func ruleY(p *ui.Painter, y float32) float32 {
s := float64(p.Scale())