Image Component Library (ICL)
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
icl::qt::GLPaintEngine Class Reference

Paint engine to be used in QGLWigets for a high performance image visualization. More...

#include <GLPaintEngine.h>

Inheritance diagram for icl::qt::GLPaintEngine:
icl::qt::PaintEngine

Public Member Functions

 GLPaintEngine (QGLWidget *widget)
 
virtual ~GLPaintEngine ()
 
virtual void color (float r, float g, float b, float a=255)
 
virtual void fill (float r, float g, float b, float a=255)
 
virtual void fontsize (float size)
 
virtual void font (std::string name, float size=-1, PaintEngine::TextWeight weight=PaintEngine::Normal, PaintEngine::TextStyle style=PaintEngine::StyleNormal)
 
virtual void linewidth (float w)
 
virtual void pointsize (float s)
 
virtual void line (const utils::Point32f &a, const utils::Point32f &b)
 
virtual void point (const utils::Point32f &p)
 
virtual void image (const utils::Rect32f &r, core::ImgBase *image, PaintEngine::AlignMode mode=PaintEngine::Justify, core::scalemode sm=core::interpolateNN)
 
virtual void image (const utils::Rect32f &r, const QImage &image, PaintEngine::AlignMode mode=PaintEngine::Justify, core::scalemode sm=core::interpolateNN)
 
virtual void rect (const utils::Rect32f &r)
 
virtual void triangle (const utils::Point32f &a, const utils::Point32f &b, const utils::Point32f &c)
 
virtual void quad (const utils::Point32f &a, const utils::Point32f &b, const utils::Point32f &c, const utils::Point32f &d)
 
virtual void ellipse (const utils::Rect32f &r)
 
virtual void text (const utils::Rect32f &r, const std::string text, PaintEngine::AlignMode mode=PaintEngine::Centered, float angle=0)
 
virtual void bci (float brightness=0, float contrast=0, float intensity=0)
 brightness-constrast intensity adjustment (for images only) More...
 
virtual void bciAuto ()
 
virtual void getColor (float *piColor)
 
virtual void getFill (float *piColor)
 
virtual float getFontSize () const
 
virtual float getLineWidth () const
 
virtual float getPointSize () const
 
virtual icl::utils::Size getSize ()
 
utils::Size estimateTextBounds (const std::string &text) const
 
- Public Member Functions inherited from icl::qt::PaintEngine
virtual ~PaintEngine ()
 

Protected Member Functions

void setupRasterEngine (const utils::Rect32f &r, const utils::Size32f &s, PaintEngine::AlignMode mode)
 
void setPackAlignment (core::depth d, int linewidth)
 
void setupPixelTransfer (core::depth d, float brightness, float contrast, float intensity)
 

Protected Attributes

QGLWidget * m_widget
 
float m_linewidth
 
float m_pointsize
 
float m_linecolor [4]
 
float m_fillcolor [4]
 
float m_bci [3]
 
bool m_bciauto
 
QFont m_font
 

Private Attributes

core::ImgBasem_incompDepthBuf
 

Additional Inherited Members

- Public Types inherited from icl::qt::PaintEngine
enum  AlignMode { NoAlign, Centered, Justify }
 
enum  TextWeight {
  Light, Normal, DemiBold, Bold,
  Black
}
 
enum  TextStyle { StyleNormal, StyleItalic, StyleOblique }
 

Detailed Description

Paint engine to be used in QGLWigets for a high performance image visualization.

The GLPaintEngine provides a QPainter like interface for drawing 2D-OpenGL primitives directly into a OpenGL graphics context. It provides the following functionalities:

See also
ICL/trunk/ICLQt/test/ICLDrawDemo for more details

Constructor & Destructor Documentation

◆ GLPaintEngine()

icl::qt::GLPaintEngine::GLPaintEngine ( QGLWidget *  widget)

◆ ~GLPaintEngine()

virtual icl::qt::GLPaintEngine::~GLPaintEngine ( )
virtual

Member Function Documentation

◆ bci()

virtual void icl::qt::GLPaintEngine::bci ( float  brightness = 0,
float  contrast = 0,
float  intensity = 0 
)
virtual

brightness-constrast intensity adjustment (for images only)

Implements icl::qt::PaintEngine.

◆ bciAuto()

virtual void icl::qt::GLPaintEngine::bciAuto ( )
virtual

Implements icl::qt::PaintEngine.

◆ color()

virtual void icl::qt::GLPaintEngine::color ( float  r,
float  g,
float  b,
float  a = 255 
)
virtual

Implements icl::qt::PaintEngine.

◆ ellipse()

virtual void icl::qt::GLPaintEngine::ellipse ( const utils::Rect32f r)
virtual

Implements icl::qt::PaintEngine.

◆ estimateTextBounds()

utils::Size icl::qt::GLPaintEngine::estimateTextBounds ( const std::string &  text) const

◆ fill()

virtual void icl::qt::GLPaintEngine::fill ( float  r,
float  g,
float  b,
float  a = 255 
)
virtual

