From 5c3bff3e87bc38e6d2a7acb8cbf6b9cbe9a6b490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9Bu=20=D0=9Binve=D0=B3a?= Date: Fri, 8 Nov 2019 11:00:56 -0500 Subject: [PATCH] Update WORKSHOP.md --- WORKSHOP.md | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/WORKSHOP.md b/WORKSHOP.md index a1ce738..2f7a5e4 100644 --- a/WORKSHOP.md +++ b/WORKSHOP.md @@ -4,7 +4,7 @@ This workshop is designed to go over the **most commonly used functions** with [Ronin](https://github.com/hundredrabbits/Ronin). The list of all available functions and their usage is located [here](https://github.com/hundredrabbits/Ronin/#library). You can also follow along our [video tutorial](https://youtu.be/SgAWGh1s9zg). -- **Part 1**: [Images](#Images) `(open)`, `(import)`, `(crop)`, `(export)` +- **Part 1**: [Images](#Images) `(import)`, `(crop)`, `(export)` - **Part 2**: [Draw](#Draw) `(stroke)`, `(fill)`, `(gradient)`, `(clear)` - **Part 3**: [Filters](#Filters) `(pixels)`, `(saturation)`, `(convolve)`, `(sharpen)` - **Part 4**: [Events](#Events) `(echo)`, `(on "mouse-down")`, `(on "animate")`, `(on "/a")` @@ -13,14 +13,6 @@ This workshop is designed to go over the **most commonly used functions** with [ This section will teach the basics of opening, cropping and saving an image file. You can use the `$path` helper to quickly get an image's path into Ronin, by writing `$path` and dragging a file onto the Ronin window. -### Open - -To open an image, **and resize the canvas to fit the image size**, type the following text, drag an image file onto the Ronin window and press `cmd+r`: - -```lisp -(open $path) -``` - ### Import 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`: @@ -150,7 +142,7 @@ This section will cover how to manipulate the pixels of an image. First let's open an image, ideally one in color, and change every pixel of a selected area at `(rect 100 100 200 200)`: ```lisp -(open $path) +(import $path) (pixels saturation 10 (rect 100 100 200 200)) ``` @@ -172,7 +164,7 @@ The `(pixels)` function expects a function that returns 4 values(r,g,b,a), and s In the previous example, we increased the saturation of a region of the image, to desaturate an entire image, you can simply omit the `(rect)` which will select the entire canvas, and set the pixel filter to `saturation` and the value to `0.5`(50% saturation): ```lisp -(open $path) +(import $path) (pixels saturation 0.5) ``` @@ -183,14 +175,14 @@ Effects which use the surrounding pixels, or convolution matrix, are used with t ### sharpen ```lisp -(open $path) +(import $path) (convolve (sharpen) $rect) ``` Custom convolve kernels can also be created like this: ```lisp -(open $path) +(import $path) (def (blur) ( (-1 -1 -1)