Sketch class
- Inheritance
-
- Object
- BaseSketch
- Sketch
- Mixed-in types
Constructors
- Sketch()
-
Sketch.simple({FutureOr<
void> setup(Sketch)?, FutureOr<void> draw(Sketch)?, void keyPressed(Sketch)?, void keyTyped(Sketch)?, void keyReleased(Sketch)?, void mousePressed(Sketch)?, void mouseDragged(Sketch)?, void mouseReleased(Sketch)?, void mouseClicked(Sketch)?, void mouseMoved(Sketch)?, void mouseWheel(Sketch, double)?})
Properties
- blendMode ← BlendMode
-
no getterinherited
- frameCount → int
-
no setterinherited
- frameRate ↔ int
-
getter/setter pairinherited
- HALF_PI → double
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → int
-
no setterinherited
- isKeyPressed → bool
-
no setterinherited
- isLooping → bool
-
no setterinherited
- isMousePressed → bool
-
no setterinherited
- key → LogicalKeyboardKey?
-
no setterinherited
- mouseButton → MouseButton?
-
no setterinherited
- mouseX → int
-
no setterinherited
- mouseY → int
-
no setterinherited
- PI → double
-
finalinherited
- pixels → ByteData?
-
no setterinherited
- pmouseX → int
-
no setterinherited
- pmouseY → int
-
no setterinherited
- publishedFrame → Image?
-
no setter
- QUARTER_PI → double
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- TAU → double
-
finalinherited
- TWO_PI → double
-
finalinherited
- width → int
-
no setterinherited
Methods
-
abs(
num value) → num -
inherited
-
acos(
num value) → double -
inherited
-
addOnFrameAvailableCallback(
FrameCallback callback) → void -
alpha(
Color color) → int -
inherited
-
arc(
{required Ellipse ellipse, required double startAngle, required double endAngle, ArcMode mode = ArcMode.openStrokePieFill}) → void -
inherited
-
asin(
num value) → double -
inherited
-
atan(
num value) → double -
inherited
-
atan2(
num y, num x) → double -
inherited
-
background(
{required Color color}) → void -
inherited
-
beginShape(
[ShapeMode? mode]) → void -
Begins recording a custom shape, defined by various types of vertices.
inherited
-
bezierVertex(
dynamic c1x, dynamic c1y, dynamic c2x, dynamic c2y, dynamic x2, dynamic y2) → void -
inherited
-
binary(
Object value) → String -
inherited
-
blue(
Color color) → int -
inherited
-
boolean(
Object value) → bool -
inherited
-
brightness(
Color color) → int -
inherited
-
byte(
Object value) → int -
inherited
-
ceil(
num value) → int -
inherited
-
char(
int charCode) → String -
inherited
-
circle(
{required Offset center, required double diameter}) → void -
inherited
-
clear(
) → void -
inherited
-
clearOnFrameAvailableCallbacks(
) → void -
color(
{int? grey, int alpha = 255, int? comp1, int? comp2, int? comp3}) → Color -
inherited
-
colorMode(
ColorMode newMode) → void -
inherited
-
constrain(
num value, num min, num max) → num -
inherited
-
cos(
num angleInRadians) → double -
inherited
-
createFont(
) → void -
inherited
-
curveVertex(
num x, num y) → void -
inherited
-
day(
) → int -
inherited
-
degrees(
num angleInRadians) → double -
inherited
-
dispose(
) → void -
dist(
Offset p1, Offset p2) → num -
inherited
-
draw(
) → FutureOr< void> -
ellipse(
Ellipse ellipse) → void -
inherited
-
endShape(
{bool close = false}) → void -
Ends the definition of a custom shape and then paints it.
inherited
-
exp(
num value) → num -
inherited
-
fill(
{required Color color}) → void -
inherited
-
float(
Object value) → double -
inherited
-
floor(
num value) → int -
inherited
-
get(
int x, int y) → Future< Color> -
inherited
-
getRegion(
{required int x, required int y, required int width, required int height}) → Future< Image> -
inherited
-
green(
Color color) → int -
inherited
-
hex(
Object value) → String -
inherited
-
hour(
) → int -
inherited
-
hue(
Color color) → int -
inherited
-
image(
{required PImage image, Offset origin = Offset.zero, double? width, double? height}) → Future< void> -
inherited
-
keyPressed(
) → void -
override
-
keyReleased(
) → void -
override
-
keyTyped(
) → void -
override
-
lerp(
num start, num end, double percent) → double -
inherited
-
lerpColor(
Color color1, Color color2, double percent) → Color -
inherited
-
line(
Offset p1, Offset p2, [Offset? p3]) → void -
inherited
-
loadFont(
) → void -
inherited
-
loadImage(
String filepath) → Future< PImage> -
inherited
-
loadPixels(
) → Future< void> -
inherited
-
log(
num value) → num -
inherited
-
loop(
) → void -
inherited
-
mag(
int x, int y, [int z = 0]) → num -
inherited
-
map(
num value, num domainMin, num domainMax, num rangeMin, num rangeMax) → num -
inherited
-
max(
num a, num b, [num? c]) → num -
inherited
-
maxInList(
List< num> list) → num -
inherited
-
millis(
) → int -
inherited
-
min(
num a, num b, [num? c]) → num -
inherited
-
minInList(
List< num> list) → num -
inherited
-
minute(
) → int -
inherited
-
month(
) → int -
inherited
-
mouseClicked(
) → void -
override
-
mouseDragged(
) → void -
override
-
mouseMoved(
) → void -
override
-
mousePressed(
) → void -
override
-
mouseReleased(
) → void -
override
-
mouseWheel(
double count) → void -
override
-
noFill(
) → void -
inherited
-
noise(
{required double x, double y = 0, double z = 0}) → double -
Generates a random value with a Perlin noise algorithm.
inherited
-
noiseDetail(
{int? octaves, double? falloff}) → void -
Sets the number of
octaves
and thefalloff
for each octave for values generated by noise().inherited -
noiseSeed(
int? seed) → void -
Sets the seed value for all noise() invocations to the given
seed
.inherited -
noLoop(
) → void -
inherited
-
norm(
num value, num start, num stop) → num -
inherited
-
noStroke(
) → void -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
point(
{required double x, required double y, double? z}) → void -
inherited
-
popMatrix(
) → void -
inherited
-
pow(
num base, num exponent) → num -
inherited
-
pushMatrix(
) → void -
inherited
-
quad(
Offset p1, Offset p2, Offset p3, Offset p4) → void -
inherited
-
quadraticVertex(
dynamic cx, dynamic cy, dynamic x2, dynamic y2) → void -
inherited
-
radians(
num degrees) → double -
inherited
-
random(
num bound1, [num? bound2]) → double -
inherited
-
randomGaussian(
{num mean = 0.0, num standardDeviation = 1.0}) → double -
Returns a
double
from a random series of numbers having the givenmean
and the givenstandardDeviation
.inherited -
randomSeed(
int? seed) → void -
Sets the seed value for all random() invocations to the given
seed
.inherited -
rect(
{required Rect rect, BorderRadius? borderRadius}) → void -
inherited
-
red(
Color color) → int -
inherited
-
removeOnFrameAvailableCallback(
FrameCallback callback) → void -
rotate(
double angleInRadians) → void -
inherited
-
round(
num value) → int -
inherited
-
saturation(
Color color) → int -
inherited
-
save(
{required File file, ImageFileFormat? format}) → Future< void> -
Saves the current pixels buffer data to the given
file
.inherited -
saveFrame(
{required Directory directory, String namingPattern = 'screen-####.png', ImageFileFormat? format}) → Future< void> -
Saves a numbered sequence of images, one image each time the
function is run, saved in the given
dirctory
.inherited -
second(
) → int -
inherited
-
set(
{required int x, required int y, required Color color}) → void -
inherited
-
setRegion(
{required Image image, int x = 0, int y = 0}) → Future< void> -
inherited
-
setup(
) → FutureOr< void> -
sin(
num angleInRadians) → double -
inherited
-
size(
{required int width, required int height}) → void -
inherited
-
sq(
num value) → num -
inherited
-
sqrt(
num value) → num -
inherited
-
square(
Square square) → void -
inherited
-
str(
Object value) → String -
inherited
-
stroke(
{required Color color}) → void -
inherited
-
strokeWeight(
double newWeight) → void -
inherited
-
tan(
num angleInRadians) → double -
inherited
-
text(
String text, double x, double y) → void -
Paint the given
text
at the given (x
,y
), using the current horizontal and vertical text alignment and text size.inherited -
textAlign(
TextAlignHorizontal horizontalAlignment, [TextAlignVertical? verticalAlignment]) → void -
Set the horizontal and vertical text alignment for text that's painted
with the text() method.
inherited
-
textAscent(
) → double -
Returns the ascent length for the current font, at the current font size.
inherited
-
textDescent(
) → double -
Returns the descent length for the current font, at the current font size.
inherited
-
textFont(
String fontName) → void -
Set the font used to render text by providing a
fontName
.inherited -
textLeading(
double leading) → void -
Sets the leading for text that is painted with the text() method.
inherited
-
textMode(
) → void -
inherited
-
textSize(
double fontSize) → void -
Sets the size of the text that is painted with the text() method.
inherited
-
textWidth(
String text) → double -
Calculates and returns the width of the given
text
, sized and spaced based on the current text configuration.inherited -
toInt(
Object value) → int -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
translate(
{num? x, num? y, num? z}) → void -
inherited
-
triangle(
Offset p1, Offset p2, Offset p3) → void -
inherited
-
unbinary(
String binary) → int -
inherited
-
unhex(
String hex) → int -
inherited
-
updatePixels(
) → Future< void> -
inherited
-
vertex(
num x, num y) → void -
Adds a vertex to the active shape.
inherited
-
year(
) → int -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited