11 #define PI 3.1415926535897932384626433832795
15 #include <adtf_base.h>
22 #include <fontconfig/fontconfig.h>
53 class cGLCanvas :
public ucom::catwo::object<ICanvas>
64 tBool bTextOppsedYAxis;
67 tBool bTextBaselineOnTop;
77 virtual ~cGLCanvas() final;
85 tResult Create(tInt nWidth, tInt nHeight, tInt nBitsPerPixel) override;
92 tResult Resize(tInt nWidth, tInt nHeight);
113 tVoid NormalizeRect(tInt& x1, tInt& y1, tInt& x2, tInt& y2) const;
124 tVoid NormalizeRect(tFloat32& x1, tFloat32& y1, tFloat32& x2, tFloat32& y2) const;
134 tVoid Coord(tFloat32* pXCoords, tFloat32* pYCoords, tInt nCount);
136 virtual tVoid FlipTextHorizontally(tBool bOpposedYAxis);
138 virtual tVoid TextScaleWithZoom(tBool bScaleWithZoom);
142 tBool IsSupported(tFeature nFeatureId) const override;
144 tVoid EnableAlpha(tBool bAdditiveMode = tFalse) const override;
146 tVoid DisableAlpha() const override;
148 tVoid EnableAntialiasing() const override;
150 tVoid DisableAntialiasing() const override;
152 tVoid EnableLighting() const override;
154 tVoid DisableLighting() const override;
156 tVoid EnableDepthBuffer() const override;
158 tVoid DisableDepthBuffer() const override;
160 tVoid EnableBackFaceCulling() const override;
162 tVoid DisableBackFaceCulling() const override;
164 tVoid LineWidth(tFloat64 fWidth) override;
166 tVoid LinePattern(tUInt16 ui16Pattern, tInt nFactor = 1) override;
168 tVoid Color(const IColor* col) override;
170 tVoid Color(tInt nRed, tInt nGreen, tInt nBlue, tInt nAlpha = 255) override;
172 tVoid Color(tUInt8 nRed, tUInt8 nGreen, tUInt8 nBlue, tUInt8 nAlpha = 255) override;
174 tVoid Color(tFloat64 fRed, tFloat64 fGreen, tFloat64 fBlue, tFloat64 fAlpha = 1.0) override;
176 tVoid BgColor(const IColor* col) override;
178 tVoid BgColor(tInt nRed, tInt nGreen, tInt nBlue, tInt nAlpha = 255) override;
180 tVoid BgColor(tUInt8 nRed, tUInt8 nGreen, tUInt8 nBlue, tUInt8 nAlpha = 255) override;
182 tVoid BgColor(tFloat64 fRed, tFloat64 fGreen, tFloat64 fBlue, tFloat64 fAlpha = 0.0) override;
184 tVoid Begin(tMode eMode) override;
186 tVoid Coord(tInt x, tInt y) override;
188 tVoid Coord(tFloat32 x, tFloat32 y) override;
190 tVoid Coord(IPoint* pt) override;
192 tVoid Coord(IPoint** ppPoints, tInt nCount) override;
194 tVoid CoordTexture(tFloat32 u, tFloat32 v) override;
196 tVoid End() override;
199 tInt GetWidth() const override;
201 tInt GetHeight() const override;
203 tInt GetBitsPerPixel() const override;
205 tVoid SetMapping(tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2) override;
207 tVoid ClearMapping() override;
209 tInt MapPixelX(tFloat32 x) override;
211 tInt MapPixelY(tFloat32 y) override;
213 tInt MapPixelX(tInt x) override;
215 tInt MapPixelY(tInt y) override;
217 tFloat32 UnmapPixelX(tInt x) override;
219 tFloat32 UnmapPixelY(tInt y) override;
221 tVoid Clear() override;
223 tResult CreateTexture(IImage* pImage, ITexture*& pTexture) override;
225 tVoid DrawTexture(ITexture* pTexture, tFloat32 vPoints[8]) override;
227 tVoid DrawPixel(tInt x, tInt y) override;
229 tVoid DrawLine(tInt x1, tInt y1, tInt x2, tInt y2) override;
231 tVoid DrawRect(tInt x1, tInt y1, tInt x2, tInt y2) override;
233 tVoid DrawCircle(tInt x1, tInt y1, tInt x2, tInt y2) override;
235 tVoid DrawCircleSegment(tInt x1, tInt y1, tInt x2, tInt y2, tFloat64 fDegreeStart, tFloat64 fDegreeEnd,
236 tBool bNormalizeRect = tFalse) override;
238 tVoid FillRect(tInt x1, tInt y1, tInt x2, tInt y2) override;
240 tVoid FillCircle(tInt x1, tInt y1, tInt x2, tInt y2) override;
242 tVoid FillCircleSegment(tInt x1, tInt y1, tInt x2, tInt y2, tFloat64 fDegreeStart, tFloat64 fDegreeEnd,
243 tBool bNormalizeRect = tFalse) override;
245 tVoid DrawPixel(tFloat32 x, tFloat32 y) override;
247 tVoid DrawLine(tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2) override;
249 tVoid DrawRect(tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2) override;
251 tVoid DrawCircle(tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2) override;
253 tVoid DrawCircleSegment(tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2, tFloat64 fDegreeStart, tFloat64 fDegreeEnd,
254 tBool bNormalizeRect = tFalse) override;
256 tVoid FillRect(tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2) override;
258 tVoid FillCircle(tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2) override;
260 tVoid FillCircleSegment(tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2, tFloat64 fDegreeStart, tFloat64 fDegreeEnd,
261 tBool bNormalizeRect = tFalse) override;
263 tVoid DrawPixel(IPoint* pt) override;
265 tVoid DrawLine(IPoint* ptStart, IPoint* ptEnd) override;
267 tVoid DrawRect(IRect* rect) override;
269 tVoid DrawPolygon(IPoint** ppPoints, tInt nCount) override;
271 tVoid DrawCircle(IRect* rect) override;
273 tVoid DrawCircleSegment(IRect* rect, tFloat64 fDegreeStart, tFloat64 fDegreeEnd) override;
275 tVoid FillRect(IRect* rect) override;
277 tVoid FillPolygon(IPoint** ppPoints, tInt nCount) override;
279 tVoid FillCircle(IRect* rect) override;
281 tVoid FillCircleSegment(IRect* rect, tFloat64 fDegreeStart, tFloat64 fDegreeEnd) override;
283 IFont* CreateFont(const
char* strName, tInt nHeight,
284 IFont::tStyle eFontStyle = IFont::STYLE_Default);
286 tVoid SetFontAngle(tFloat64 fAngle);
288 tFloat64 GetFontAngle();
290 tVoid Font(IFont* pFont);
292 tVoid OutputText(tInt x, tInt y, const
char* fmt, ...);
294 tVoid OutputText(tFloat32 x, tFloat32 y, const
char* fmt, ...);
296 ITexture* CreateTexture(const
tBitmapFormat* psFormat, tInt nMode = 0) override;
298 tVoid Texture(ITexture* pTexture) override;
300 tVoid Blit(ITexture* pTexture, tInt x, tInt y, tInt nWidth, tInt nHeight) override;
302 tVoid Blit(IImage* pImage, tInt x, tInt y, tInt nWidth, tInt nHeight) override;
304 tVoid Capture(IImage** ppImage, tInt x, tInt y, tInt nWidth, tInt nHeight) override;
306 IScene* BeginScene() override;
308 tVoid EndScene() override;
310 tVoid SetFlag(tUInt32 nFlag, tInt32 nValue);
312 tInt32 GetFlag(tUInt32 nFlag);
320 tVoid DrawEllipse(tInt iOriginX, tInt iOriginY, tInt iWidth, tInt iHeight, tInt iAngle);
322 tVoid DrawEllipse(tFloat32 f32OriginX, tFloat32 f32OriginY, tFloat32 f32Width, tFloat32 f32Height, tFloat32 f32Angle);
324 tVoid FillEllipse(tInt iOriginX, tInt iOriginY, tInt iWidth, tInt iHeight, tInt iAngle);
326 tVoid FillEllipse(tFloat32 f32OriginX, tFloat32 f32OriginY, tFloat32 f32Width, tFloat32 f32Height, tFloat32 f32Angle);
332 tVoid Translate(tFloat fx, tFloat fy, tFloat fz) ;
334 tVoid Scale(tFloat fx, tFloat fy, tFloat fz);
336 tVoid Rotate(tFloat fangle, tFloat fx, tFloat fy, tFloat fz);
347 tVoid CoordLine(tInt x1, tInt y1, tInt x2, tInt y2) const;
356 tVoid CoordRect(tInt x1, tInt y1, tInt x2, tInt y2) const;
365 tVoid CoordCircle(tInt x1, tInt y1, tInt x2, tInt y2) const;
376 tVoid CoordCircleSegment(tInt x1, tInt y1, tInt x2, tInt y2, tFloat64 fDegreeStart, tFloat64 fDegreeEnd) const;
385 tVoid CoordLine(tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2) const;
394 tVoid CoordRect(tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2) const;
403 tVoid CoordCircle(tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2) const;
414 tVoid CoordCircleSegment(tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2, tFloat64 fDegreeStart,
415 tFloat64 fDegreeEnd) const;
420 tVoid SwitchToScreenCoords();
426 using dengar::cGLCanvas;
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.