summaryrefslogtreecommitdiff
path: root/libs/cairo-1.16.0/util/cairo-script/examples/pythagoras-tree.cs
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2023-02-12 23:53:22 -0600
committersanine <sanine.not@pm.me>2023-02-12 23:53:22 -0600
commitf1fe73d1909a2448a004a88362a1a532d0d4f7c3 (patch)
treeab37ae3837e2f858de2932bcee9f26e69fab3db1 /libs/cairo-1.16.0/util/cairo-script/examples/pythagoras-tree.cs
parentf567ea1e2798fd3156a416e61f083ea3e6b95719 (diff)
switch to tinyobj and nanovg from assimp and cairo
Diffstat (limited to 'libs/cairo-1.16.0/util/cairo-script/examples/pythagoras-tree.cs')
-rw-r--r--libs/cairo-1.16.0/util/cairo-script/examples/pythagoras-tree.cs53
1 files changed, 0 insertions, 53 deletions
diff --git a/libs/cairo-1.16.0/util/cairo-script/examples/pythagoras-tree.cs b/libs/cairo-1.16.0/util/cairo-script/examples/pythagoras-tree.cs
deleted file mode 100644
index 96b4b39..0000000
--- a/libs/cairo-1.16.0/util/cairo-script/examples/pythagoras-tree.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-%!CairoScript
-
-/pi4 0.785398163 def
-/sqrt2 1.414213562 def
-
-/R { % cr size *R* cr
- dup 1 lt { pop } {
- exch /current-point get % size cr x y
- 4 2 roll % x y size cr
-
- % draw a rectangle in relative co-ordinates
- 1 index 2 div neg dup exch M
- 1 index 0 L
- 0 2 index L
- 1 index neg 0 L
- h
-
- save
- 1 index dup 2 div neg exch translate
- 4 2 roll 3 copy % size cr x y cr x y
- m
- //pi4 rotate
- pop 4 2 roll % x y size cr
- 1 index //sqrt2 div
- R
- restore
-
- save
- 1 index dup 2 div exch translate
- 4 2 roll 3 copy % size cr x y cr x y
- m
- //pi4 neg rotate
- pop 4 2 roll % x y size cr
- 1 index //sqrt2 div
- R
- restore
-
- 4 1 roll pop pop pop
- } ifelse
-} bind def
-
-dict
- /width 1024 set
- /height 512 set
- surface context
-
-1 1 1 set-source-rgb paint
-
-0 512 translate 1 -1 scale
-512 64 m 128. R 0 0 0 set-source-rgb fill
-
-/target get (out.png) write-to-png pop
-pop