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);
116 const eC_UInt& uiCount,
117 const eC_Bool& bFilled);
186 const eC_UInt& uiWidth,
187 const eC_UInt& uiHeight,
188 const eC_UInt& eImageType,
198 const eC_UInt &uiSrcX,
const eC_UInt &uiSrcY,
199 const eC_UInt &uiSrcWidth,
const eC_UInt &uiSrcHeight,
200 const eC_Value& vDestX,
const eC_Value& vDestY,
201 const eC_Value& vDestWidth,
const eC_Value& vDestHeight,
202 const eC_UByte &ubAlpha = 255,
203 const eC_Value& vAngle = eC_FromFloat(0),
204 const eC_Value& vRotCenterX = eC_FromFloat(0.5),
const eC_Value& vRotCenterY = eC_FromFloat(0.5));
260 class CModifyableBitmap :
public eGML_Bitmap
263 CModifyableBitmap(eC_UInt uiWidth, eC_UInt uiHeight, eC_UByte ubBitmapBufferType) :
264 eGML_Bitmap(uiWidth, uiHeight, ubBitmapBufferType)
279 void SetNewBitmapData(eC_UInt eFormat, eC_UInt uiWidth, eC_UInt uiHeight, eC_UByte ubBitmapBufferType,
void *pBitmapBuffer)
283 m_uiHeight = uiHeight;
284 m_ubBBT = ubBitmapBufferType;
285 m_pkData = pBitmapBuffer;
290 case eGML::BM_ALPHA1:
291 m_uiPitch = (uiWidth + 7) & ~0x07;
293 case eGML::BM_ALPHA8:
296 case eGML::BM_RGB565:
297 case eGML::BM_RGB555:
298 m_uiPitch = uiWidth * 2;
301 case eGML::BM_ARGB32:
302 m_uiPitch = uiWidth * 4;
305 GUILOG(GUI_TRACE_ERROR,
"Unknown bitmap format. Failed to determine pitch.\n");
310 virtual void * Lock()
316 virtual void Unlock(eC_UInt uiX1 = 0, eC_UInt uiY1 = 0, eC_UInt uiX2 = 0, eC_UInt uiY2 = 0)
321 virtual void DrawLine(
const eGML_Vector2 &kStart,
const eGML_Vector2 &kEnd, eGML_Color kColor, eC_Flag ulFlags, eC_Value vStartWidth, eC_Value vEndWidth = 0)
326 virtual void DrawPolygon(
const eGML_Coord2D *pkVertices, eC_UInt uiCount, eGML_Color kColor, eC_Flag ulFlags)
331 virtual void Clear(eGML_Color clColor)
336 virtual void FillRect(eC_UInt uiWidth, eC_UInt uiHeight, eC_Int iX1, eC_Int iY1, eGML_Color clColor, eC_Flag ulFlags = 0)
344 GUIBitmapPlaneID_t uiNewBitmapID,
346 const eC_Value& vWidth,
347 const eC_Value& vHeight);
350 eC_Bool DeInit(
void);
355 const eC_UInt& uiIndex,
const eC_UInt& uiLayerID,
356 const eC_Enum& eBitmapFormat,
357 const eC_UInt& uiWidth,
const eC_UInt& uiHeight,
358 const eC_UInt& ubBufferCount,
361 void MergeLayer(
const eC_UInt& uiScreenIndex);
372 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:81
Helper class to supply a platform independent rectangle implementation.
Definition: GUIRect.h:63
The graphics wrapper base class.
Definition: GfxWrap.h:88
RefreshCall_t
Definition: GfxWrap.h:113
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:246
virtual ~CGfxWrapeGML(void)
eC_Int m_iMainLayerIndex
index of the main-screen
Definition: GfxWrapeGML.h:249
virtual void Polygon(eC_Value *pvPoints, const eC_UInt &uiCount, const eC_Bool &bFilled)
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:257
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:248
eGML_Screen * GetScreen(void)
CGfxWrapeGML(CGfxEnv *pkGfxEnv)
eGML * m_pkEGML
eGML instance pointer
Definition: GfxWrapeGML.h:244
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:255
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:252
virtual eC_Value SetLineWidth(const eC_Value &vWidth)
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:245
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:238
eC_UInt uiID
id of screen
Definition: GfxWrapeGML.h:239
eC_UInt uiScreenCount
number of screens
Definition: GfxWrapeGML.h:240
eGML_Screen * pkScreen
pointer to screens
Definition: GfxWrapeGML.h:241