# DrawableRegion

from pandac.PandaModules import DrawableRegion

Class : DrawableRegion
Description : This is a base class for GraphicsWindow (actually, GraphicsOutput) and DisplayRegion, both of which are conceptually rectangular regions into which drawing commands may be issued. Sometimes you want to deal with a single display region, and sometimes you want to deal with the whole window at once, particularly for issuing clear commands and capturing screenshots.

## Inheritance:

DrawableRegion:

## Methods of DrawableRegion:

disableClears
getClearColor
getClearColorActive
getClearDepth
getClearDepthActive
isAnyClearActive
setClearColor
setClearColorActive
setClearDepth
setClearDepthActive

disableClears void DrawableRegion::disable_clears(void); Description: Disables both the color and depth clear. See set_clear_color_active and set_clear_depth_active.

getClearColor LVecBase4f const &DrawableRegion::get_clear_color(void) const; Description: Returns the current clear color value. This is the value that will be used to clear the color buffer every frame, but only if get_clear_color_active() returns true. If get_clear_color_active() returns false, this is meaningless.

getClearColorActive bool DrawableRegion::get_clear_color_active(void) const; Description: Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame. See set_clear_color_active().

getClearDepth float DrawableRegion::get_clear_depth(void) const; Description: Returns the current clear depth value. This is the value that will be used to clear the depth buffer every frame, but only if get_clear_depth_active() returns true. If get_clear_depth_active() returns false, this is meaningless.

getClearDepthActive bool DrawableRegion::get_clear_depth_active(void) const; Description: Returns the current setting of the flag that indicates whether the depth buffer should be cleared every frame. See set_clear_depth_active().

isAnyClearActive bool DrawableRegion::is_any_clear_active(void) const; Description: Returns true if any of the clear types (so far there are just color or depth) have been set active, or false if none of them are active and there is no need to clear.

setClearColor void DrawableRegion::set_clear_color(LVecBase4f const &color); Description: Sets the clear color to the indicated value. This is the value that will be used to clear the color buffer every frame, but only if get_clear_color_active() returns true. If get_clear_color_active() returns false, this is meaningless.

setClearColorActive void DrawableRegion::set_clear_color_active(bool clear_color_active); Description: Toggles the flag that indicates whether the color buffer should be cleared every frame. If this is true, the color buffer will be cleared to the color indicated by set_clear_color(); otherwise, it will be left alone.

setClearDepth void DrawableRegion::set_clear_depth(float depth); Description: Sets the clear depth to the indicated value. This is the value that will be used to clear the depth buffer every frame, but only if get_clear_depth_active() returns true. If get_clear_depth_active() returns false, this is meaningless.

setClearDepthActive void DrawableRegion::set_clear_depth_active(bool clear_depth_active); Description: Toggles the flag that indicates whether the depth buffer should be cleared every frame. If this is true, the depth buffer will be cleared to the depth value indicated by set_clear_depth(); otherwise, it will be left alone.