-
Notifications
You must be signed in to change notification settings - Fork 0
Standard Libraries
The Image object holds an array of pixels. It supports the +
, -
and %
operands.
Adding two images will result in an image which pixels are the averages of the pixels of both images. That is, each hex value in the RGB of the pixel will be added and divided by 2.
Image newImage = img1 + img2
Subtracting two images will result in the difference between each pixel in the two images.
Dividing two images with one another will split the two images in half vertically and create and image that contains the lefthand image on the left and the righthand image on the right.
Image smileySad = smiley % sad
A Pixel
object contains a Color
object, it's X and Y coordinates within the image it belongs to, and all of the other Pixel
objects adjacent to it.
Pixel = {
Color rgba // The Color object for this Pixel
int x, y // The location within an Image
Array neighbors // All other Pixels that this Pixel touches
}
A Color
object contains four color channels: red, green, blue, and alpha. There are also many colors that are included with the Color
object and can be accessed by doing Color.colorname
. All of the standard HTML color names are included.
The string object uses a character array under the hood and allows the user to concatenate two strings by using the += operator.
String a = "ball"
a += "oon"
// results in "balloon"
Made with ♥ by Nathan Burgess, Christina Charles, Edvard Eriksson, and Allie Taylor