From Spherical
Revision as of 00:07, 4 June 2013 by Radnen (talk | contribs) (Created initial page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Causes the back buffer to be displayed to the screen for one time frame.


SetClippingRectangle(x, y, width, height);

  • x: the X coordinate of the clipping rectangle.
  • y: the Y coordinate of the clipping rectangle.
  • width: the width of the clipping rectangle.
  • height: the height of the clipping rectangle.


Set it to 0, 0, GetScreenWidth(), GetScreenHeight() to reset it.


Clipping out a portion of a rectangle.

// restricts drawing to just this 50x50 square, at location (50, 50).
SetClippingRectangle(50, 50, 50, 50);

while (!IsKeyPressed(KEY_ESCAPE)) {
    Rectangle(0, 0, GetScreenWidth(), GetScreenHeight());

See also