GSDP:GAM100/CProcessing/stroke()

stroke()

Description

The function stroke() sets the color of the stroke for the next drawn shape.

Parameters

strokeColor(PColor color)

  • color - (PColor) the color to set the stroke to

Example

void update() 
{
  // Create the color red
  PColor myColor = color(255, 0, 0, 255);

  // Set the stroke color to red
  stroke(myColor);

  // Draw a circle at the cursor position
  circle(mouseX, mouseY, 10.0f);
}

Related