AudioAsset
Ease
FastString
FontAsset
NineSlice
PackedSprite
PackedSpriteID
RB
   HardwareSettings
   IRetroBlitGame
RBAsset
Rect2i
ShaderAsset
SoundReference
SpriteGrid
SpriteSheetAsset
TMXMapAsset
   TMXLayer
   TMXLayerLoadState
   TMXObject
   TMXObjectGroup
   TMXProperties
Vector2i

RB.ClipSet

Method  -  Static

public static void ClipSet(Rect2i rect)

Parameters

rect Rect2i Rectangular clip region

Returns

Nothing.

Description

Set a rectangular clipping region that will affect all drawing that follows. Everything outside of the clipping region will not be drawn.

By default the clipping region covers the entire display, which means that nothing is clipped.

Example

const int LAYER_TERRAIN_MINIMAP = 0;

void Render()
{
    var oldClipRegion = RB.ClipGet();

    // Use clip region to render a minimap in the top left corner of the screen
    RB.ClipSet(new Vector2i(00128128);
    RB.DrawMapLayer(LAYER_TERRAIN_MINIMAP);

    RB.ClipSet(oldClipRegion);
}

See Also

RB.ClipGet
RB.ClipReset
RB.ClipDebugEnable
RB.ClipDebugDisable

See Docs

Features - Clip Region