# Color
## Creating & Reading
* `Color`
* `alpha()`
* `blue()`
* `brightness()`
* `green()`
* `hsb()`
* `hsba()`
* `hsl()`
* `hsla()`
* `hue()`
* `levels()`
* `lightness()`
* `maxes()`
* `mode()`
* `norm_levels()`
* `red()`
* `rgb()`
* `rgba()`
* `saturation()`
* `set_alpha(v)`
* `set_blue(v)`
* `set_green(v)`
* `set_maxes(maxes)`
* `set_mode(mode)`
* `set_red(v)`
* `set_brightness(v)`
* `set_hue(v)`
* `set_lightness(v)`
* `set_saturation(v)`
* `StateData`
* `lerp_color(color1, color2, amount)`
* `color()`
* `color(gray)`
* `color([gray])`
* `color([gray, [alpha]])`
* `color([v1, v2, v3])`
* `color([v1, v2, v3, [alpha]])`
* `color(colorstring)`
* `color(slice)`
* `color(color)`
## Setting
- `StateData`
- `background()`
* `background(color)`
- `background_image(image, alpha)`
- `clear()`
- `color_mode(mode)`
- `color_maxes()`
- `color_maxes([max1, max2, max3, max_alpha])`
- `color_maxes(maxes)`
* `fill(color)`
- `get_color_mode()`
- `get_color_maxes()`
* `get_fill()`
* `get_stroke()`
* `no_fill()`
* `no_stroke()`
* `stroke(color)`
# Constants
- `HALF_PI`
- `PI`
- `QUARTER_PI`
- `TAU`
- `TWO_PI`
# Environment
- `StateData`
- `cursor(type, hot_x, hot_y)`
- `delta_time()`
- `focused()`
- `frame_count()`
- `frame_rate()`
- `no_cursor()`
- `set_frame_rate(fps)`
- `display_width()`
- `display_height()`
- `window_width()`
- `window_height()`
- `resize_window(width, height)`
- `canvas_width()`
- `canvas_height()`
- `resize_canvas(width, height)`
- `fullscreen()`
- `set_fullscreen(val)`
- `pixel_density()`
- `set_pixel_density(val)`
- `display_density()`
- `State`
- `window_resized()`
# Events
## Acceleration
TODO
## Keyboard
- `key_is_pressed()`
- `key_is_down(key)`
- `key()`
- `State`
- `on_key_pressed()`
- `on_key_released()`
- `on_key_typed()`
## Mouse
`mouse_pos()`
`prev_mouse_pos()`
`mouse_moved()`
`win_mouse_pos()`
`prev_win_mouse_pos()`
`mouse_is_pressed()`
`mouse_button()`
- `State`
- `on_mouse_moved()`
- `on_mouse_dragged()`
- `on_mouse_pressed()`
- `on_mouse_released()`
- `on_mouse_clicked()`
- `on_mouse_dbl_clicked()`
- `on_mouse_wheel()`
# IO
## Input
TODO
## Output
- `StateData`
- `save(filename)`
## Logging
- `LoggerConfig`
- `Logger`
- `from_config(config)`
- `start`
- `PixEngine`
- `start_logger()`
## Time & Date
- `StateData`
- `day()`
- `hour()`
- `millis()`
- `minute()`
- `month()`
- `second()`
- `year()`
# Image
## Loading & Displaying
- `StateData`
- `create_image(width, height)`
- `image_mode(mode)`
- `image()`
- `image(img, [x, y])`
- `image(img, v)`
- `image_resized()`
- `image_resized(img, [x, y, w, h])`
- `image_resized(img, rect)`
- `image_partial()`
- `image_partial(img, [sx, sy, sw, sh], [dx, dy, dw, dh])`
- `image_partial(img, srect, drect)`
- `load_image(filename)`
- `no_tint()`
- `save(filename, extension)`
- `tint(color)`
## Pixels
- `FilterParams`
- `Image`
- `blend()`
- `blend([sx, sy, sw, sh], [dx, dy, dw, dh], blend_mode)`
- `blend(srect, drect, blend_mode)`
- `copy()`
- `copy([sx, sy, sw, sh], [dx, dy, dw, dh])`
- `copy(srect, drect)`
- `filter(type, params)`
- `get()`
- `load_pixels()`
- `mask(src_image)`
- `pixels()`
- `resize(width, height)`
- `set()`
- `update_pixels()`
# Lights, Camera
TODO
# Math
## Calculation
- `Math`
- `constrain(number, low, high)`
- `lerp(start, stop, amount)`
- `map(value, start1, stop1, start2, stop2)`
## Vector
- `Vector`
- `set(v2)`
- `copy()`
- `mag()`
- `mag_sq()`
- `dot(v2)`
- `cross(v2)`
- `dist(v2)`
- `normalize()`
- `limit(max)`
- `set_mag(mag)`
- `heading()`
- `rotate(angle)`
- `angle_between(v2)`
- `lerp(v2)`
- `reflect()`
- `values()`
- `from_angle(angle)`
- `random_2d()`
- `random_3d()`
- `StateData`
- `create_vector()`
- `create_vector([x, y])`
- `create_vector([x, y, z])`
- `create_vector(vector)`
## Noise
- `StateData`
- `noise()`
- `noise(x)`
- `noise([x, y])`
- `noise([x, y, z])`
- `noise(vector)`
- `noise_detail(lod, falloff)`
- `noise_seed(seed)`
## Random
- `StateData`
- `random(value)`
- `random_rng(min, max)`
- `random_choice(choices)`
- `random_seed(seed)`
## Trigonometry
- `angle_mode(mode)`
# Rendering
| Remove | Subtract
- `StateData`
- `create_graphics(width, height)`
- `blend_mode(mode)`
# Shape
## 2D Primitives
- `arc_mode(mode)`
- `arc()`
- `arc([x, y], [w, h], start, stop)`
- `arc(v1, v2, start, stop)`
- `ellipse()`
- `ellipse([x, y], [w, h])`
- `ellipse(v1, v2)`
- `circle()`
- `circle([x, y], r)`
- `circle(v, r)`
- `line()`
- `line([x1, y1], [x2, y2])`
- `line(v1, v2)`
- `point()`
- `point([x, y])`
- `point(vector)`
- `quad()`
- `quad([x1, y1], [x2, y2], [x3, y3], [x4, y4])`
- `quad(v1, v2, v3, v4)`
- `rect()`
- `rect([x, y], [w, h])`
- `rect(v1, v2)`
- `rect_rounded()`
- `rect_rounded([x, y], [w, h], [tl, tr], [br, bl])`
- `rect_rounded(v1, v2, r1, r2)`
- `square()`
- `square([x, y], s)`
- `square(v, s)`
- `square_rounded()`
- `square_rounded([x, y], s, [tl, tr], [br, bl])`
- `square_rounded(v1, s, r1, r2)`
- `triangle()`
- `triangle([x1, y1], [x2, y2], [x3, y3])`
- `triangle(v1, v2, v3)`
## 3D Primitives
- `StateData`
- `point()`
- `point([x, y, z])`
- `point(vector)`
- `line()`
- `line([x1, y1, z1], [x2, y2, z3])`
- `line(v1, v2)`
- `quad()`
- `quad([x1, y1, z1], [x2, y2, z2], [x3, y3, z3], [x4, y4, z4])`
- `quad(v1, v2, v3, v4)`
- `plane()`
- `plane([x1, y1, z1], [x2, y2, z2])`
- `plane(v1, v2)`
- `box_()`
- `box_([x, y, z], [w, h, d])`
- `box_(v1, v2)`
- `sphere()`
- `sphere([x, y, z], r)`
- `sphere(c, r)`
- `cylinder()`
- `cylinder([x, y, z], r, h)`
- `cylinder(c, r, h)`
- `cone()`
- `cone([x, y, z], r, h)`
- `cone(c, r, h)`
- `ellipsoid()`
- `ellipsoid([x, y, z], [rx, ry, rz])`
- `ellipsoid(v1, v2)`
- `torus()`
- `torus([x, y, z], r, tr)`
- `torus(v1, r, tr)`
## 3D Models
- `Model`
- `normalize()`
- `StateData`
- `load_model(filename)`
- `model(model)`
## Attributes
- `EllipseMode` Center, Radius, Corner,
- `RectMode` Corner, Center, Radius
- `StrokeCap` Round, Square, Project
- `StrokeJoin` Miter, Bevel, Round
- `StateData`
- `ellipse_mode(mode)`
- `rect_mode(mode)`
- `stroke_cap(cap)`
- `stroke_join(join)`
- `stroke_weight(weight)`
## Curves
TODO
## Vertex
TODO
# Structure
- `State`
- `on_start()`
- `on_update()`
- `on_stop()`
- `on_pause()`
- `on_resume()`
- `StateData`
- `loop()`
- `no_loop()`
- `push()`
- `pop()`
- `update()`
# Transform
- `Matrix`
- `StateData`
- `apply_matrix()`
- `apply_matrix([a, b, c, d, e, f])`
- `apply_matrix(matrix)`
- `reset_matrix()`
- `rotate()`
- `rotate(angle)`
- `rotate_axis(angle, vector)`
- `rotate_x(angle)`
- `rotate_y(angle)`
- `rotate_z(angle)`
- `scale()`
- `scale([x, y])`
- `scale([x, y, z])`
- `scale(vector)`
- `shear()`
- `shear_x(angle)`
- `shear_y(angle)`
- `translate()`
- `translate([x, y])`
- `translate([x, y, z])`
- `translate(vector)`
# Typography
## Attributes
- `FontAlign`
- `FontStyle`
- `Font`
- `bounds()`
- `bounds(str, [x, y], size)`
- `bounds(str, v, size)`
- `StateData`
- `text_align(align)`
- `text_leading(leading)`
- `text_size(size)`
- `text_font(font)`
- `text_style(style)`
- `text_width(text)`
- `text_ascent()`
- `text_descent()`
## Loading & Displaying
- `StateData`
- `load_font(filename)`
- `text()`
- `text(str, [x, y])`
- `text(str, v)`
- `text_rect(str, rect)`
# UI
- `Element`
- `position()`
- `position([x, y])`
- `position(vector)`
- `size()`
- `size(w, h)`
- `size(vector)`
- `bg_color(color)`
- `text_color(color)`
- `font(font)`
- `value()`
- `Slider`
- `changed(callback)`
- `Button`
- `mouse_pressed(callback)`
- `Checkbox`
- `checked()`
- `changed(callback)`
- `SelectBox`
- `option(str)`
- `selected(str)`
- `enable(str)`
- `disable(str)`
- `changed(callback)`
- `Radio`
- `option(str)`
- `enable(str)`
- `disable(str)`
- `changed(callback)`
- `ColorPicker`
- `input(callback)`
- `Input`
- `InputType` Text | Password
- `input(callback)`
- `FileInput`
- `input(callback)`
- `StateData`
- `create_slider(label, min, max, value, step)`
- `create_button(label, value)`
- `create_checkbox(label, value)`
- `create_selectbox(multiple)`
- `create_radio(multiple)`
- `create_colorpicker(default_color)`
- `create_input(placeholder, type)`
- `create_fileinput(multiple)`