CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
FxUIPainter.h
Go to the documentation of this file.
1//
2// (C) Copyright 2005-2025 by Graebert GmbH.
3//
4// Permission to use, copy, modify, and distribute this software in
5// object code form for any purpose and without fee is hereby granted,
6// provided that the above copyright notice appears in all copies and
7// that both that copyright notice and the limited warranty and
8// restricted rights notice below appear in all supporting
9// documentation.
10//
11// GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12// GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15// UNINTERRUPTED OR ERROR FREE.
16
17#pragma once
18
22
24#include "FxUIBrush.h"
25#include "FxUIColor.h"
26#include "FxUIRect.h"
27#include "FxUIPainterPath.h"
28#include "FxUIPaintDevice.h"
29#include "FxUIGlobalDefines.h"
30
31#if defined( XENON )
32namespace Wt
33{
34 class WPainter;
35}
36
37using FxNativePainter = Wt::WPainter;
38#else
39class QPainter;
40class QPaintDevice;
41using FxNativePainter = QPainter;
42#endif
43
44class CFxUIPainterImpl;
45class CFxUIPixmap;
46class CFxUIImage;
47class CFxUIPolygonF;
48class CFxUIFont;
49
51{
52public:
61
67
68public:
69
72
75
78
79 operator FxNativePainter*() const;
80
86 void begin( CFxUIPaintDevice* paintDevice );
87
91 void end();
92
104 void drawEllipse( int x, int y, int width, int height );
105
115 void drawPixmap( int x, int y, const CFxUIPixmap& pixmap );
116
124 void drawPolygon( const CFxUIPolygonF& points, FillRule fillRule = OddEvenFill );
125
137 void drawRect( int x, int y, int width, int height );
138
148 void drawText( int x, int y, const CFxUIString& text );
149
161 void drawText( const CFxUIRect& rectangle, int flags, const CFxUIString& text, CFxUIRect* boundingRect = nullptr );
162
176 void drawPixmap( int x, int y, int w, int h, const CFxUIPixmap& pm );
177
191 void fillRect( int x, int y, int widht, int height, const CFxUIColor& color );
192
200 void fillPath( const CFxUIPainterPath& path, const CFxUIBrush& brush );
201
205 void restore();
206
210 void save();
211
217 void setBrush( const CFxUIColor& color );
218
224 void setFont( CFxUIFont& font );
225
231 void setPen( const CFxUIColor& color );
232
240 void setRenderHint( RenderHint hint, bool on = true );
241
242protected:
243 CFxUIPainterImpl* m_pImpl = nullptr;
244};
#define COMMONUI_API
CFxString CFxUIString
QPainter FxNativePainter
Definition FxUIPainter.h:41
void drawRect(int x, int y, int width, int height)
void begin(CFxUIPaintDevice *paintDevice)
void restore()
void drawPixmap(int x, int y, int w, int h, const CFxUIPixmap &pm)
@ LosslessImageRendering
Definition FxUIPainter.h:59
@ SmoothPixmapTransform
Definition FxUIPainter.h:57
@ Qt4CompatiblePainting
Definition FxUIPainter.h:58
void setRenderHint(RenderHint hint, bool on=true)
void drawPolygon(const CFxUIPolygonF &points, FillRule fillRule=OddEvenFill)
void setBrush(const CFxUIColor &color)
void drawText(const CFxUIRect &rectangle, int flags, const CFxUIString &text, CFxUIRect *boundingRect=nullptr)
CFxUIPainterImpl * m_pImpl
void fillRect(int x, int y, int widht, int height, const CFxUIColor &color)
void setPen(const CFxUIColor &color)
void drawText(int x, int y, const CFxUIString &text)
void fillPath(const CFxUIPainterPath &path, const CFxUIBrush &brush)
void setFont(CFxUIFont &font)
void drawEllipse(int x, int y, int width, int height)
CFxUIPainter(CFxUIPaintDevice *paintDevice)
void drawPixmap(int x, int y, const CFxUIPixmap &pixmap)
GLfloat GLfloat GLfloat GLfloat w
Definition gles2_ext.h:320
GLint GLenum GLsizei width
Definition gles2_ext.h:110
GLfloat x
Definition gles2_ext.h:314
GLint GLenum GLsizei GLsizei height
Definition gles2_ext.h:110
GLfloat GLfloat y
Definition gles2_ext.h:316
Definition FxString.h:30