Implements icl::qt::PaintEngine.

◆ font()

virtual void icl::qt::GLPaintEngine::font ( std::string  name,
float  size = -1,
PaintEngine::TextWeight  weight = PaintEngine::Normal,
PaintEngine::TextStyle  style = PaintEngine::StyleNormal 
)
virtual

Implements icl::qt::PaintEngine.

◆ fontsize()

virtual void icl::qt::GLPaintEngine::fontsize ( float  size)
virtual

Implements icl::qt::PaintEngine.

◆ getColor()

virtual void icl::qt::GLPaintEngine::getColor ( float *  piColor)
virtual

Implements icl::qt::PaintEngine.

◆ getFill()

virtual void icl::qt::GLPaintEngine::getFill ( float *  piColor)
virtual

Implements icl::qt::PaintEngine.

◆ getFontSize()

virtual float icl::qt::GLPaintEngine::getFontSize ( ) const
inlinevirtual

Implements icl::qt::PaintEngine.

◆ getLineWidth()

virtual float icl::qt::GLPaintEngine::getLineWidth ( ) const
inlinevirtual

◆ getPointSize()

virtual float icl::qt::GLPaintEngine::getPointSize ( ) const
inlinevirtual

◆ getSize()

virtual icl::utils::Size icl::qt::GLPaintEngine::getSize ( )
inlinevirtual

◆ image() [1/2]

virtual void icl::qt::GLPaintEngine::image ( const utils::Rect32f r,
core::ImgBase image,
PaintEngine::AlignMode  mode = PaintEngine::Justify,
core::scalemode  sm = core::interpolateNN 
)
virtual

Implements icl::qt::PaintEngine.

◆ image() [2/2]

virtual void icl::qt::GLPaintEngine::image ( const utils::Rect32f r,
const QImage &  image,
PaintEngine::AlignMode  mode = PaintEngine::Justify,
core::scalemode  sm = core::interpolateNN 
)
virtual

Implements icl::qt::PaintEngine.

◆ line()

virtual void icl::qt::GLPaintEngine::line ( const utils::Point32f a,
const utils::Point32f b 
)
virtual

Implements icl::qt::PaintEngine.

◆ linewidth()

virtual void icl::qt::GLPaintEngine::linewidth ( float  w)
virtual

Implements icl::qt::PaintEngine.

◆ point()

virtual void icl::qt::GLPaintEngine::point ( const utils::Point32f p)
virtual

Implements icl::qt::PaintEngine.

◆ pointsize()

virtual void icl::qt::GLPaintEngine::pointsize ( float  s)
virtual

Implements icl::qt::PaintEngine.

◆ quad()

virtual void icl::qt::GLPaintEngine::quad ( const utils::Point32f a,
const utils::Point32f b,
const utils::Point32f c,
const utils::Point32f d 
)
virtual

Implements icl::qt::PaintEngine.

◆ rect()

virtual void icl::qt::GLPaintEngine::rect ( const utils::Rect32f r)
virtual

Implements icl::qt::PaintEngine.

◆ setPackAlignment()

void icl::qt::GLPaintEngine::setPackAlignment ( core::depth  d,
int  linewidth 
)
protected

◆ setupPixelTransfer()

void icl::qt::GLPaintEngine::setupPixelTransfer ( core::depth  d,
float  brightness,
float  contrast,
float  intensity 
)
protected

◆ setupRasterEngine()

void icl::qt::GLPaintEngine::setupRasterEngine ( const utils::Rect32f r,
const utils::Size32f s,
PaintEngine::AlignMode  mode 
)
protected

◆ text()

virtual void icl::qt::GLPaintEngine::text ( const utils::Rect32f r,
const std::string  text,
PaintEngine::AlignMode  mode = PaintEngine::Centered,
float  angle = 0 
)
virtual

Implements icl::qt::PaintEngine.

◆ triangle()

virtual void icl::qt::GLPaintEngine::triangle ( const utils::Point32f a,
const utils::Point32f b,
const utils::Point32f c 
)
virtual

Implements icl::qt::PaintEngine.

Member Data Documentation

◆ m_bci

float icl::qt::GLPaintEngine::m_bci[3]
protected

◆ m_bciauto

bool icl::qt::GLPaintEngine::m_bciauto
protected

◆ m_fillcolor

float icl::qt::GLPaintEngine::m_fillcolor[4]
protected

◆ m_font

QFont icl::qt::GLPaintEngine::m_font
protected

◆ m_incompDepthBuf

core::ImgBase* icl::qt::GLPaintEngine::m_incompDepthBuf
private

◆ m_linecolor

float icl::qt::GLPaintEngine::m_linecolor[4]
protected

◆ m_linewidth

float icl::qt::GLPaintEngine::m_linewidth
protected

◆ m_pointsize

float icl::qt::GLPaintEngine::m_pointsize
protected

◆ m_widget

QGLWidget* icl::qt::GLPaintEngine::m_widget
protected

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