Guiliani  Version 2.6 revision 7293 (documentation build 12)
GfxWrapDirectFb.h
1/*
2* Copyright (C) TES Electronic Solutions GmbH,
3* All Rights Reserved.
4* Contact: info@guiliani.de
5*
6* This file is part of the Guiliani HMI framework
7* for the development of graphical user interfaces on embedded systems.
8*/
9
10#ifndef GFXWRAPDIRECTFB__H_
11#define GFXWRAPDIRECTFB__H_
12
13#include "GfxWrap.h"
14#include <directfb.h>
16
24// @guiliani_doxygen limitations CGfxWrapDirectFb
35// @endguiliani_doxygen
37{
38public:
41 {
44 BPP_FORMAT32 = 32
45 };
53 static void CreateInstance(
54 const eC_UInt &uiWidth,
55 const eC_UInt &uiHeight,
56 const eC_Bool bUsePageFlip,
57 const BppFormat_t eBpp);
58
61
62 eC_Bool Refresh(const RefreshCall_t eRefreshCallType);
63
68 void CreateScreen(const eC_UInt &uiWidth, const eC_UInt &uiHeight);
69
71 {
73 }
75 {
77 }
78
79 inline void Line(
80 const eC_Value &vAbsX1, const eC_Value &vAbsY1,
81 const eC_Value &vAbsX2, const eC_Value &vAbsY2);
82
83 inline void Rect(
84 const eC_Value &vAbsX1, const eC_Value &vAbsY1,
85 const eC_Value &vAbsX2, const eC_Value &vAbsY2);
86
87 inline void FilledRect(
88 const eC_Value &vAbsX1, const eC_Value &vAbsY1,
89 const eC_Value &vAbsX2, const eC_Value &vAbsY2);
90
91 inline void Ellipse(
92 const eC_Value &vAbsX1, const eC_Value &vAbsY1,
93 const eC_Value &vAbsX2, const eC_Value &vAbsY2,
94 const eC_Bool &bFilled) {}
95
96 inline void Arc(
97 const eC_Value &vX1, const eC_Value &vY1,
98 const eC_Value &vX2, const eC_Value &vY2,
99 const eC_Value& vStartAngle, const eC_Value& vEndAngle,
100 const eC_Value& vRotationAngle,
101 const eC_Bool &bFilled) {}
102
104 const eC_UByte &ubRed,
105 const eC_UByte &ubGreen,
106 const eC_UByte &ubBlue,
107 const eC_UByte &ubAlpha = 255);
108
109
110 inline eC_UInt GetImgWidthImpl(const ImageResource_t &eID) const;
111
112 inline eC_UInt GetImgHeightImpl(const ImageResource_t &eID) const;
113
114 inline eC_UInt GetImageSize(const ImageResource_t &eID) const;
115
117 const ImageResource_t &eID,
118 const eC_UInt &uiAbsSrcX, const eC_UInt &uiAbsSrcY,
119 const eC_UInt &uiSrcWidth, const eC_UInt &uiSrcHeight,
120 const eC_Value &vAbsDestX, const eC_Value &vAbsDestY,
121 const eC_Value &vDestWidth, const eC_Value &vDestHeight,
122 const eC_UByte &ubAlpha = 255,
123 const eC_Value &vAngle = eC_FromFloat(0),
124 const eC_Value &vRotCenterX = eC_FromFloat(0.5), const eC_Value &vRotCenterY = eC_FromFloat(0.5));
125
126 void LoadImgImpl(const eC_String& kPath, const ImageResource_t &eID);
127
135 virtual void LoadImgImpl(
136 void* pkMemory,
137 const eC_UInt& uiWidth,
138 const eC_UInt& uiHeight,
139 const CGUICommonEnums::ImageType_t& eImageType,
140 const ImageResource_t &eID);
141
142 eC_Bool ImageExists(const ImageResource_t eID) const;
143
144 virtual eC_UInt GetPhysicalScreenWidth();
145
146 virtual eC_UInt GetPhysicalScreenHeight();
147
148 virtual void SetCliprect(const CGUIRect &NewClipRect);
149
150protected:
151 inline void DestroyScreen() {}
152
153 virtual eC_Bool SetNOFImagesImpl(const eC_UInt uiNOFImages);
154
155 virtual ~CGfxWrapDirectFb();
156
157
158private:
159 class CGUIImageDataDirectFb;
165 CGfxWrapDirectFb(const eC_UInt &uiWidth, const eC_UInt &uiHeight, const eC_Bool bUsePageFlip,
166 const BppFormat_t eBpp);
167
171 CGfxWrapDirectFb(const CGfxWrapDirectFb& kSource);
172
177 CGfxWrapDirectFb& operator=(const CGfxWrapDirectFb& kSource);
178
179 virtual CGUIBitmapPlane* CreateGfxDependentBitmap(
180 GUIBitmapPlaneID_t uiNewBitmapID,
181 const CGUIObject& rkParentObject,
182 const eC_Value &vWidth,
183 const eC_Value &vHeight);
184
186 eC_TArray<CGUIImageDataDirectFb *> m_apSurfaces;
188 IDirectFBDisplayLayer* m_pkDisplayLayer;
190 const eC_Bool m_bUsePageFlip;
192 const DFBSurfaceBlittingFlags m_kStandardFlags;
194 const BppFormat_t m_eBpp;
195};
196#endif
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
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 directfb Graphics-Wrapper class.
Definition: GfxWrapDirectFb.h:37
void SetForegroundColorImpl(const eC_UByte &ubRed, const eC_UByte &ubGreen, const eC_UByte &ubBlue, const eC_UByte &ubAlpha=255)
eC_UInt GetVirtualScreenHeight()
Definition: GfxWrapDirectFb.h:74
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: GfxWrapDirectFb.h:96
eC_UInt GetImgWidthImpl(const ImageResource_t &eID) const
void Rect(const eC_Value &vAbsX1, const eC_Value &vAbsY1, const eC_Value &vAbsX2, const eC_Value &vAbsY2)
void Ellipse(const eC_Value &vAbsX1, const eC_Value &vAbsY1, const eC_Value &vAbsX2, const eC_Value &vAbsY2, const eC_Bool &bFilled)
Definition: GfxWrapDirectFb.h:91
eC_Bool ImageExists(const ImageResource_t eID) const
eC_UInt GetImgHeightImpl(const ImageResource_t &eID) const
void CreateScreen(const eC_UInt &uiWidth, const eC_UInt &uiHeight)
static void CreateInstance(const eC_UInt &uiWidth, const eC_UInt &uiHeight, const eC_Bool bUsePageFlip, const BppFormat_t eBpp)
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
void RestoreBlittingFlags()
Restores blitting flags to standard.
void FilledRect(const eC_Value &vAbsX1, const eC_Value &vAbsY1, const eC_Value &vAbsX2, const eC_Value &vAbsY2)
void DestroyScreen()
Method to clean and release the screen which was created via the CreateScreen Method.
Definition: GfxWrapDirectFb.h:151
void LoadImgImpl(const eC_String &kPath, const ImageResource_t &eID)
virtual void SetCliprect(const CGUIRect &NewClipRect)
eC_Bool Refresh(const RefreshCall_t eRefreshCallType)
eC_UInt GetImageSize(const ImageResource_t &eID) const
eC_UInt GetVirtualScreenWidth()
Definition: GfxWrapDirectFb.h:70
virtual void LoadImgImpl(void *pkMemory, const eC_UInt &uiWidth, const eC_UInt &uiHeight, const CGUICommonEnums::ImageType_t &eImageType, const ImageResource_t &eID)
virtual eC_Bool SetNOFImagesImpl(const eC_UInt uiNOFImages)
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))
virtual eC_UInt GetPhysicalScreenWidth()
virtual eC_UInt GetPhysicalScreenHeight()
BppFormat_t
Bit per pixel formats.
Definition: GfxWrapDirectFb.h:41
@ BPP_FORMAT16
BGRA_444.
Definition: GfxWrapDirectFb.h:42
@ BPP_FORMAT32
BGRA_8888.
Definition: GfxWrapDirectFb.h:44
@ BPP_FORMAT24
BGR_888.
Definition: GfxWrapDirectFb.h:43
The graphics wrapper base class.
Definition: GfxWrap.h:88
RefreshCall_t
Definition: GfxWrap.h:113