abstract class Processing::Sketch

Overview

Equivalent of PApplet.

Included Modules

Defined in:

processing/sketch.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module Processing::Core::Output::Printing

print_arrray(array : Array) print_arrray, println(string : String) println

Instance methods inherited from module Processing::Core::Data::Conversion

binary(value : Int, digits : Int32) : String
binary(value : Int) : String
binary
, boolean(value : String) : Bool boolean, byte(char : Char) : Byte
byte(byte : Byte) : Byte
byte(boolean : Bool)
byte(float : Float32) : Byte
byte(double : Float64) : Byte
byte(int : Int) : Byte
byte(color) : Byte
byte
, char(boolean : Bool) : Char
char(byte : Byte) : Char
char(char : Char) : Char
char(float : Float32) : Char
char(double : Float64) : Char
char(int : Int) : Char
char(color) : Char
char
, float(int : Int) : Float32
float(string : String) : Float32
float
, hex(byte : Byte, digits : Int32) : String
hex(int : Int, digits : Int32) : String
hex(char : Char, digits : Int32) : String
hex(color, digits : Int32) : String
hex(byte : Byte) : String
hex(int : Int) : String
hex(char : Char) : String
hex(color) : String
hex
, int(boolean : Bool) : Int32
int(byte : Byte) : Int32
int(char : Char) : Int32
int(float : Float) : Int32
int(int : Int) : Int
int(color) : Int32
int
, str(boolean : Bool) : String
str(byte : Byte) : String
str(char : Char) : String
str(int : Int) : String
str(float : Float) : String
str
, unbinary(string : String) : Int unbinary, unhex(string : String) : Int unhex

Instance methods inherited from module Processing::Core::Input::Time

day : Int32 day, hour : Int32 hour, millis : Int32 millis, minute : Int32 minute, month : Int32 month, second : Int32 second, year : Int32 year

Instance methods inherited from module Processing::Core::Input::Keyboard

key : Char | Nil key, key_code : Int32 | Nil key_code, key_pressed key_pressed, key_released key_released, key_typed key_typed

Instance methods inherited from module Processing::Core::Input::Mouse

mouse_button : MouseButton | Nil mouse_button, mouse_clicked mouse_clicked, mouse_dragged mouse_dragged, mouse_moved mouse_moved, mouse_pressed mouse_pressed, mouse_released mouse_released, mouse_wheel(event) mouse_wheel, mouse_x : Int32 mouse_x, mouse_y : Int32 mouse_y, pmouse_x : Int32 | Nil pmouse_x, pmouse_y : Int32 | Nil pmouse_y

Instance methods inherited from module Processing::Core::Rendering

blend_mode(mode : BlendMode) blend_mode, clip(a : Float, b : Float, c : Float, d : Float) clip, create_graphics(w : Int, h : Int, renderer : String, path : String) : Graphics
create_graphics(w : Int, h : Int, renderer : String) : Graphics
create_graphics(w : Int, h : Int) : Graphics
create_graphics
, hint(which : Hint) hint, no_clip no_clip

Instance methods inherited from module Processing::Core::Math

abs(n) abs, acos(value) acos, asin(value) asin, atan(value) atan, atan2(x, y) atan2, ceil(n) ceil, constrain(amt, low, high) constrain, cos(angle) cos, degrees(radians) degrees, dist(x1, y1, z1, x2, y2, z2)
dist(x1, y1, x2, y2)
dist
, exp(value) exp, floor(n) floor, lerp(start : Float, stop : Float, amt : Float) : Float lerp, log(n) log, log10(n) log10, mag(a : Float, b : Float, c : Float) : Float
mag(a : Float, b : Float) : Float
mag
, map(value : Float, start1 : Float, stop1 : Float, start2 : Float, stop2 : Float) : Float map, max(a, b, c)
max(a, b)
max(list : Array(Int)) : Int
max(list : Array(Float)) : Float
max
, min(a, b, c)
min(a, b)
min(list : Array(Int)) : Int
min(list : Array(Float)) : Float
min
, noise(x : Float, y : Float, z : Float) : Float
noise(x : Float, y : Float) : Float
noise(x : Float) : Float
noise
, noise_detail(lod : Int, falloff : Float)
noise_detail(lod : Int)
noise_detail
, noise_seed(seed : Int) noise_seed, norm(value : Float, start : Float, stop : Float) : Float norm, pow(n, e) pow, radians(degrees) radians, random(low : Float, high : Float) : Float
random(high : Float) : Float
random
, random_gaussian : Float random_gaussian, random_seed(seed : Int) random_seed, round(n) round, sin(angle) sin, sq(n) sq, sqrt(n) sqrt, tan(angle) tan

