You.i Engine
CYIRenderingSurfaceInfo Class Reference

Detailed Description

An object that holds details about a rendering surface. Applications hold onto an instance of this class.

See also
CYIApp::GetRenderingSurfaceInfo()

#include <renderer/YiRenderingSurfaceInfo.h>

Public Member Functions

 CYIRenderingSurfaceInfo ()
 
 CYIRenderingSurfaceInfo (int32_t width, int32_t height)
 
 CYIRenderingSurfaceInfo (int32_t width, int32_t height, int32_t xDensity, int32_t yDensity)
 
bool IsValid () const
 
int32_t GetWidth () const
 
int32_t GetHeight () const
 
int32_t GetXDensity () const
 
int32_t GetYDensity () const
 
float GetWidthInInches () const
 
float GetHeightInInches () const
 
float GetDiagonalSizeInches () const
 

Static Public Member Functions

static float GetDefaultSurfaceDensity ()
 

Friends

class CYIRenderingSurfaceInfoPriv
 

Constructor & Destructor Documentation

◆ CYIRenderingSurfaceInfo() [1/3]

CYIRenderingSurfaceInfo::CYIRenderingSurfaceInfo ( )

Creates a surface with dimensions of 0 and default densities.

See also
CYIRenderingSurfaceInfo::GetDefaultSurfaceDensity

◆ CYIRenderingSurfaceInfo() [2/3]

CYIRenderingSurfaceInfo::CYIRenderingSurfaceInfo ( int32_t  width,
int32_t  height 
)

Creates a surface with dimensions width and height. The surface will use the default density.

See also
CYIRenderingSurfaceInfo::GetDefaultSurfaceDensity

◆ CYIRenderingSurfaceInfo() [3/3]

CYIRenderingSurfaceInfo::CYIRenderingSurfaceInfo ( int32_t  width,
int32_t  height,
int32_t  xDensity,
int32_t  yDensity 
)

Creates a surface with the provided dimensions and densities.

Member Function Documentation

◆ GetDefaultSurfaceDensity()

static float CYIRenderingSurfaceInfo::GetDefaultSurfaceDensity ( )
static

Returns the default surface density in pixels per inch. This is used by the engine when the surface density is unknown or undiscoverable.

◆ GetDiagonalSizeInches()

float CYIRenderingSurfaceInfo::GetDiagonalSizeInches ( ) const

Returns the diagonal size of the surface in inches.

◆ GetHeight()

int32_t CYIRenderingSurfaceInfo::GetHeight ( ) const

Returns the height of the surface in pixels.

◆ GetHeightInInches()

float CYIRenderingSurfaceInfo::GetHeightInInches ( ) const

Returns the height of the surface in inches.

◆ GetWidth()

int32_t CYIRenderingSurfaceInfo::GetWidth ( ) const

Returns the width of the surface in pixels.

◆ GetWidthInInches()

float CYIRenderingSurfaceInfo::GetWidthInInches ( ) const

Returns the width of the surface in inches.

◆ GetXDensity()

int32_t CYIRenderingSurfaceInfo::GetXDensity ( ) const

Get the horizontal density of the surface in surface pixels per inch.

◆ GetYDensity()

int32_t CYIRenderingSurfaceInfo::GetYDensity ( ) const

Get the vertical density of the surface in surface pixels per inch.

◆ IsValid()

bool CYIRenderingSurfaceInfo::IsValid ( ) const

Returns true if this CYIRenderingSurfaceInfo instance is currently valid.

Note
Surface dimensions and density may not be accurate if IsValid returns false.

Friends And Related Function Documentation

◆ CYIRenderingSurfaceInfoPriv

friend class CYIRenderingSurfaceInfoPriv
friend

The documentation for this class was generated from the following file: