Viewport::GetClippedRect

Viewport::GetClippedRect
template <typename IntType> bool GetClippedRect(Rect<IntType> * prect, bool orient = false) const;
template <typename IntType> bool GetClippedRect(Rect<IntType> * prect, IntType* pdx, IntType* pdy) const;
Description

GetClippedRect calculates clipped viewport rectangle, together with dx and dy adjustments that are made for the clipping that is to be done. Returns false if the resulting clipping rectangle is empty (thereby no rendering can take place). 

Clipping includes:

  1. Ensuring that (Left, Top, Width, Height) fall within Buffer size.
  2. Clipping to UseScissorRect if needed.
Parameters
Parameters 
Description 
Rect<IntType> * prect 
Pointer to a rectangle for the rectangle dimensions. //the rectangle to clip rendering to. 
bool orient = false 
_nt_ 
IntType* pdx 
_nt_ 
IntType* pdy 
_nt_ 
Return Value

Returns true for successful clipped rectangle and empty if the resulting clipping rectangle is empty.