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& uiCount,
109 const eC_Bool& bFilled) {}
113 const eC_UInt &uiAbsSrcX,
const eC_UInt &uiAbsSrcY,
114 const eC_UInt &uiSrcWidth,
const eC_UInt &uiSrcHeight,
115 const eC_Value& vAbsDestX,
const eC_Value& vAbsDestY,
116 const eC_Value& vDestWidth,
const eC_Value& vDestHeight,
117 const eC_UByte &ubAlpha = 255,
118 const eC_Value& vAngle = eC_FromFloat(0),
119 const eC_Value& vRotCenterX = eC_FromFloat(0.5),
const eC_Value& vRotCenterY = eC_FromFloat(0.5)) {}
130 if (!GETIMGLOADER.LoadImg(*m_pkImages[uiCurImage], kPath))
132 GUILOG(GUI_TRACE_ERROR,
"CGfxWrapGL::LoadImgImpl: Problem loading the image from file:\nFilename: '" + kPath +
"'.\n");
138 const eC_UInt& uiWidth,
139 const eC_UInt& uiHeight,
140 const eC_UInt& eImageType,
146 m_pkImages[uiCurImage]->SetData((eC_UByte*)pkMemory);
147 m_pkImages[uiCurImage]->SetWidth(uiWidth);
148 m_pkImages[uiCurImage]->SetHeight(uiHeight);
158 if (uiCurImage >=
m_uiNOFImages || m_pkImages[uiCurImage] == NULL)
161 delete m_pkImages[uiCurImage];
162 m_pkImages[uiCurImage] = NULL;
171 return m_pkImages[uiCurImage] != NULL;
178 if (uiCurImage >=
m_uiNOFImages || m_pkImages[uiCurImage] == NULL)
180 return m_pkImages[uiCurImage]->GetWidth();
187 if (uiCurImage >=
m_uiNOFImages || m_pkImages[uiCurImage] == NULL)
189 return m_pkImages[uiCurImage]->GetHeight();
197 GUILOG(GUI_TRACE_ERROR,
"CGfxWrapNULL::GetImageSize: Illegal image ID (" + eC_String(eID) +
") supplied.\n");
204 return m_pkImages[uiCurImage]->GetWidth() * m_pkImages[uiCurImage]->GetHeight() * m_pkImages[uiCurImage]->GetBytePerPixel();
228 m_pkImages.SetQuantity(uiNOFImages,
true);
231 for (eC_UInt ui = 1; ui <= uiNOFNewImages; ui++)
233 m_pkImages[uiNOFImages - ui] = NULL;
243 GUILOG(GUI_TRACE_WARNING,
"------------------------\n");
244 GUILOG(GUI_TRACE_WARNING,
"| GfxWrapNull chosen |\n");
245 GUILOG(GUI_TRACE_WARNING,
"------------------------\n");
247 m_pkImages.SetQuantity(0,
false);
254 m_pkImages.SetQuantity(0,
false);
265 m_pkImages[i] = NULL;
281 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:88
eC_UInt m_uiScreenWidth
Screen width.
Definition: GfxWrap.h:1398
eC_UInt m_uiNOFImages
total number of image-objects
Definition: GfxWrap.h:1429
CGUICommonEnums::ImageType_t GetScreenFormat() const
Definition: GfxWrap.h:184
eC_UInt m_uiScreenHeight
Screen height.
Definition: GfxWrap.h:1401
void SetDoubleBufferingEnforcesFlipping(const eC_Bool bDoubleBufferingEnforcesFlipping)
Definition: GfxWrap.h:911
void SetScreenFormat(const CGUICommonEnums::ImageType_t &uiScreenFormat)
Definition: GfxWrap.h:189
RefreshCall_t
Definition: GfxWrap.h:113
virtual void SetCliprect(const CGUIRect &NewAbsClipRect)=0
eC_UInt m_uiColor
Currently set foreground color.
Definition: GfxWrap.h:1432
The null Graphics-Wrapper class.
Definition: GfxWrapNull.h:27
virtual eC_UInt GetImageSize(const ImageResource_t &eID) const
Definition: GfxWrapNull.h:192
virtual eC_Bool SetNOFImagesImpl(const eC_UInt uiNOFImages)
Definition: GfxWrapNull.h:218
virtual eC_UInt GetPhysicalScreenWidth()
Definition: GfxWrapNull.h:207
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:183
static void CreateInstance()
Definition: GfxWrapNull.h:33
virtual void BlitImgExtImpl(const CGUIImageData &kImageData, const eC_Value &vAbsX, const eC_Value &vAbsY)
Definition: GfxWrapNull.h:121
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:174
virtual eC_UInt GetVirtualScreenWidth()
Definition: GfxWrapNull.h:47
virtual eC_Bool ImageExists(const ImageResource_t eID) const
Definition: GfxWrapNull.h:165
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:123
virtual void UnloadImg(const ImageResource_t &eImageID)
Definition: GfxWrapNull.h:152
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:111
virtual eC_UInt GetPhysicalScreenHeight()
Definition: GfxWrapNull.h:212
virtual void LoadImgImpl(void *pkMemory, const eC_UInt &uiWidth, const eC_UInt &uiHeight, const eC_UInt &eImageType, const ImageResource_t &eImageID)
Definition: GfxWrapNull.h:136
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
virtual void Polygon(eC_Value *pvPoints, const eC_UInt &uiCount, const eC_Bool &bFilled)
Definition: GfxWrapNull.h:106