GSDP:GAM100/CProcessing/CP Graphics DrawLineAdvanced()

From Inside
Jump to: navigation, search

CP_Graphics_DrawLineAdvanced()

Description

A specialized version of the CP_Graphics_DrawLine() function which allows the user to specify a rotation (in degrees). The line is always rotated around the center.

Parameters

CP_Graphics_DrawLineAdvanced(x1, y1, x2, y2, degrees);

  • x1 - (float) the horizontal position of the start of the line
  • y1 - (float) the vertical position of the start of the line
  • x2 - (float) the horizontal position of the end of the line
  • y1 - (float) the vertical position of the end of the line
  • degrees - (float) the rotation in degrees

Example

void update() 
{
    // a line from (100, 100) to (200, 100) rotated 45 degrees about the center
    CP_Graphics_DrawLineAdvanced(100.0f, 100.0f, 200.0f, 100.0f, 45.0f);
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>