GSDP:GAM100/CProcessing/CP Graphics DrawQuad()

From Inside
Jump to: navigation, search

CP_Graphics_DrawQuad()

Description

Quad will draw a quadrangle given four points. They need will need to be in clockwise or counter-clockwise order, but it doesn't matter which.

Parameters

CP_Graphics_DrawQuad(x1, y1, x2, y2, x3, y3, x4, y4)

  • 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

Example

void update() 
{
    // draw a quadrangle given four points
    //   x       y
    CP_Graphics_DrawQuad(0.0f,   0.0f,
         100.0f, 0.0f,
         100.0f, 50.0f,
         0.0f,   50.0f);
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>