10#ifndef GfxWrapDAVEHD__H_
11#define GfxWrapDAVEHD__H_
15#include "GUIImageLoader.h"
16#include "GUIImageData.h"
18#include "DAVEHDScreen.h"
20#include "GUILayerConfig.h"
25#include "davehd_kernel_driver.h"
26#include "davehd_kernel_bridge.h"
27#include "davehd_driver.h"
28#ifdef DAVEHD_USE_SOFTDAVE
31#include "davehd_util.h"
36#define DAVEHD_FIX_FROM_EC(x) (dhd_fx28_4_t)(eC_ToInt(eC_Mul(x, eC_FromInt(16))))
73 virtual void SetForegroundColorImpl(
const eC_UByte &ubRed,
const eC_UByte &ubGreen,
const eC_UByte &ubBlue,
const eC_UByte &ubAlpha = 255);
74 virtual void Line(
const eC_Value& vX1,
const eC_Value& vY1,
const eC_Value& vX2,
const eC_Value& vY2);
75 virtual void Rect(
const eC_Value& vX1,
const eC_Value& vY1,
const eC_Value& vX2,
const eC_Value& vY2);
76 virtual void FilledRect(
const eC_Value& vX1,
const eC_Value& vY1,
const eC_Value& vX2,
const eC_Value& vY2);
79 const eC_Value& vX1,
const eC_Value& vY1,
80 const eC_Value& vX2,
const eC_Value& vY2,
81 const eC_Bool &bFilled =
true);
88 const eC_Value& vStartAngle,
89 const eC_Value& vEndAngle,
90 const eC_Value& vRotationAngle,
91 const eC_Bool &bFilled);
98 const eC_Value& vRingWidth,
99 const eC_Value& vStartAngle,
100 const eC_Value& vEndAngle,
101 const eC_Value& vRotationAngle,
102 const eC_Bool & bFilled);
106 const eC_UInt& uiCount,
107 const eC_Bool& bFilled);
113 const eC_UInt &uiSrcX,
const eC_UInt &uiSrcY,
const eC_UInt &uiSrcWidth,
const eC_UInt &uiSrcHeight,
114 const eC_Value& vDestX,
const eC_Value& vDestY,
const eC_Value& vDestWidth,
const eC_Value& vDestHeight,
115 const eC_UByte &ubAlpha = 255,
116 const eC_Value& vAngle = eC_FromFloat(0),
117 const eC_Value& vRotCenterX = eC_FromFloat(0.5),
const eC_Value& vRotCenterY = eC_FromFloat(0.5));
136 const eC_UInt &uiSrcX,
const eC_UInt &uiSrcY,
137 const eC_UInt &uiSrcWidth,
const eC_UInt &uiSrcHeight,
138 const eC_Value& vDestX,
const eC_Value& vDestY,
139 const eC_Value& vDestWidth,
const eC_Value& vDestHeight,
140 const eC_UByte &ubAlpha = 255,
141 const eC_Value& vAngle = eC_FromFloat(0),
142 const eC_Value& vRotCenterX = eC_FromFloat(0.5),
const eC_Value& vRotCenterY = eC_FromFloat(0.5));
165 const eC_UInt& uiGlyphWidth,
166 const eC_UInt& uiGlyphHeight,
167 eC_UByte* pkGlyphBitmap);
196 const eC_UInt& uiWidth,
197 const eC_UInt& uiHeight,
198 const eC_UInt& eImageType,
220 virtual eC_Bool
LoadImgDecoder(
const eC_String& kPath,
const eC_UInt& uiImageIndex);
229 GUIBitmapPlaneID_t uiNewBitmapID,
231 const eC_Value& vWidth,
232 const eC_Value& vHeight);
281 eC_Value vXPos, eC_Value vYPos,
282 eC_Value vDestWidth, eC_Value vDestHeight,
283 dhd_prim_data_t* pout);
296 dhd_bool_t SetupLine(
297 dhd_int32_t x1, dhd_int32_t y1,
298 dhd_int32_t x2, dhd_int32_t y2,
299 dhd_uint32_t width, dhd_float32_t blur,
300 dhd_prim_data_t* pout, dhd_edge_data_t* eout);
313 dhd_bool_t SetupTriangle(
314 dhd_fx28_4_t x1, dhd_fx28_4_t y1,
315 dhd_fx28_4_t x2, dhd_fx28_4_t y2,
316 dhd_fx28_4_t x3, dhd_fx28_4_t y3,
317 dhd_prim_data_t* pout, dhd_edge_data_t* eout);
320 dhd_uv_data_t *uv_out,
321 dhd_uint32_t tw, dhd_uint32_t th,
322 dhd_int32_t srcx, dhd_int32_t srcy,
323 dhd_int32_t srcw, dhd_int32_t srch,
324 dhd_int32_t dstx, dhd_int32_t dsty,
325 dhd_uint32_t dstw, dhd_uint32_t dsth);
328 eC_Value centerx, eC_Value centery,
329 eC_UInt srcw, eC_UInt srch,
330 eC_Value dstx, eC_Value dsty,
331 eC_Value dstw, eC_Value dsth,
333 dhd_prim_data_t* pout,
334 dhd_uv_data_t* uvout);
336 void SetupBlitUVRotated(
337 dhd_int32_t centerx, dhd_int32_t centery,
338 dhd_int32_t width, dhd_int32_t height,
339 dhd_float32_t vAngle,
340 dhd_prim_data_t* pout,
341 dhd_uv_data_t* uvout);
343 void PolyLine(eC_Value* pvPoints,
const eC_UInt& uiPointCount);
350 eC_UInt m_uiNumberOfScreens;
353 dhd_enum_t m_eScreenFormat;
356 dhd_device_t m_kDeviceContext;
359 dhd_handle_t m_pkHandle;
362 dhd_buffer_t m_pkFramebuffer[2];
365 eC_TArray<CGUIImageData*> m_pkImages;
367#ifdef DAVEHD_USE_SOFTDAVE
369 sd_handle_t m_pkSDHandle;
ImageResource_t
Enumeration of image resource ids.
Definition: GUIImageResource.h:126
Definition: DAVEHDScreen.h:28
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
D/AVE implementation of the graphics wrapper.
Definition: GfxWrapDaveHD.h:57
virtual eC_Bool LoadImgRLE(eC_File *pkImageFile, CGUIImageData &kImageData)
virtual void FilledRect(const eC_Value &vX1, const eC_Value &vY1, const eC_Value &vX2, const eC_Value &vY2)
virtual eC_Bool SupportCompressedFonts() const
Definition: GfxWrapDaveHD.h:161
virtual void CreateScreen()
virtual void LoadImgImpl(const eC_String &kPath, const ImageResource_t &eID)
eC_Bool SetNOFImagesImpl(const eC_UInt uiNOFImages)
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))
virtual void SetCliprect(const CGUIRect &NewClipRect)
static eC_Bool CreateInstance(CGfxEnv *pkGfxEnv)
virtual eC_UInt GetVirtualScreenHeight()
virtual void StartRedrawGUI()
virtual void DestroyScreen()
Method to clean and release the screen which was created via the CreateScreen Method.
virtual void RefreshImage(const ImageResource_t &eImageID, void *pkMemory)
dhd_handle_t GetDaveDevice()
virtual void Ellipse(const eC_Value &vX1, const eC_Value &vY1, const eC_Value &vX2, const eC_Value &vY2, const eC_Bool &bFilled=true)
virtual eC_UInt GetImgWidthImpl(const ImageResource_t &eID) const
static dhd_enum_t GetTexelFormat(const CGUICommonEnums::ImageType_t &ePixFormat)
virtual eC_UInt GetPhysicalScreenWidth()
virtual ~CGfxWrapDAVEHD(void)
Destructor.
virtual CGUIBitmapPlane * CreateGfxDependentBitmap(GUIBitmapPlaneID_t uiNewBitmapID, const CGUIObject &rkParentObject, const eC_Value &vWidth, const eC_Value &vHeight)
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 eC_UInt GetImgHeightImpl(const ImageResource_t &eID) const
virtual eC_Bool LoadImgDecoder(const eC_String &kPath, const eC_UInt &uiImageIndex)
virtual void LoadImgImpl(void *pkMemory, const eC_UInt &uiWidth, const eC_UInt &uiHeight, const eC_UInt &eImageType, const ImageResource_t &eID)
virtual void Polygon(eC_Value *pvPoints, const eC_UInt &uiCount, const eC_Bool &bFilled)
virtual eC_UInt GetImageSize(const ImageResource_t &eID) const
Definition: GfxWrapDaveHD.h:148
virtual void SetTargetLayer(const eC_UInt &uiLayerID)
virtual void LoadGlyphData(CGUIImageData *pkImageData, const eC_UInt &uiGlyphWidth, const eC_UInt &uiGlyphHeight, eC_UByte *pkGlyphBitmap)
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 GetVirtualScreenWidth()
void BlitImgExtImpl(const CGUIImageData &kImageData, 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))
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
virtual eC_Bool ImageExists(const ImageResource_t eID) const
static dhd_enum_t GetPixelFormat(const CGUICommonEnums::ImageType_t &ePixFormat)
virtual eC_Bool DrawToBitmap(GUIBitmapPlaneID_t uiBitmapID)
virtual eC_Bool DrawToScreen()
virtual eC_Bool LoadImgRAW(eC_File *pkImageFile, CGUIImageData &kImageData)
virtual eC_UInt GetPhysicalScreenHeight()
virtual eC_Bool Refresh(const RefreshCall_t eRefreshCallType)
CGfxWrapDAVEHD(CGfxEnv *pkGfxEnv=NULL)
virtual void UnloadImg(const ImageResource_t &eID)
virtual void Rect(const eC_Value &vX1, const eC_Value &vY1, const eC_Value &vX2, const eC_Value &vY2)
virtual void UnloadGlyphData(CGUIImageData *pkImageData)
virtual void BlitImgExtImpl(const CGUIImageData &kImageData, const eC_Value &vAbsDestX, const eC_Value &vAbsDestY)
virtual void SetForegroundColorImpl(const eC_UByte &ubRed, const eC_UByte &ubGreen, const eC_UByte &ubBlue, const eC_UByte &ubAlpha=255)
The graphics wrapper base class.
Definition: GfxWrap.h:88
RefreshCall_t
Definition: GfxWrap.h:113
config for screen
Definition: GfxWrapDaveHD.h:263
eC_UInt uiID
id of screen
Definition: GfxWrapDaveHD.h:264
CDAVEHDScreen * pkScreen
pointer to screens
Definition: GfxWrapDaveHD.h:265