]> gitweb.factorcode.org Git - factor.git/commitdiff
images.loader: docs for save-graphic-image
authorBjörn Lindqvist <bjourne@gmail.com>
Sat, 8 Mar 2014 12:41:07 +0000 (13:41 +0100)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 14 Mar 2014 14:32:26 +0000 (07:32 -0700)
basis/images/loader/loader-docs.factor [new file with mode: 0644]

diff --git a/basis/images/loader/loader-docs.factor b/basis/images/loader/loader-docs.factor
new file mode 100644 (file)
index 0000000..cbd8a40
--- /dev/null
@@ -0,0 +1,14 @@
+USING: help.markup help.syntax images strings ;
+IN: images.loader
+
+HELP: save-graphic-image
+{ $values { "image" image } { "path" string } }
+{ $description "Saves a (graphic) image to disk. The extension of the path string is used to select which save format to save the image with." }
+{ $examples
+  "This example renders a text on an image and then saves the image to /tmp/foo.jpg"
+  { $code
+    "USING: fonts images.loader ui.text ;"
+    "monospace-font \"Hello, there!\" string>image drop "
+    "\"/tmp/hello.jpg\" save-graphic-image"
+  }
+} ;