GSDP:GAM100/CProcessing/rectRounded()

From Inside
Jump to: navigation, search

rectRounded()

Description

This is a specialized version of the rect() function which additionally allows you to specify a radius for rounding the corners uniformly.

Parameters

rectRounded(x, y, w, h, r)

  • x - (float) the horizontal position of the rectangle
  • y - (float) the vertical position of the rectangle
  • w - (float) the width of the rectangle
  • h - (float) the height of the rectangle
  • r - (float) the radius of the corner rounding

Example

void update() 
{
    // draw a 100x50 rectangle with radius 15 rounded corners
    rectRounded(mouseX, mouseY, 100.0f, 50.0f, 15.0f);
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>