Image Component Library (ICL)
PaintEngine.h
Go to the documentation of this file.
1 /********************************************************************
2 ** Image Component Library (ICL) **
3 ** **
4 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld **
5 ** Neuroinformatics Group **
6 ** Website: www.iclcv.org and **
7 ** http://opensource.cit-ec.de/projects/icl **
8 ** **
9 ** File : ICLQt/src/ICLQt/PaintEngine.h **
10 ** Module : ICLQt **
11 ** Authors: Christof Elbrechter **
12 ** **
13 ** **
14 ** GNU LESSER GENERAL PUBLIC LICENSE **
15 ** This file may be used under the terms of the GNU Lesser General **
16 ** Public License version 3.0 as published by the **
17 ** **
18 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
19 ** included in the packaging of this file. Please review the **
20 ** following information to ensure the license requirements will **
21 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt **
22 ** **
23 ** The development of this software was supported by the **
24 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. **
25 ** The Excellence Cluster EXC 277 is a grant of the Deutsche **
26 ** Forschungsgemeinschaft (DFG) in the context of the German **
27 ** Excellence Initiative. **
28 ** **
29 ********************************************************************/
30 
31 #pragma once
32 
33 #include <ICLUtils/CompatMacros.h>
34 #include <ICLUtils/Point32f.h>
35 #include <ICLUtils/Size32f.h>
36 #include <ICLUtils/Rect32f.h>
37 #include <ICLCore/Types.h>
38 #include <string>
39 #include <stdio.h>
40 #include <QImage>
41 
42 namespace icl{
44  namespace core{ class ImgBase; }
47  namespace qt{
49  class PaintEngine{
50  public:
51  virtual ~PaintEngine(){}
55 
56  virtual void color(float r, float g, float b, float a=255)=0;
57  virtual void fill(float r, float g, float b, float a=255)=0;
58  virtual void fontsize(float size)=0;
59  virtual void font(std::string name, float size = -1, TextWeight weight = Normal, TextStyle style = StyleNormal)=0;
60 
61  virtual void linewidth(float w)=0;
62  virtual void pointsize(float s)=0;
63  virtual void line(const utils::Point32f &a, const utils::Point32f &b)=0;
64  virtual void point(const utils::Point32f &p)=0;
65  virtual void image(const utils::Rect32f &r,core::ImgBase *image, AlignMode mode = Justify,
67  virtual void image(const utils::Rect32f &r,const QImage &image, AlignMode mode = Justify,
69  virtual void rect(const utils::Rect32f &r)=0;
70  virtual void triangle(const utils::Point32f &a, const utils::Point32f &b, const utils::Point32f &c)=0;
71  virtual void quad(const utils::Point32f &a, const utils::Point32f &b, const utils::Point32f &c, const utils::Point32f &d)=0;
72  virtual void ellipse(const utils::Rect32f &r)=0;
73  virtual void text(const utils::Rect32f &r, const std::string text, AlignMode mode = Centered, float angle=0)=0;
74 
76  virtual void bci(float brightness=0, float contrast=0, float floatensity=0)=0;
77  virtual void bciAuto()=0;
78 
79  virtual void getColor(float *piColor)=0;
80  virtual void getFill(float *piColor)=0;
81 
82  virtual float getFontSize() const =0;
83 
84  };
85  } // namespace qt
86 }// namespace
87 
Definition: PaintEngine.h:53
Definition: PaintEngine.h:54
undocument this line if you encounter any issues!
Definition: Any.h:37
TextWeight
Definition: PaintEngine.h:53
Definition: PaintEngine.h:54
virtual void linewidth(float w)=0
virtual void bciAuto()=0
virtual void image(const utils::Rect32f &r, core::ImgBase *image, AlignMode mode=Justify, core::scalemode sm=core::interpolateNN)=0
Definition: PaintEngine.h:52
virtual void text(const utils::Rect32f &r, const std::string text, AlignMode mode=Centered, float angle=0)=0
virtual void getColor(float *piColor)=0
virtual void color(float r, float g, float b, float a=255)=0
Floating point precision implementation of the Rect class.
Definition: Rect32f.h:45
virtual void triangle(const utils::Point32f &a, const utils::Point32f &b, const utils::Point32f &c)=0
virtual void quad(const utils::Point32f &a, const utils::Point32f &b, const utils::Point32f &c, const utils::Point32f &d)=0
Definition: PaintEngine.h:54
virtual void fontsize(float size)=0
Definition: PaintEngine.h:52
virtual void ellipse(const utils::Rect32f &r)=0
scalemode
for scaling of Img images theses functions are provided
Definition: Types.h:84
Single precission 3D Vectors Point class of the ICL.
Definition: Point32f.h:41
virtual void bci(float brightness=0, float contrast=0, float floatensity=0)=0
brightness-constrast intensity adjustment (for images only)
virtual void line(const utils::Point32f &a, const utils::Point32f &b)=0
Definition: PaintEngine.h:53
Definition: PaintEngine.h:53
pure virtual Paint engine interface
Definition: PaintEngine.h:49
Definition: PaintEngine.h:52
Definition: Types.h:85
virtual void point(const utils::Point32f &p)=0
virtual void fill(float r, float g, float b, float a=255)=0
virtual float getFontSize() const =0
Definition: PaintEngine.h:53
virtual void pointsize(float s)=0
virtual void font(std::string name, float size=-1, TextWeight weight=Normal, TextStyle style=StyleNormal)=0
Definition: PaintEngine.h:53
TextStyle
Definition: PaintEngine.h:54
virtual void rect(const utils::Rect32f &r)=0
AlignMode
Definition: PaintEngine.h:52
ImgBase is the Image-Interface class that provides save access to underlying Img-template .
Definition: ImgBase.h:131
virtual void getFill(float *piColor)=0
virtual ~PaintEngine()
Definition: PaintEngine.h:51