summaryrefslogtreecommitdiff
path: root/libs/cairo-1.16.0/util/cairo-script/examples/wedgeAnnulus_crop_ybRings.cs
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-10-12 12:03:23 -0500
committersanine <sanine.not@pm.me>2022-10-12 12:03:23 -0500
commit530ffd0b7d3c39757b20f00716e486b5caf89aff (patch)
tree76b35fdf57317038acf6b828871f6ae25fce2ebe /libs/cairo-1.16.0/util/cairo-script/examples/wedgeAnnulus_crop_ybRings.cs
parent3dbe9332e47c143a237db12440f134caebd1cfbe (diff)
add cairo
Diffstat (limited to 'libs/cairo-1.16.0/util/cairo-script/examples/wedgeAnnulus_crop_ybRings.cs')
-rw-r--r--libs/cairo-1.16.0/util/cairo-script/examples/wedgeAnnulus_crop_ybRings.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/libs/cairo-1.16.0/util/cairo-script/examples/wedgeAnnulus_crop_ybRings.cs b/libs/cairo-1.16.0/util/cairo-script/examples/wedgeAnnulus_crop_ybRings.cs
new file mode 100644
index 0000000..5aeb97f
--- /dev/null
+++ b/libs/cairo-1.16.0/util/cairo-script/examples/wedgeAnnulus_crop_ybRings.cs
@@ -0,0 +1,30 @@
+/SIDE 600 def
+
+<< /width SIDE /height SIDE >> surface context
+
+1 1 1 rgb set-source
+paint
+
+SIDE dup scale
+0.5 0.5 translate
+0.5 -0.5 scale
+
+/theta math.pi 10 div def
+
+10 {
+ N
+ 0 0 1.0 0 //theta arc
+ 0 0 0.2 //theta 0 arc-
+ h
+ //theta rotate
+ //theta rotate
+} repeat
+
+0 0 0.2 0 0 1 radial
+ 0.0 1 1 0 1 add-color-stop
+ 1.0 0 0 1 1 add-color-stop
+set-source
+fill
+
+/target get (out.png) write-to-png pop
+pop