(ambient-light sketch red green blue)
(ambient-light sketch red green blue x y z)
(apply-matrix sketch n00 n01 n02 n10 n11 n12)
(apply-matrix sketch
n00
n01
n02
n03
n10
n11
n12
n13
n20
n21
n22
n23
n30
n31
n32
n33)
(background sketch gray)
(background sketch gray alpha)
(background sketch r g b)
(background sketch r g b a)
Examples:
(use 'incanter.processing) (def sktch (sketch))
(background sktch (color 255 0 255)) (draw sktch)
(background sktch (color 255 0 255 255)) ;; with alpha value (draw sktch)
(background sktch (color "0xFF00FF")) (draw sktch)
(background sktch (color 0xFF00FF)) (draw sktch)
(background sktch (color -65281)) (draw sktch)
(background sktch (color 0xFFFF00FF true)) ;; with alpha? true (draw sktch)
(background sktch (color 0xFF 0x00 0xFF)) (draw sktch)
(background sktch (color 0xFF 0x00 0xFF 0xFF)) ;; with alpha value (draw sktch)
(background sktch (color 1.0 0.0 1.0)) (draw sktch)
(background sktch (color 1.0 0.0 1.0 1.0)) ;; with alpha value (draw sktch)
Examples: (use 'incanter.processing) (def sktch (sketch)) (background sktch (color 255 0 255)) (draw sktch) (background sktch (color 255 0 255 255)) ;; with alpha value (draw sktch) (background sktch (color "0xFF00FF")) (draw sktch) (background sktch (color 0xFF00FF)) (draw sktch) (background sktch (color -65281)) (draw sktch) (background sktch (color 0xFFFF00FF true)) ;; with alpha? true (draw sktch) (background sktch (color 0xFF 0x00 0xFF)) (draw sktch) (background sktch (color 0xFF 0x00 0xFF 0xFF)) ;; with alpha value (draw sktch) (background sktch (color 1.0 0.0 1.0)) (draw sktch) (background sktch (color 1.0 0.0 1.0 1.0)) ;; with alpha value (draw sktch)
(bezier sketch x1 y1 x2 y2 x3 y3 x4 y4)
(bezier sketch x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4)
(bezier-vertex sketch x2 y2 x3 y3 x4 y4)
(bezier-vertex sketch x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4)
(blend sketch sx1 sy1 sx2 sy2 dx1 dy1 dx2 dy2 mode)
(blend sketch src sx1 sy1 sx2 sy2 dx1 dy1 dx2 dy2 mode)
(camera sketch)
(camera sketch eyeX eyeY eyeZ centerX centerY centerZ upX upY upZ)
(char->text sketch c)
(char->text sketch c x y)
(char->text sketch c x y z)
(color rgb)
(color rgb alpha?)
(color x y z)
(color x y z alpha)
Examples:
(use 'incanter.processing) (color 255 0 255) (color 255 0 255 255) ;; with alpha value (color "0xFF00FF") (color 0xFF00FF) (color -65281) (color 0xFFFF00FF true) ;; with alpha? true (color 0xFF 0x00 0xFF) (color 0xFF 0x00 0xFF 0xFF) ;; with alpha value (color 1.0 0.0 1.0) (color 1.0 0.0 1.0 1.0) ;; with alpha value
Examples: (use 'incanter.processing) (color 255 0 255) (color 255 0 255 255) ;; with alpha value (color "0xFF00FF") (color 0xFF00FF) (color -65281) (color 0xFFFF00FF true) ;; with alpha? true (color 0xFF 0x00 0xFF) (color 0xFF 0x00 0xFF 0xFF) ;; with alpha value (color 1.0 0.0 1.0) (color 1.0 0.0 1.0 1.0) ;; with alpha value
(color-mode sketch mode)
(color-mode sketch mode max)
(color-mode sketch mode max-x max-y max-z)
(color-mode sketch mode max-x max-y max-z max-a)
(copy-pixels sketch [sx1 sy1 sx2 sy2] [dx1 dy1 dx2 dy2])
(copy-pixels sketch img [sx1 sy1 sx2 sy2] [dx1 dy1 dx2 dy2])
Processing copy function.
Processing copy function.
(create-font sketch name size)
(create-font sketch name size smooth)
(create-font sketch name size smooth charset)
(create-graphics sketch w h renderer)
(create-graphics sketch w h renderer path)
(create-input-raw sketch filename)
Call openStream() without automatic gzip decompression.
Call openStream() without automatic gzip decompression.
(curve sketch x1 y1 x2 y2 x3 y3 x4 y4)
(curve sketch x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4)
(day)
Get the current day of the month (1 through 31).
Get the current day of the month (1 through 31).
(export-font font-name size filename)
(export-font font-name size smooth filename)
Exports the given system font to a vlw file.
Examples:
(use '(incanter core processing)) (export-font "Ariel" 48 "/tmp/ariel_48.vlw")
(view (sketch (setup [] (let [font (load-font this "/tmp/ariel_48.vlw")] (doto this (text-font font) smooth (fill 0))))
(draw []
(doto this
(text "LAX" 0 40)
(text "AMS" 0 70)
(text "FRA" 0 100))))
:size [120 120])
Exports the given system font to a vlw file. Examples: (use '(incanter core processing)) (export-font "Ariel" 48 "/tmp/ariel_48.vlw") (view (sketch (setup [] (let [font (load-font this "/tmp/ariel_48.vlw")] (doto this (text-font font) smooth (fill 0)))) (draw [] (doto this (text "LAX" 0 40) (text "AMS" 0 70) (text "FRA" 0 100)))) :size [120 120])
(fill sketch gray)
(fill sketch gray alpha)
(fill sketch x y z)
(fill sketch x y z alpha)
Sets the color used to fill shapes. For example, if you run (fill 204 102 0), all subsequent shapes will be filled with orange. This color is either specified in terms of the RGB or HSB color depending on the current colorMode() (the default color space is RGB, with each value in the range from 0 to 255).
When using hexadecimal notation to specify a color, use '16r' before the values (e.g. 16rCCFFAA, 16rFFCCFFAA). Use six digits to specify a color (the way colors are specified in HTML and CSS). When eight digits are used, the first two characters define the alpha component and the remainder the red, green, and blue components.
The value for the parameter "gray" must be less than or equal to the current maximum value as specified by (colorMode). The default maximum value is 255.
To change the color of an image (or a texture), use (tint).
Syntax: (fill sketch gray) (fill sketch gray alpha) (fill sketch value1 value2 value3) (fill sketch value1 value2 value3 alpha) (fill sketch color) (fill sketch color alpha) (fill sketch hex) (fill sketch hex alpha)
Parameters: sketch PApplet gray int or float: number specifying value between white and black alpha int or float: opacity of the fill value1 int or float: red or hue value value2 int or float: green or saturation value value3 int or float: blue or brightness value color color: any value of the color datatype hex int: color value in hexadecimal notation (i.e. #FFCC00 or 0xFFFFCC00)
Returns: None
References: http://processing.org/reference/fill_.html
Examples:
(def sktch (sketch)) (fill sktch "0xFF00FF") (fill sktch 0xFF 0x00 0xFF) (fill sktch 255 0 255)
Sets the color used to fill shapes. For example, if you run (fill 204 102 0), all subsequent shapes will be filled with orange. This color is either specified in terms of the RGB or HSB color depending on the current colorMode() (the default color space is RGB, with each value in the range from 0 to 255). When using hexadecimal notation to specify a color, use '16r' before the values (e.g. 16rCCFFAA, 16rFFCCFFAA). Use six digits to specify a color (the way colors are specified in HTML and CSS). When eight digits are used, the first two characters define the alpha component and the remainder the red, green, and blue components. The value for the parameter "gray" must be less than or equal to the current maximum value as specified by (colorMode). The default maximum value is 255. To change the color of an image (or a texture), use (tint). Syntax: (fill sketch gray) (fill sketch gray alpha) (fill sketch value1 value2 value3) (fill sketch value1 value2 value3 alpha) (fill sketch color) (fill sketch color alpha) (fill sketch hex) (fill sketch hex alpha) Parameters: sketch PApplet gray int or float: number specifying value between white and black alpha int or float: opacity of the fill value1 int or float: red or hue value value2 int or float: green or saturation value value3 int or float: blue or brightness value color color: any value of the color datatype hex int: color value in hexadecimal notation (i.e. #FFCC00 or 0xFFFFCC00) Returns: None References: http://processing.org/reference/fill_.html Examples: (def sktch (sketch)) (fill sktch "0xFF00FF") (fill sktch 0xFF 0x00 0xFF) (fill sktch 255 0 255)
(image sketch img x y)
(image sketch img x y c d)
(image sketch img x y c d u1 v1 u2 v2)
(lerp-color c1 c2 amt)
Calculates a color or colors between two color at a specific increment. The amt parameter is the amount to interpolate between the two values where 0.0 equal to the first point, 0.1 is very near the first point 0.5 is half-way in between, etc.
Parameters: c1 color: interpolate from this color c2 color: interpolate to this color amt float: between 0.0 and 1.0
Returns: float
Calculates a color or colors between two color at a specific increment. The amt parameter is the amount to interpolate between the two values where 0.0 equal to the first point, 0.1 is very near the first point 0.5 is half-way in between, etc. Parameters: c1 color: interpolate from this color c2 color: interpolate to this color amt float: between 0.0 and 1.0 Returns: float
(list-fonts)
Returns a list of the fonts available on current system.
Returns a list of the fonts available on current system.
(load-shape sketch filename)
Load a geometry from a file as a PShape.
Load a geometry from a file as a PShape.
(load-strings sketch filename)
Load data from a file and shove it into a String array.
Load data from a file and shove it into a String array.
(noise-detail sketch int detail)
(noise-detail sketch int detail falloff)
(norm val start stop)
Normalize a value to exist between 0 and 1 (inclusive).
Normalize a value to exist between 0 and 1 (inclusive).
(request-image sketch filename)
(request-image sketch filename extension)
(sketch & methods)
(specular sketch gray)
(specular sketch gray alpha)
(specular sketch x y z)
(specular sketch x y z a)
(spotlight sketch [r g b] [x y z] [nx ny nz] angle concentration)
(spotlight sketch r g b x y z nx ny nz angle concentration)
(string->text sketch s)
(string->text sketch s x y)
(string->text sketch s x y z)
(string->text-in sketch s x1 y1 x2 y2)
(string->text-in sketch s x1 y1 x2 y2 z)
(stroke sketch gray)
(stroke sketch gray alpha)
(stroke sketch x y z)
(stroke sketch x y z alpha)
(text sketch s)
(text sketch s x y)
(text sketch s x y z)
(text sketch s x1 y1 x2 y2)
(text sketch s x1 y1 x2 y2 z)
(tint sketch gray)
(tint sketch gray alpha)
(tint sketch x y z)
(tint sketch x y z a)
(translate sktch [tx ty & [tz]])
(translate sktch tx ty)
(translate sktch tx ty tz)
(vertex sketch x y)
(vertex sketch x y z)
(vertex sketch x y u v)
(vertex sketch x y z u v)
(with-rotation sketch rotation & body)
Performs body with rotation, restores current transformation on exit. Accepts a vector [angle] or [angle x-axis y-axis z-axis].
Example: (with-rotation sktch angle (vertex sktch 1 2))
Performs body with rotation, restores current transformation on exit. Accepts a vector [angle] or [angle x-axis y-axis z-axis]. Example: (with-rotation sktch angle (vertex sktch 1 2))
(with-translation sketch translation-vector & body)
Performs body with translation, restores current transformation on exit.
Performs body with translation, restores current transformation on exit.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close