10#ifndef GFXWRAPNULL__H_
11#define GFXWRAPNULL__H_
15#include "GUIImageLoader.h"
16#include "GUIImageData.h"
63 const eC_UByte &ubRed,
64 const eC_UByte &ubGreen,
65 const eC_UByte &ubBlue,
66 const eC_UByte &ubAlpha = 255)
68 m_uiColor = UINT_FROM_ARGB(ubAlpha, ubRed, ubGreen, ubBlue);
72 const eC_Value& vAbsX1,
const eC_Value& vAbsY1,
73 const eC_Value& vAbsX2,
const eC_Value& vAbsY2) {}
76 const eC_Value& vAbsX1,
const eC_Value& vAbsY1,
77 const eC_Value& vAbsX2,
const eC_Value& vAbsY2) {}
80 const eC_Value& vAbsX1,
const eC_Value& vAbsY1,
81 const eC_Value& vAbsX2,
const eC_Value& vAbsY2) {}
84 const eC_Value& vAbsX1,
const eC_Value& vAbsY1,
85 const eC_Value& vAbsX2,
const eC_Value& vAbsY2,
86 const eC_Bool &bFilled) {}
93 const eC_Value& vStartAngle,
94 const eC_Value& vEndAngle,
95 const eC_Value& vRotationAngle,
96 const eC_Bool &bFilled) {}
99 const eC_Value& vX1,
const eC_Value& vY1,
100 const eC_Value& vX2,
const eC_Value& vY2,
101 const eC_Value& vWidth,
102 const eC_Value& vStartAngle,
const eC_Value& vEndAngle,
103 const eC_Value& vRotationAngle,
104 const eC_Bool &bFilled) {}
108 const eC_UInt &uiAbsSrcX,
const eC_UInt &uiAbsSrcY,
109 const eC_UInt &uiSrcWidth,
const eC_UInt &uiSrcHeight,
110 const eC_Value& vAbsDestX,
const eC_Value& vAbsDestY,
111 const eC_Value& vDestWidth,
const eC_Value& vDestHeight,
112 const eC_UByte &ubAlpha = 255,
113 const eC_Value& vAngle = eC_FromFloat(0),
114 const eC_Value& vRotCenterX = eC_FromFloat(0.5),
const eC_Value& vRotCenterY = eC_FromFloat(0.5)) {}
125 if (!GETIMGLOADER.LoadImg(*m_pkImages[uiCurImage], kPath))
127 GUILOG(GUI_TRACE_ERROR,
"CGfxWrapGL::LoadImgImpl: Problem loading the image from file:\nFilename: '" + kPath +
"'.\n");
133 const eC_UInt& uiWidth,
134 const eC_UInt& uiHeight,
135 const eC_UInt& eImageType,
141 m_pkImages[uiCurImage]->SetData((eC_UByte*)pkMemory);
142 m_pkImages[uiCurImage]->SetWidth(uiWidth);
143 m_pkImages[uiCurImage]->SetHeight(uiHeight);
153 if (uiCurImage >=
m_uiNOFImages || m_pkImages[uiCurImage] == NULL)
156 delete m_pkImages[uiCurImage];
157 m_pkImages[uiCurImage] = NULL;
166 return m_pkImages[uiCurImage] != NULL;
173 if (uiCurImage >=
m_uiNOFImages || m_pkImages[uiCurImage] == NULL)
175 return m_pkImages[uiCurImage]->GetWidth();
182 if (uiCurImage >=
m_uiNOFImages || m_pkImages[uiCurImage] == NULL)
184 return m_pkImages[uiCurImage]->GetHeight();
192 GUILOG(GUI_TRACE_ERROR,
"CGfxWrapNULL::GetImageSize: Illegal image ID (" + eC_String(eID) +
") supplied.\n");
199 return m_pkImages[uiCurImage]->GetWidth() * m_pkImages[uiCurImage]->GetHeight() * m_pkImages[uiCurImage]->GetBytePerPixel();
223 m_pkImages.SetQuantity(uiNOFImages,
true);
226 for (eC_UInt ui = 1; ui <= uiNOFNewImages; ui++)
228 m_pkImages[uiNOFImages - ui] = NULL;
238 GUILOG(GUI_TRACE_WARNING,
"------------------------\n");
239 GUILOG(GUI_TRACE_WARNING,
"| GfxWrapNull chosen |\n");
240 GUILOG(GUI_TRACE_WARNING,
"------------------------\n");
242 m_pkImages.SetQuantity(0,
false);
249 m_pkImages.SetQuantity(0,
false);
260 m_pkImages[i] = NULL;
276 eC_TArray<CGUIImageData*> m_pkImages;
ImageResource_t
Enumeration of image resource ids.
Definition: GUIImageResource.h:126
#define MAP_IMGID_TO_ARRAY(IMG_ID)
Map ImageIDs to interval 0 to NOF_IMAGERESOURCES.
Definition: GUIImageResource.h:145
ImageType_t
Definition: GUICommonEnums.h:80
void SetGfxWrap(CGfxWrap *pkGfxWrap)
static CGUIComponentManager & GetInstance()
Contains information about an image loaded by CGUIImageLoader.
Definition: GUIImageData.h:29
@ MT_MANAGED_EXTERNAL
externally managed, will NOT be freed
Definition: GUIImageData.h:44
Helper class to supply a platform independent rectangle implementation.
Definition: GUIRect.h:63
The graphics wrapper base class.
Definition: GfxWrap.h:84
eC_UInt m_uiScreenWidth
Screen width.
Definition: GfxWrap.h:1373
eC_UInt m_uiNOFImages
total number of image-objects
Definition: GfxWrap.h:1404
CGUICommonEnums::ImageType_t GetScreenFormat() const
Definition: GfxWrap.h:180
eC_UInt m_uiScreenHeight
Screen height.
Definition: GfxWrap.h:1376
void SetDoubleBufferingEnforcesFlipping(const eC_Bool bDoubleBufferingEnforcesFlipping)
Definition: GfxWrap.h:903
void SetScreenFormat(const CGUICommonEnums::ImageType_t &uiScreenFormat)
Definition: GfxWrap.h:185
RefreshCall_t
Definition: GfxWrap.h:109
virtual void SetCliprect(const CGUIRect &NewAbsClipRect)=0
eC_UInt m_uiColor
Currently set foreground color.
Definition: GfxWrap.h:1407
The null Graphics-Wrapper class.
Definition: GfxWrapNull.h:27
virtual eC_UInt GetImageSize(const ImageResource_t &eID) const
Definition: GfxWrapNull.h:187
virtual eC_Bool SetNOFImagesImpl(const eC_UInt uiNOFImages)
Definition: GfxWrapNull.h:213
virtual eC_UInt GetPhysicalScreenWidth()
Definition: GfxWrapNull.h:202
virtual eC_Bool Refresh(const RefreshCall_t eRefreshCallType)
Definition: GfxWrapNull.h:42
virtual eC_UInt GetVirtualScreenHeight()
Definition: GfxWrapNull.h:52
virtual void FilledRect(const eC_Value &vAbsX1, const eC_Value &vAbsY1, const eC_Value &vAbsX2, const eC_Value &vAbsY2)
Definition: GfxWrapNull.h:79
virtual eC_UInt GetImgHeightImpl(const ImageResource_t &eImageID) const
Definition: GfxWrapNull.h:178
static void CreateInstance()
Definition: GfxWrapNull.h:33
virtual void BlitImgExtImpl(const CGUIImageData &kImageData, const eC_Value &vAbsX, const eC_Value &vAbsY)
Definition: GfxWrapNull.h:116
virtual void Ring(const eC_Value &vX1, const eC_Value &vY1, const eC_Value &vX2, const eC_Value &vY2, const eC_Value &vWidth, const eC_Value &vStartAngle, const eC_Value &vEndAngle, const eC_Value &vRotationAngle, const eC_Bool &bFilled)
Definition: GfxWrapNull.h:98
virtual void Line(const eC_Value &vAbsX1, const eC_Value &vAbsY1, const eC_Value &vAbsX2, const eC_Value &vAbsY2)
the following methods are protected to prevent calling them directly
Definition: GfxWrapNull.h:71
virtual void SetForegroundColorImpl(const eC_UByte &ubRed, const eC_UByte &ubGreen, const eC_UByte &ubBlue, const eC_UByte &ubAlpha=255)
Definition: GfxWrapNull.h:62
virtual eC_UInt GetImgWidthImpl(const ImageResource_t &eImageID) const
Definition: GfxWrapNull.h:169
virtual eC_UInt GetVirtualScreenWidth()
Definition: GfxWrapNull.h:47
virtual eC_Bool ImageExists(const ImageResource_t eID) const
Definition: GfxWrapNull.h:160
virtual void Rect(const eC_Value &vAbsX1, const eC_Value &vAbsY1, const eC_Value &vAbsX2, const eC_Value &vAbsY2)
Definition: GfxWrapNull.h:75
virtual void LoadImgImpl(const eC_String &kPath, const ImageResource_t &eImageID)
Definition: GfxWrapNull.h:118
virtual void UnloadImg(const ImageResource_t &eImageID)
Definition: GfxWrapNull.h:147
virtual void SetCliprect(const CGUIRect &NewAbsClipRect)
Definition: GfxWrapNull.h:57
virtual void Ellipse(const eC_Value &vAbsX1, const eC_Value &vAbsY1, const eC_Value &vAbsX2, const eC_Value &vAbsY2, const eC_Bool &bFilled)
Definition: GfxWrapNull.h:83
virtual void BlitImgExtImpl(const ImageResource_t &eID, const eC_UInt &uiAbsSrcX, const eC_UInt &uiAbsSrcY, const eC_UInt &uiSrcWidth, const eC_UInt &uiSrcHeight, const eC_Value &vAbsDestX, const eC_Value &vAbsDestY, const eC_Value &vDestWidth, const eC_Value &vDestHeight, const eC_UByte &ubAlpha=255, const eC_Value &vAngle=eC_FromFloat(0), const eC_Value &vRotCenterX=eC_FromFloat(0.5), const eC_Value &vRotCenterY=eC_FromFloat(0.5))
Definition: GfxWrapNull.h:106
virtual eC_UInt GetPhysicalScreenHeight()
Definition: GfxWrapNull.h:207
virtual void LoadImgImpl(void *pkMemory, const eC_UInt &uiWidth, const eC_UInt &uiHeight, const eC_UInt &eImageType, const ImageResource_t &eImageID)
Definition: GfxWrapNull.h:131
virtual void Arc(const eC_Value &vX1, const eC_Value &vY1, const eC_Value &vX2, const eC_Value &vY2, const eC_Value &vStartAngle, const eC_Value &vEndAngle, const eC_Value &vRotationAngle, const eC_Bool &bFilled)
Definition: GfxWrapNull.h:88