CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
CFxUIPainter Class Reference

#include <FxUIPainter.h>

Public Types

enum  RenderHint {
  Antialiasing = 0x01 , TextAntialiasing = 0x02 , SmoothPixmapTransform = 0x04 , Qt4CompatiblePainting = 0x20 ,
  LosslessImageRendering = 0x40
}
 
enum  FillRule { OddEvenFill , WindingFill }
 

Public Member Functions

 CFxUIPainter ()
 
 CFxUIPainter (CFxUIPaintDevice *paintDevice)
 
 ~CFxUIPainter ()
 
 operator FxNativePainter * () const
 
void begin (CFxUIPaintDevice *paintDevice)
 
void end ()
 
void drawEllipse (int x, int y, int width, int height)
 
void drawPixmap (int x, int y, const CFxUIPixmap &pixmap)
 
void drawPolygon (const CFxUIPolygonF &points, FillRule fillRule=OddEvenFill)
 
void drawRect (int x, int y, int width, int height)
 
void drawText (int x, int y, const CFxUIString &text)
 
void drawText (const CFxUIRect &rectangle, int flags, const CFxUIString &text, CFxUIRect *boundingRect=nullptr)
 
void drawPixmap (int x, int y, int w, int h, const CFxUIPixmap &pm)
 
void fillRect (int x, int y, int widht, int height, const CFxUIColor &color)
 
void fillPath (const CFxUIPainterPath &path, const CFxUIBrush &brush)
 
void restore ()
 
void save ()
 
void setBrush (const CFxUIColor &color)
 
void setFont (CFxUIFont &font)
 
void setPen (const CFxUIColor &color)
 
void setRenderHint (RenderHint hint, bool on=true)
 

Protected Attributes

CFxUIPainterImpl * m_pImpl = nullptr
 

Detailed Description

Definition at line 50 of file FxUIPainter.h.

Member Enumeration Documentation

◆ FillRule

Enumerator
OddEvenFill 
WindingFill 

Definition at line 62 of file FxUIPainter.h.

◆ RenderHint

Enumerator
Antialiasing 
TextAntialiasing 
SmoothPixmapTransform 
Qt4CompatiblePainting 
LosslessImageRendering 

Definition at line 53 of file FxUIPainter.h.

Constructor & Destructor Documentation

◆ CFxUIPainter() [1/2]

CFxUIPainter::CFxUIPainter ( )

Constructor

◆ CFxUIPainter() [2/2]

CFxUIPainter::CFxUIPainter ( CFxUIPaintDevice * paintDevice)

Copy Constructor

◆ ~CFxUIPainter()

CFxUIPainter::~CFxUIPainter ( )

Destructor

Member Function Documentation

◆ begin()

void CFxUIPainter::begin ( CFxUIPaintDevice * paintDevice)

Begins painting the paintDevice

Parameters
CFxUIPaintDevice

◆ drawEllipse()

void CFxUIPainter::drawEllipse ( int x,
int y,
int width,
int height )

Draws the ellipse defined by the rectangle beginning at (x, y) with the given width and height.

Parameters
x-coordinate
y-coordinate
width
height

◆ drawPixmap() [1/2]

void CFxUIPainter::drawPixmap ( int x,
int y,
const CFxUIPixmap & pixmap )

Draws the rectangular portion source of the given pixmap into the given target in the paint device.

Parameters
x-coordinate
y-coordinate
CFxUIPixmap

◆ drawPixmap() [2/2]

void CFxUIPainter::drawPixmap ( int x,
int y,
int w,
int h,
const CFxUIPixmap & pm )

Draws the pixmap into the rectangle at position (x, y) with the given width and height.

Parameters
x-coordinate
y-coordinate
width
height
CFxUIPixmap

◆ drawPolygon()

void CFxUIPainter::drawPolygon ( const CFxUIPolygonF & points,
FillRule fillRule = OddEvenFill )

Draws the polygon defined by the first pointCount points in the array points using the current pen and brush.

Parameters
CFxUIPolygonF
CFxUIPainter::FillRule

◆ drawRect()

void CFxUIPainter::drawRect ( int x,
int y,
int width,
int height )

Draws a rectangle with upper left corner at (x, y) and with the given width and height.

Parameters
x-coordinate
y-coordinate
width
height

◆ drawText() [1/2]

void CFxUIPainter::drawText ( const CFxUIRect & rectangle,
int flags,
const CFxUIString & text,
CFxUIRect * boundingRect = nullptr )

Draws the given text within the provided rectangle according to the specified flags.

Parameters
CFxUIRect
flag
textdirection as CFxUIString
CFxUIRect- Bounding Rect

◆ drawText() [2/2]

void CFxUIPainter::drawText ( int x,
int y,
const CFxUIString & text )

Draws the given text at position (x, y), using the painter's currently defined text direction.

Parameters
x-coordinate
y-coordinate
textdirection as CFxUIString

◆ end()

void CFxUIPainter::end ( )

Ends painting.

◆ fillPath()

void CFxUIPainter::fillPath ( const CFxUIPainterPath & path,
const CFxUIBrush & brush )

Fills the given path using the given brush. The outline is not drawn.

Parameters
CFxUIPainterPath
CFxUIBrush

◆ fillRect()

void CFxUIPainter::fillRect ( int x,
int y,
int widht,
int height,
const CFxUIColor & color )

Fills the rectangle beginning at (x, y) with the given width and height, using the given color.

Parameters
x-coordinate
y-coordinate
width
height
CFxUIColor

◆ operator FxNativePainter *()

CFxUIPainter::operator FxNativePainter * ( ) const

◆ restore()

void CFxUIPainter::restore ( )

Restores the current painter state.

◆ save()

void CFxUIPainter::save ( )

Saves the current painter state

◆ setBrush()

void CFxUIPainter::setBrush ( const CFxUIColor & color)

Sets the painter's brush to the given brush.

Parameters
CFxUIColor

◆ setFont()

void CFxUIPainter::setFont ( CFxUIFont & font)

Sets the painter's font to the given font.

Parameters
CFxUIFont

◆ setPen()

void CFxUIPainter::setPen ( const CFxUIColor & color)

Sets the painter's pen width to 1 and the specified color.

Parameters
CFxUIColor

◆ setRenderHint()

void CFxUIPainter::setRenderHint ( RenderHint hint,
bool on = true )

Sets the given render hints on the painter.

Parameters
CFxUIPainter::RenderHint
bool

Member Data Documentation

◆ m_pImpl

CFxUIPainterImpl* CFxUIPainter::m_pImpl = nullptr
protected

Definition at line 243 of file FxUIPainter.h.


The documentation for this class was generated from the following file: