GSDP:GAM100/CProcessing/lineRotated()

From Inside
Jump to: navigation, search

lineRotated()

Description

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

Parameters

lineRotated(x1, y1, x2, y2, d);

  • 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
  • d - (float) the rotation in degrees

Example

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

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>