Difference between revisions of "Legacy:GetClippingRectangle"

From Spherical
Jump to: navigation, search
(Created initial page)
 
(added navbox)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Functions]]
+
Grabs the clipping rectangle as an object with 4 properties: x, y, width, and height.
 
 
Causes the back buffer to be displayed to the screen for one time frame.
 
  
 
==Usage==
 
==Usage==
  
{{Usage|returns=Rectangle|func=GetClippingRectangle}}
+
{{Usage|returns=[[API:ClippingRectangle|ClippingRectangle]]|func=GetClippingRectangle}}
  
 
==Notes==
 
==Notes==
Line 39: Line 37:
 
* [[API:font/drawText|font.drawText]](x, y, text)
 
* [[API:font/drawText|font.drawText]](x, y, text)
 
* [[API:FlipScreen|FlipScreen]]()
 
* [[API:FlipScreen|FlipScreen]]()
 +
 +
{{API:Video/navbox}}

Latest revision as of 21:05, 4 June 2013

Grabs the clipping rectangle as an object with 4 properties: x, y, width, and height.

Usage

ClippingRectangle GetClippingRectangle();


Notes

The returned clipping rectangle has the 4 properties, x, y, width, and height.

Examples

Get the clipping rectangle (whatever it was) and print it to screen.

var clip = GetClippingRectangle();
var f = GetSystemFont();

var x = clip.x;
var y = clip.y;
var w = clip.width;
var h = clip.height;

while (!IsKeyPressed(KEY_ESCAPE)) {
    f.drawText(0, 0, "x: " + x + " y: " + y + " w: " + w + " h: " + h);
    FlipScreen();
}


See also

API:Video/navbox