GSDP:GAM100/CProcessing/CP Graphics DrawQuadAdvanced()

From Inside
Jump to: navigation, search

CP_Graphics_DrawQuadAdvanced()

Description

A specialized version of the CP_Graphics_DrawQuadAdvanced() function which allows the user to specify a rotation in degrees. The quadrangle is always rotated about the center.

Parameters

Parameters

CP_Graphics_DrawQuadAdvanced(x1, y1, x2, y2, x3, y3, x4, y4, degrees)

  • x1 - (float) the first point's horizontal position
  • y1 - (float) the first point's vertical position
  • x2 - (float) the second point's horizontal position
  • y2 - (float) the second point's vertical position
  • x3 - (float) the third point's horizontal position
  • y3 - (float) the third point's vertical position
  • x4 - (float) the fourth point's horizontal position
  • y4 - (float) the fourth point's vertical position
  • degrees - (float) the rotation in degrees

Example

void update() 
{
    // draw a quad rotated by 45 degrees
    CP_Graphics_DrawQuadAdvanced(100.0f, 100.0f,  // corner 1
                                 200.0f, 100.0f,  // corner 2
                                 200.0f, 150.0f,  // corner 3
                                 100.0f, 150.0f,  // corner 4
                                 45.0f);          // degrees rotation
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>