From dc96878f5ad0fd490093f8c8aea3279457ca89c3 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Thu, 25 Jul 2019 13:49:10 +0900 Subject: [PATCH] Halfway there. --- WORKSHOP.md | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/WORKSHOP.md b/WORKSHOP.md index 8802eb4..1c31aec 100644 --- a/WORKSHOP.md +++ b/WORKSHOP.md @@ -21,14 +21,14 @@ To import an image, and resize the canvas to fit the image size, type the follow ### Import -To import an image onto the current canvas, type the following text, drag an image file onto the Ronin window and press `cmd+r`: +To import an image onto the current canvas, type the following text, drag an image file onto the Ronin window, trace a shape in the canvas and press `cmd+r`: ``` (import $path (guide $rect)) ``` -The previous code will import an image, and position it at `50,100`, at a size of `250x200`. Alternatively, you could use a `(line)` to stretch the image. +The previous code will import an image, and preserve its ratio. Alternatively, you could use a `$line` to stretch the image, or a `$pos` to simply draw the image at its original size. ``` (import $path @@ -40,17 +40,10 @@ The previous code will import an image, and position it at `50,100`, at a size o To crop the canvas, type the following text, drag an image file onto the Ronin window press `cmd+r`: ``` -(import "~/Desktop/photo.jpg" - (pos 50 100)) -(crop (rect 50 50 300 300) -``` - -Alternatively, you could select the cropping area with the cursor with the following code, and selecting an area in the canvas: - -``` -(import "~/Desktop/photo.jpg" - (pos 50 100)) -(crop $rect) +(import $path + (pos 0 0)) +(crop + (rect 50 50 300 300)) ``` ### Export @@ -58,16 +51,14 @@ Alternatively, you could select the cropping area with the cursor with the follo To export the resulting image, type the following text, drag an image file onto the Ronin window, then drag a folder and add the new file's name, and press `cmd+r`: ``` -(import $path - (pos 50 100)) +(import $path) (export $path) ``` -For example, a version of that same code with file paths, might look something like: +For example, a version of that same code with file paths, might look something like the following, notice how the `(rect)` is omitted: ``` -(import "~/Desktop/photo.jpg" - (pos 50 100)) +(import "~/Desktop/photo.jpg") (export "~/Desktop/export.png") ```