Pixels (C++)

From RAD Studio Code Examples
Jump to: navigation, search

Description

This example draws a red line (very slowly) when you press a button. Attach the following code to the button's OnClick event handler.

Code

void __fastcall TForm1::Button1Click(TObject *Sender)
{
  for (int i = 10; i <= 200; i++)
    Canvas->Pixels[i][10] = clRed;
}

Uses