diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2026-02-25 18:22:31 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2026-02-25 18:22:31 -0500 |
| commit | 7ed10a4fc3c95244d347aa313f0d334aab962f80 (patch) | |
| tree | 9f1e1806c87ac7de22d6abe5696f30aff2f8da2d /len_test.go | |
| parent | 63095aa509e2e3ce113a2681db520d2961284f71 (diff) | |
| download | gui-7ed10a4fc3c95244d347aa313f0d334aab962f80.zip | |
update examples to use new Env interface
Diffstat (limited to 'len_test.go')
| -rw-r--r-- | len_test.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/len_test.go b/len_test.go index 91b0886..269f90c 100644 --- a/len_test.go +++ b/len_test.go @@ -2,15 +2,13 @@ package gui_test import ( "fmt" - "image" "github.com/faiface/gui" ) func ExampleRelative() { - var l Length = Relative(0.10) // 10% - r := image.Rect(0, 0, 100, 100) // 100x100 rectangle - fmt.Println(l.Px(r)) + var l gui.Length = gui.Relative(0.10) // 10% + fmt.Println(l.Px(100)) // Output: // 10 } |