GSDP:GAM100/CProcessing/CP Graphics DrawPoint()

From Inside
Jump to: navigation, search

CP_Graphics_DrawPoint()

Description

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

Parameters

CP_Graphics_DrawPoint(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
    CP_Settings_Background(CP_Color_Create(0, 0, 0, 255));
}

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

    // fill the pixel white
    CP_Settings_Fill(CP_Color_Create(0, 0, 0, 255));

    // draw a single pixel at the mouse position
    CP_Graphics_DrawPoint(CP_Input_GetMouseX(), CP_Input_GetMouseY());
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>