GSDP:GAM100/CProcessing/point()

From Inside
Jump to: navigation, search

point()

Description

This function draws a point at a given position. The color of the point is specified with the function fill() . There is no stroke option for a point.

Parameters

point(x, y);

  • x - (float) The horizontal position of the point
  • y - (float) The vertical position of the point

Example

void init()
{
    // fill the background black to see the white points
    background(color(0, 0, 0, 255));
}

void update()
{
    // Hide the cursor on this window
    noCursor();

    // fill the pixel white
    fill(color(0, 0, 0, 255));

    // draw a single pixel at the mouse position
    point(mouseX, mouseY);
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>