10#ifndef GFXWRAPEGML__H_
11#define GFXWRAPEGML__H_
14#include "eGML_Config.h"
15#include "eGML_Platform.h"
16#include "eGML_Bitmap.h"
71 const eC_UByte &ubRed,
72 const eC_UByte &ubGreen,
73 const eC_UByte &ubBlue,
74 const eC_UByte &ubAlpha = 255);
76 virtual void Line(
const eC_Value& vX1,
const eC_Value& vY1,
const eC_Value& vX2,
const eC_Value& vY2);
78 virtual void Rect(
const eC_Value& vX1,
const eC_Value& vY1,
const eC_Value& vX2,
const eC_Value& vY2);
80 virtual void FilledRect(
const eC_Value& vX1,
const eC_Value& vY1,
const eC_Value& vX2,
const eC_Value& vY2);
91 virtual void Ellipse(
const eC_Value& vAbsX1,
const eC_Value& vAbsY1,
const eC_Value& vAbsX2,
const eC_Value& vAbsY2,
const eC_Bool &bFilled);
98 const eC_Value& vStartAngle,
99 const eC_Value& vEndAngle,
100 const eC_Value& vRotationAngle,
101 const eC_Bool &bFilled);
108 const eC_Value& vRingWidth,
109 const eC_Value& vStartAngle,
110 const eC_Value& vEndAngle,
111 const eC_Value& vRotationAngle,
112 const eC_Bool & bFilled);
181 const eC_UInt& uiWidth,
182 const eC_UInt& uiHeight,
183 const eC_UInt& eImageType,
193 const eC_UInt &uiSrcX,
const eC_UInt &uiSrcY,
194 const eC_UInt &uiSrcWidth,
const eC_UInt &uiSrcHeight,
195 const eC_Value& vDestX,
const eC_Value& vDestY,
196 const eC_Value& vDestWidth,
const eC_Value& vDestHeight,
197 const eC_UByte &ubAlpha = 255,
198 const eC_Value& vAngle = eC_FromFloat(0),
199 const eC_Value& vRotCenterX = eC_FromFloat(0.5),
const eC_Value& vRotCenterY = eC_FromFloat(0.5));
220 const eC_UInt &uiAbsSrcX,
const eC_UInt &uiAbsSrcY,
const eC_UInt &uiSrcWidth,
const eC_UInt &uiSrcHeight,
221 const eC_Value& vAbsDestX,
const eC_Value& vAbsDestY,
const eC_Value& vDestWidth,
const eC_Value& vDestHeight,
222 const eC_UByte &ubAlpha = 255,
223 const eC_Value& vAngle = eC_FromFloat(0),
224 const eC_Value& vRotCenterX = eC_FromFloat(0.5),
const eC_Value& vRotCenterY = eC_FromFloat(0.5));
278 class CModifyableBitmap :
public eGML_Bitmap
281 CModifyableBitmap(eC_UInt uiWidth, eC_UInt uiHeight, eC_UByte ubBitmapBufferType) :
282 eGML_Bitmap(uiWidth, uiHeight, ubBitmapBufferType)
297 void SetNewBitmapData(eC_UInt eFormat, eC_UInt uiWidth, eC_UInt uiHeight, eC_UByte ubBitmapBufferType,
void *pBitmapBuffer)
301 m_uiHeight = uiHeight;
302 m_ubBBT = ubBitmapBufferType;
303 m_pkData = pBitmapBuffer;
308 case eGML::BM_ALPHA1:
309 m_uiPitch = (uiWidth + 7) & ~0x07;
311 case eGML::BM_ALPHA8:
314 case eGML::BM_RGB565:
315 case eGML::BM_RGB555:
316 m_uiPitch = uiWidth * 2;
319 case eGML::BM_ARGB32:
320 m_uiPitch = uiWidth * 4;
323 GUILOG(GUI_TRACE_ERROR,
"Unknown bitmap format. Failed to determine pitch.\n");
328 virtual void * Lock()
334 virtual void Unlock(eC_UInt uiX1 = 0, eC_UInt uiY1 = 0, eC_UInt uiX2 = 0, eC_UInt uiY2 = 0)
339 virtual void DrawLine(
const eGML_Vector2 &kStart,
const eGML_Vector2 &kEnd, eGML_Color kColor, eC_Flag ulFlags, eC_Value vStartWidth, eC_Value vEndWidth = 0)
344 virtual void DrawPolygon(
const eGML_Coord2D *pkVertices, eC_UInt uiCount, eGML_Color kColor, eC_Flag ulFlags)
349 virtual void Clear(eGML_Color clColor)
354 virtual void FillRect(eC_UInt uiWidth, eC_UInt uiHeight, eC_Int iX1, eC_Int iY1, eGML_Color clColor, eC_Flag ulFlags = 0)
362 GUIBitmapPlaneID_t uiNewBitmapID,
364 const eC_Value& vWidth,
365 const eC_Value& vHeight);
368 eC_Bool DeInit(
void);
373 const eC_UInt& uiIndex,
const eC_UInt& uiLayerID,
374 const eC_Enum& eBitmapFormat,
375 const eC_UInt& uiWidth,
const eC_UInt& uiHeight,
376 const eC_UInt& ubBufferCount,
379 void MergeLayer(
const eC_UInt& uiScreenIndex);
390 CModifyableBitmap* m_pkModifyableGlyphBitmap;
ImageResource_t
Enumeration of image resource ids.
Definition: GUIImageResource.h:126
The bitmap plane base class.
Definition: GUIBitmapPlane.h:152
ImageType_t
Definition: GUICommonEnums.h:80
Contains information about an image loaded by CGUIImageLoader.
Definition: GUIImageData.h:29
This is the Guiliani base class all controls are derived from.
Definition: GUIObject.h:79
Helper class to supply a platform independent rectangle implementation.
Definition: GUIRect.h:63
The graphics wrapper base class.
Definition: GfxWrap.h:84
RefreshCall_t
Definition: GfxWrap.h:109
This is the eGML implementation of the graphics wrapper.
Definition: GfxWrapeGML.h:33
virtual void DestroyScreen()
Method to clean and release the screen which was created via the CreateScreen Method.
virtual void SetForegroundColorImpl(const eC_UByte &ubRed, const eC_UByte &ubGreen, const eC_UByte &ubBlue, const eC_UByte &ubAlpha=255)
virtual eC_Bool Refresh(const RefreshCall_t eRefreshCallType)
virtual void UnloadImg(const ImageResource_t &eID)
virtual eC_Bool DrawToScreen()
eGML_Bitmap * GetRenderBitmap()
virtual void Rect(const eC_Value &vX1, const eC_Value &vY1, const eC_Value &vX2, const eC_Value &vY2)
virtual void BlitImgExtImpl(const CGUIImageData &kImageData, const eC_Value &vAbsDestX, const eC_Value &vAbsDestY)
eC_Flag GetBlitFlags() const
ScreenConfig_t * m_pkScreens
Screens for eGML.
Definition: GfxWrapeGML.h:264
virtual ~CGfxWrapeGML(void)
eC_Int m_iMainLayerIndex
index of the main-screen
Definition: GfxWrapeGML.h:267
virtual eC_Bool ImageExists(const ImageResource_t eID) const
virtual eC_UInt GetImgHeightImpl(const ImageResource_t &eID) const
virtual eC_UInt GetPhysicalScreenHeight()
eC_Flag m_uiBlitFlags
Flags for blit operation.
Definition: GfxWrapeGML.h:275
virtual void SetOptimizedBlit(const eC_Bool &bOptimizedBlit)
virtual void SetCliprect(const CGUIRect &NewAbsClipRect)
virtual void Line(const eC_Value &vX1, const eC_Value &vY1, const eC_Value &vX2, const eC_Value &vY2)
the following methods are protected to prevent calling them directly
static eC_Bool CreateInstance(CGfxEnv *pkGfxEnv)
virtual eC_UInt GetImgWidthImpl(const ImageResource_t &eID) const
virtual eImg_Bitmap * GetImage(const ImageResource_t &eID)
eC_UInt m_uiNumberOfScreens
number of configured screens
Definition: GfxWrapeGML.h:266
eGML_Screen * GetScreen(void)
CGfxWrapeGML(CGfxEnv *pkGfxEnv)
eGML * m_pkEGML
eGML instance pointer
Definition: GfxWrapeGML.h:262
virtual void SetFilteredBlit(const eC_Bool &bFilteredBlit)
virtual eC_UInt GetVirtualScreenWidth()
virtual eC_Bool SetNOFImagesImpl(const eC_UInt uiNOFImages)
void SetRenderBitmap(eGML_Bitmap *pRenderBitmap)
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)
virtual eC_UInt GetPhysicalScreenWidth()
void SetSubpixelEnabled(const eC_Bool bEnabled)
eC_TArray< eImg_Bitmap * > m_pImage
Array of pointers to eImg bitmaps (includes alpha layer)
Definition: GfxWrapeGML.h:273
virtual eC_UInt GetImageSize(const ImageResource_t &eID) const
eC_Bool m_bSubpixelEnabled
while subpixel rendering is enabled, blitting will be done with subpixel-accuracy (Resulting in a tim...
Definition: GfxWrapeGML.h:270
virtual eC_Value SetLineWidth(const eC_Value &vWidth)
virtual void BlitMemoryImpl(void *pkMemory, 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))
virtual void CreateScreen()
virtual void FilledRect(const eC_Value &vX1, const eC_Value &vY1, const eC_Value &vX2, const eC_Value &vY2)
virtual void InitMainLayer()
virtual void Ring(const eC_Value &vX1, const eC_Value &vY1, const eC_Value &vX2, const eC_Value &vY2, const eC_Value &vRingWidth, const eC_Value &vStartAngle, const eC_Value &vEndAngle, const eC_Value &vRotationAngle, const eC_Bool &bFilled)
virtual void LoadImgImpl(const eC_String &psPath, const ImageResource_t &eID)
eGML_Bitmap * m_pkRenderBitmap
Target bitmap for render operations in eGML.
Definition: GfxWrapeGML.h:263
void SetBlitFlags(eC_Flag uiFlags)
virtual void Ellipse(const eC_Value &vAbsX1, const eC_Value &vAbsY1, const eC_Value &vAbsX2, const eC_Value &vAbsY2, const eC_Bool &bFilled)
virtual void LoadImgImpl(void *pkMemory, const eC_UInt &uiWidth, const eC_UInt &uiHeight, const eC_UInt &eImageType, const ImageResource_t &eID)
virtual void BlitImgExtImpl(const ImageResource_t &eID, const eC_UInt &uiSrcX, const eC_UInt &uiSrcY, const eC_UInt &uiSrcWidth, const eC_UInt &uiSrcHeight, const eC_Value &vDestX, const eC_Value &vDestY, 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))
void SetTargetLayer(const eC_UInt &uiLayerID)
virtual eC_UInt GetVirtualScreenHeight()
Definition: GfxWrapeGML.h:256
eC_UInt uiID
id of screen
Definition: GfxWrapeGML.h:257
eC_UInt uiScreenCount
number of screens
Definition: GfxWrapeGML.h:258
eGML_Screen * pkScreen
pointer to screens
Definition: GfxWrapeGML.h:259