![]() |
Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
|
#include <GraphicContext.h>
Classes | |
class | UITransform |
Public Member Functions | |
CGraphicContext (void) | |
virtual | ~CGraphicContext () |
float | GetFPS () const |
void | SetFPS (float fps) |
float | GetDisplayLatency () const |
bool | IsFullScreenRoot () const |
void | ToggleFullScreen () |
void | SetFullScreenVideo (bool bOnOff) |
bool | IsFullScreenVideo () const |
bool | IsValidResolution (RESOLUTION res) |
void | SetVideoResolution (RESOLUTION res, bool forceUpdate) |
void | ApplyModeChange (RESOLUTION res) |
void | ApplyWindowResize (int newWidth, int newHeight) |
RESOLUTION | GetVideoResolution () const |
const RESOLUTION_INFO | GetResInfo () const |
const RESOLUTION_INFO | GetResInfo (RESOLUTION res) const |
void | SetResInfo (RESOLUTION res, const RESOLUTION_INFO &info) |
void | Flip (bool rendered, bool videoLayer) |
int | GetWidth () const |
int | GetHeight () const |
bool | SetViewPort (float fx, float fy, float fwidth, float fheight, bool intersectPrevious=false) |
void | RestoreViewPort () |
void | SetScissors (const CRect &rect) |
void | ResetScissors () |
const CRect & | GetScissors () const |
const CRect | GetViewWindow () const |
void | SetViewWindow (float left, float top, float right, float bottom) |
bool | IsCalibrating () const |
void | SetCalibrating (bool bOnOff) |
void | ResetOverscan (RESOLUTION res, OVERSCAN &overscan) |
void | ResetOverscan (RESOLUTION_INFO &resinfo) |
void | ResetScreenParameters (RESOLUTION res) |
void | CaptureStateBlock () |
void | ApplyStateBlock () |
void | Clear (UTILS::Color color=0) |
void | GetAllowedResolutions (std::vector< RESOLUTION > &res) |
void | GetGUIScaling (const RESOLUTION_INFO &res, float &scaleX, float &scaleY, TransformMatrix *matrix=NULL) |
void | SetRenderingResolution (const RESOLUTION_INFO &res, bool needsScaling) |
Sets scaling up for rendering. More... | |
void | SetScalingResolution (const RESOLUTION_INFO &res, bool needsScaling) |
Sets scaling up for skin loading etc. More... | |
float | GetScalingPixelRatio () const |
void | InvertFinalCoords (float &x, float &y) const |
float | ScaleFinalXCoord (float x, float y) const |
float | ScaleFinalYCoord (float x, float y) const |
float | ScaleFinalZCoord (float x, float y) const |
void | ScaleFinalCoords (float &x, float &y, float &z) const |
bool | RectIsAngled (float x1, float y1, float x2, float y2) const |
const TransformMatrix & | GetGUIMatrix () const |
float | GetGUIScaleX () const |
float | GetGUIScaleY () const |
UTILS::Color | MergeAlpha (UTILS::Color color) const |
void | SetOrigin (float x, float y) |
void | RestoreOrigin () |
void | SetCameraPosition (const CPoint &camera) |
void | SetStereoView (RENDER_STEREO_VIEW view) |
RENDER_STEREO_VIEW | GetStereoView () |
void | SetStereoMode (RENDER_STEREO_MODE mode) |
RENDER_STEREO_MODE | GetStereoMode () |
void | RestoreCameraPosition () |
void | SetStereoFactor (float factor) |
void | RestoreStereoFactor () |
bool | SetClipRegion (float x, float y, float w, float h) |
Set a region in which to clip all rendering Anything that is rendered after setting a clip region will be clipped so that no part renders outside of the clip region. Successive calls to SetClipRegion intersect the clip region, which means the clip region may eventually become an empty set. In this case SetClipRegion returns false to indicate that no rendering need be performed. More... | |
void | RestoreClipRegion () |
void | ClipRect (CRect &vertex, CRect &texture, CRect *diffuse=NULL) |
CRect | GetClipRegion () |
void | AddGUITransform () |
TransformMatrix | AddTransform (const TransformMatrix &matrix) |
void | SetTransform (const TransformMatrix &matrix) |
void | SetTransform (const TransformMatrix &matrix, float scaleX, float scaleY) |
void | RemoveTransform () |
CRect | StereoCorrection (const CRect &rect) const |
CPoint | StereoCorrection (const CPoint &point) const |
CRect | GenerateAABB (const CRect &rect) const |
const std::string & | GetMediaDir () const |
void | SetMediaDir (const std::string &strMediaDir) |
![]() | |
CountingLockable ()=default | |
void | lock () |
bool | try_lock () |
void | unlock () |
unsigned int | exit (unsigned int leave=0) |
void | restore (unsigned int restoreCount) |
XbmcThreads::CRecursiveMutex & | get_underlying () |
Protected Member Functions | |
void | UpdateCameraPosition (const CPoint &camera, const float &factor) |
void | SetVideoResolutionInternal (RESOLUTION res, bool forceUpdate) |
void | ApplyVideoResolution (RESOLUTION res) |
void | UpdateInternalStateWithResolution (RESOLUTION res) |
Protected Attributes | |
int | m_iScreenHeight = 576 |
int | m_iScreenWidth = 720 |
std::string | m_strMediaDir |
CRect | m_videoRect |
bool | m_bFullScreenRoot = true |
bool | m_bFullScreenVideo = false |
bool | m_bCalibrating = false |
RESOLUTION | m_Resolution = RES_INVALID |
float | m_fFPSOverride = 0.0f |
RESOLUTION_INFO | m_windowResolution |
std::stack< CPoint > | m_cameras |
std::stack< CPoint > | m_origins |
std::stack< CRect > | m_clipRegions |
std::stack< float > | m_stereoFactors |
std::stack< CRect > | m_viewStack |
CRect | m_scissors |
UITransform | m_guiTransform |
UITransform | m_finalTransform |
std::stack< UITransform > | m_transforms |
RENDER_STEREO_VIEW | m_stereoView = RENDER_STEREO_VIEW_OFF |
RENDER_STEREO_MODE | m_stereoMode = RENDER_STEREO_MODE_OFF |
RENDER_STEREO_MODE | m_nextStereoMode = RENDER_STEREO_MODE_OFF |
![]() | |
XbmcThreads::CRecursiveMutex | mutex |
unsigned int | count |
|
default |
|
virtualdefault |
void CGraphicContext::AddGUITransform | ( | ) |
TransformMatrix CGraphicContext::AddTransform | ( | const TransformMatrix & | matrix | ) |
void CGraphicContext::ApplyModeChange | ( | RESOLUTION | res | ) |
void CGraphicContext::ApplyStateBlock | ( | ) |
|
protected |
void CGraphicContext::ApplyWindowResize | ( | int | newWidth, |
int | newHeight | ||
) |
void CGraphicContext::CaptureStateBlock | ( | ) |
void CGraphicContext::Clear | ( | UTILS::Color | color = 0 | ) |
void CGraphicContext::Flip | ( | bool | rendered, |
bool | videoLayer | ||
) |
void CGraphicContext::GetAllowedResolutions | ( | std::vector< RESOLUTION > & | res | ) |
CRect CGraphicContext::GetClipRegion | ( | ) |
float CGraphicContext::GetDisplayLatency | ( | ) | const |
float CGraphicContext::GetFPS | ( | ) | const |
const TransformMatrix & CGraphicContext::GetGUIMatrix | ( | ) | const |
float CGraphicContext::GetGUIScaleX | ( | ) | const |
float CGraphicContext::GetGUIScaleY | ( | ) | const |
void CGraphicContext::GetGUIScaling | ( | const RESOLUTION_INFO & | res, |
float & | scaleX, | ||
float & | scaleY, | ||
TransformMatrix * | matrix = NULL |
||
) |
int CGraphicContext::GetHeight | ( | ) | const |
const std::string & CGraphicContext::GetMediaDir | ( | ) | const |
const RESOLUTION_INFO CGraphicContext::GetResInfo | ( | ) | const |
const RESOLUTION_INFO CGraphicContext::GetResInfo | ( | RESOLUTION | res | ) | const |
float CGraphicContext::GetScalingPixelRatio | ( | ) | const |
const CRect & CGraphicContext::GetScissors | ( | ) | const |
|
inline |
|
inline |
RESOLUTION CGraphicContext::GetVideoResolution | ( | ) | const |
const CRect CGraphicContext::GetViewWindow | ( | ) | const |
int CGraphicContext::GetWidth | ( | ) | const |
void CGraphicContext::InvertFinalCoords | ( | float & | x, |
float & | y | ||
) | const |
bool CGraphicContext::IsCalibrating | ( | ) | const |
bool CGraphicContext::IsFullScreenRoot | ( | ) | const |
bool CGraphicContext::IsFullScreenVideo | ( | ) | const |
bool CGraphicContext::IsValidResolution | ( | RESOLUTION | res | ) |
UTILS::Color CGraphicContext::MergeAlpha | ( | UTILS::Color | color | ) | const |
bool CGraphicContext::RectIsAngled | ( | float | x1, |
float | y1, | ||
float | x2, | ||
float | y2 | ||
) | const |
void CGraphicContext::RemoveTransform | ( | ) |
void CGraphicContext::ResetOverscan | ( | RESOLUTION | res, |
OVERSCAN & | overscan | ||
) |
void CGraphicContext::ResetOverscan | ( | RESOLUTION_INFO & | resinfo | ) |
void CGraphicContext::ResetScissors | ( | ) |
void CGraphicContext::ResetScreenParameters | ( | RESOLUTION | res | ) |
void CGraphicContext::RestoreCameraPosition | ( | ) |
void CGraphicContext::RestoreClipRegion | ( | ) |
void CGraphicContext::RestoreOrigin | ( | ) |
void CGraphicContext::RestoreStereoFactor | ( | ) |
void CGraphicContext::RestoreViewPort | ( | ) |
void CGraphicContext::ScaleFinalCoords | ( | float & | x, |
float & | y, | ||
float & | z | ||
) | const |
float CGraphicContext::ScaleFinalXCoord | ( | float | x, |
float | y | ||
) | const |
float CGraphicContext::ScaleFinalYCoord | ( | float | x, |
float | y | ||
) | const |
float CGraphicContext::ScaleFinalZCoord | ( | float | x, |
float | y | ||
) | const |
void CGraphicContext::SetCalibrating | ( | bool | bOnOff | ) |
bool CGraphicContext::SetClipRegion | ( | float | x, |
float | y, | ||
float | w, | ||
float | h | ||
) |
Set a region in which to clip all rendering Anything that is rendered after setting a clip region will be clipped so that no part renders outside of the clip region. Successive calls to SetClipRegion intersect the clip region, which means the clip region may eventually become an empty set. In this case SetClipRegion returns false to indicate that no rendering need be performed.
This call must be matched with a RestoreClipRegion call unless SetClipRegion returns false.
Usage should be of the form:
if (SetClipRegion(x, y, w, h)) { ... perform rendering ... RestoreClipRegion(); }
x | the left-most coordinate of the clip region |
y | the top-most coordinate of the clip region |
w | the width of the clip region |
h | the height of the clip region |
void CGraphicContext::SetFPS | ( | float | fps | ) |
void CGraphicContext::SetFullScreenVideo | ( | bool | bOnOff | ) |
void CGraphicContext::SetMediaDir | ( | const std::string & | strMediaDir | ) |
void CGraphicContext::SetOrigin | ( | float | x, |
float | y | ||
) |
void CGraphicContext::SetRenderingResolution | ( | const RESOLUTION_INFO & | res, |
bool | needsScaling | ||
) |
Sets scaling up for rendering.
void CGraphicContext::SetResInfo | ( | RESOLUTION | res, |
const RESOLUTION_INFO & | info | ||
) |
void CGraphicContext::SetScalingResolution | ( | const RESOLUTION_INFO & | res, |
bool | needsScaling | ||
) |
Sets scaling up for skin loading etc.
void CGraphicContext::SetStereoFactor | ( | float | factor | ) |
|
inline |
void CGraphicContext::SetStereoView | ( | RENDER_STEREO_VIEW | view | ) |
void CGraphicContext::SetTransform | ( | const TransformMatrix & | matrix | ) |
void CGraphicContext::SetTransform | ( | const TransformMatrix & | matrix, |
float | scaleX, | ||
float | scaleY | ||
) |
void CGraphicContext::SetVideoResolution | ( | RESOLUTION | res, |
bool | forceUpdate | ||
) |
|
protected |
bool CGraphicContext::SetViewPort | ( | float | fx, |
float | fy, | ||
float | fwidth, | ||
float | fheight, | ||
bool | intersectPrevious = false |
||
) |
void CGraphicContext::SetViewWindow | ( | float | left, |
float | top, | ||
float | right, | ||
float | bottom | ||
) |
void CGraphicContext::ToggleFullScreen | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |