image()

Image / Loading & Displaying

Description

Displays an image at the given position. Optionally specify width and height.

Syntax

void image(PImage* img, float x, float y) void image(PImage* img, float x, float y, float w, float h)

Parameters

NameTypeDescription
imgPImage*the image to display
xfloatx-coordinate
yfloaty-coordinate
wfloatwidth (optional)
hfloatheight (optional)

Returns

void

Related

Under the Hood

Implementation in Processing.h / Processing.cpp:

Loading...