10#ifndef GfxWrapDAVEHD__H_
11#define GfxWrapDAVEHD__H_
15#include "GUIImageLoader.h"
16#include "GUIImageDataDAVE.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);
108 const eC_UInt &uiSrcX,
const eC_UInt &uiSrcY,
const eC_UInt &uiSrcWidth,
const eC_UInt &uiSrcHeight,
109 const eC_Value& vDestX,
const eC_Value& vDestY,
const eC_Value& vDestWidth,
const eC_Value& vDestHeight,
110 const eC_UByte &ubAlpha = 255,
111 const eC_Value& vAngle = eC_FromFloat(0),
112 const eC_Value& vRotCenterX = eC_FromFloat(0.5),
const eC_Value& vRotCenterY = eC_FromFloat(0.5));
131 const eC_UInt &uiSrcX,
const eC_UInt &uiSrcY,
132 const eC_UInt &uiSrcWidth,
const eC_UInt &uiSrcHeight,
133 const eC_Value& vDestX,
const eC_Value& vDestY,
134 const eC_Value& vDestWidth,
const eC_Value& vDestHeight,
135 const eC_UByte &ubAlpha = 255,
136 const eC_Value& vAngle = eC_FromFloat(0),
137 const eC_Value& vRotCenterX = eC_FromFloat(0.5),
const eC_Value& vRotCenterY = eC_FromFloat(0.5));
160 const eC_UInt& uiGlyphWidth,
161 const eC_UInt& uiGlyphHeight,
162 eC_UByte* pkGlyphBitmap);
191 const eC_UInt& uiWidth,
192 const eC_UInt& uiHeight,
193 const eC_UInt& eImageType,
215 virtual eC_Bool
LoadImgDecoder(
const eC_String& kPath,
const eC_UInt& uiImageIndex);
224 GUIBitmapPlaneID_t uiNewBitmapID,
226 const eC_Value& vWidth,
227 const eC_Value& vHeight);
276 eC_Value vXPos, eC_Value vYPos,
277 eC_Value vDestWidth, eC_Value vDestHeight,
278 dhd_prim_data_t* pout);
291 dhd_bool_t SetupLine(
292 dhd_int32_t x1, dhd_int32_t y1,
293 dhd_int32_t x2, dhd_int32_t y2,
294 dhd_uint32_t width, dhd_float32_t blur,
295 dhd_prim_data_t* pout, dhd_edge_data_t* eout);
308 dhd_bool_t SetupTriangle(
309 dhd_fx28_4_t x1, dhd_fx28_4_t y1,
310 dhd_fx28_4_t x2, dhd_fx28_4_t y2,
311 dhd_fx28_4_t x3, dhd_fx28_4_t y3,
312 dhd_prim_data_t* pout, dhd_edge_data_t* eout);
315 dhd_uv_data_t *uv_out,
316 dhd_uint32_t tw, dhd_uint32_t th,
317 dhd_int32_t srcx, dhd_int32_t srcy,
318 dhd_int32_t srcw, dhd_int32_t srch,
319 dhd_int32_t dstx, dhd_int32_t dsty,
320 dhd_uint32_t dstw, dhd_uint32_t dsth);
323 eC_Value centerx, eC_Value centery,
324 eC_UInt srcw, eC_UInt srch,
325 eC_Value dstx, eC_Value dsty,
326 eC_Value dstw, eC_Value dsth,
328 dhd_prim_data_t* pout,
329 dhd_uv_data_t* uvout);
331 void SetupBlitUVRotated(
332 dhd_int32_t centerx, dhd_int32_t centery,
333 dhd_int32_t width, dhd_int32_t height,
334 dhd_float32_t vAngle,
335 dhd_prim_data_t* pout,
336 dhd_uv_data_t* uvout);
338 void PolyLine(eC_Value* pvPoints,
const eC_UInt& uiPointCount);
345 eC_UInt m_uiNumberOfScreens;
348 dhd_enum_t m_eScreenFormat;
351 dhd_device_t m_kDeviceContext;
354 dhd_handle_t m_pkHandle;
357 dhd_buffer_t m_pkFramebuffer[2];
360 eC_TArray<CGUIImageDataDAVE*> m_pkImages;
362#ifdef DAVEHD_USE_SOFTDAVE
364 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
Definition: GUIImageDataDAVE.h:21
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
D/AVE implementation of the graphics wrapper.
Definition: GfxWrapDaveHD.h:57
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:156
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_Bool LoadImgRAW(eC_File *pkImageFile, CGUIImageDataDAVE &kImageData)
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 eC_UInt GetImageSize(const ImageResource_t &eID) const
Definition: GfxWrapDaveHD.h:143
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_UInt GetPhysicalScreenHeight()
virtual eC_Bool LoadImgRLE(eC_File *pkImageFile, CGUIImageDataDAVE &kImageData)
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:84
RefreshCall_t
Definition: GfxWrap.h:109
config for screen
Definition: GfxWrapDaveHD.h:258
eC_UInt uiID
id of screen
Definition: GfxWrapDaveHD.h:259
CDAVEHDScreen * pkScreen
pointer to screens
Definition: GfxWrapDaveHD.h:260