Difference between revisions of "Legacy:GetClippingRectangle"
From Spherical
m (updated description) |
(→Usage: ClippingRectangle) |
||
Line 5: | Line 5: | ||
==Usage== | ==Usage== | ||
− | {{Usage|returns= | + | {{Usage|returns=[[API:ClippingRectangle|ClippingRectangle]]|func=GetClippingRectangle}} |
==Notes== | ==Notes== |
Revision as of 05:58, 4 June 2013
Grabs the clipping rectangle as an object with 4 properties: x, y, width, and height.
Contents
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
- SetClippingRectangle(x, y, w, h)
- IsKeyPressed()
- font.drawText(x, y, text)
- FlipScreen()