aboutsummaryrefslogtreecommitdiffstats
path: root/len_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'len_test.go')
-rw-r--r--len_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/len_test.go b/len_test.go
new file mode 100644
index 0000000..269f90c
--- /dev/null
+++ b/len_test.go
@@ -0,0 +1,14 @@
+package gui_test
+
+import (
+ "fmt"
+
+ "github.com/faiface/gui"
+)
+
+func ExampleRelative() {
+ var l gui.Length = gui.Relative(0.10) // 10%
+ fmt.Println(l.Px(100))
+ // Output:
+ // 10
+}