GSDP:GAM100/CProcessing/CP Graphics DrawCircle()

From Inside
Jump to: navigation, search

CP_Graphics_DrawCircle()

Description

This is a simplified version of CP_Graphics_DrawEllipse(). A circle can be drawn on the screen using this function. The mode for drawing a circle and ellipse can be changed with * CP_Settings_EllipseMode().

Parameters

CP_Graphics_DrawCircle(x, y, r)

  • x - (float) the horizontal position of the circle
  • y - (float) the vertical position of the circle
  • r - (float) the uniform radius of the circle by default


Example

void update() 
{
    // set the background color
    CP_Settings_Background(CP_Color_Create(255, 40, 200, 255));

    //draw a circle at (100, 100)
    CP_Graphics_DrawCircle(100, 100, 50.0f);
     
    // draw a circle at the mouse position
    CP_Graphics_DrawCircle(CP_Input_GetMouseX(), CP_Input_GetMouseY(), 20.0f);
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>