Instance methods inherited from module Processing::Core::Shape::Primitives2D

line(x1, y1, z1, x2, y2, z2)
line(x1, y1, x2, y2)
line
, point(x, y, z)
point(x, y)
point
, rect(x, y, width, height, tl, tr, br, bl)
rect(x, y, width, height, r)
rect(x, y, width, height)
rect
, square(x, y, extent) square

Instance methods inherited from module Processing::Core::Shape

create_shape(type : ShapeType, *points) : Processing::Shape
create_shape : Processing::Shape
create_shape
, load_shape(path : String) : Processing::Shape load_shape

Instance methods inherited from module Processing::Core::Color

alpha(color : Color) : UInt8
alpha(color : Int) : UInt8
alpha
, background(v1 : Int | Float, v2 : Int | Float, v3 : Int | Float, alpha : Int | Float = 255)
background(rgb : Int, alpha : Int | Float)
background(gray : Int | Float, alpha : Int | Float)
background(gray : Int | Float)
background
, blue(color : Color) : UInt8
blue(color : Int) : UInt8
blue
, brightness(color : Color) : Float
brightness(color : Int) : Float
brightness
, clear clear, color(v1 : Int | Float, v2 : Int | Float, v3 : Int | Float, alpha : Int | Float = 255) : Color
color(gray : Int | Float, alpha : Int | Float = 255) : Color
color
, color_mode(mode : ColorMode, max1 : Int | Float, max2 : Int | Float, max3 : Int | Float, maxA : Int | Float)
color_mode(mode : ColorMode, max1 : Int | Float, max2 : Int | Float, max3 : Int | Float)
color_mode(mode : ColorMode, max : Int | Float)
color_mode(mode : ColorMode)
color_mode
, fill(v1 : Int | Float, v2 : Int | Float, v3 : Int | Float, alpha : Int | Float)
fill(v1 : Int | Float, v2 : Int | Float, v3 : Int | Float)
fill(rgb : Int, alpha : Float)
fill(rgb : Int, alpha : Int | Float)
fill(rgb : Int)
fill
, green(color : Color) : UInt8
green(color : Int) : UInt8
green
, hue(color : Color) : UInt8
hue(color : Int) : UInt8
hue
, lerp_color(c1 : Int, c2 : Int, amt : Float) : Color lerp_color, no_fill no_fill, no_stroke no_stroke, red(color : Color) : UInt8
red(color : Int) : UInt8
red
, saturation(color : Color) : UInt8
saturation(color : Int) : UInt8
saturation
, stroke(v1 : Int | Float, v2 : Int | Float, v3 : Int | Float, alpha : Int | Float)
stroke(v1 : Int | Float, v2 : Int | Float, v3 : Int | Float)
stroke(rgb : Int, alpha : Int | Float)
stroke(gray : Int | Float, alpha : Int | Float)
stroke(rgb : Int)
stroke(gray : Int | Float)
stroke

Instance methods inherited from module Processing::Core::Environment

cursor(img, x, y)
cursor(kind : Cursor)
cursor(img)
cursor
cursor
, delay(milliseconds : Int32) delay, display_density : Int32 display_density, display_height : Int32 display_height, display_width : Int32 display_width, focused : Bool focused, frame_count : Int32 frame_count, frame_rate(fps : Float)
frame_rate : Int32
frame_rate
, full_screen(renderer : Renderer, display : Int32)
full_screen(display : Int32)
full_screen(renderer : Renderer)
full_screen
full_screen
, full_screen? : Bool full_screen?, height : Int32 height, no_cursor no_cursor, no_smooth no_smooth, pixel_density(density : Int32) pixel_density, pixel_height pixel_height, pixel_width pixel_width, settings settings, size(width : Int32, height : Int32) size, smooth(level : Int32) smooth, width : Int32 width

Constructor Detail

def self.new #

[View source]

Class Method Detail

def self.run #

[View source]

Instance Method Detail

def draw #

[View source]
def loop #

[View source]
def loop? : Bool #

[View source]
def no_loop #

[View source]
def pop_style #

[View source]
def push_style #

[View source]
def redraw #

[View source]
def setup #

[View source]
def style : Style #

[View source]
def surface : Surface #

[View source]