Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
PaintEngine.h
Go to the documentation of this file.
00001 /********************************************************************
00002 **                Image Component Library (ICL)                    **
00003 **                                                                 **
00004 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld          **
00005 **                         Neuroinformatics Group                  **
00006 ** Website: www.iclcv.org and                                      **
00007 **          http://opensource.cit-ec.de/projects/icl               **
00008 **                                                                 **
00009 ** File   : ICLQt/src/ICLQt/PaintEngine.h                          **
00010 ** Module : ICLQt                                                  **
00011 ** Authors: Christof Elbrechter                                    **
00012 **                                                                 **
00013 **                                                                 **
00014 ** GNU LESSER GENERAL PUBLIC LICENSE                               **
00015 ** This file may be used under the terms of the GNU Lesser General **
00016 ** Public License version 3.0 as published by the                  **
00017 **                                                                 **
00018 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
00019 ** included in the packaging of this file.  Please review the      **
00020 ** following information to ensure the license requirements will   **
00021 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt                **
00022 **                                                                 **
00023 ** The development of this software was supported by the           **
00024 ** Excellence Cluster EXC 277 Cognitive Interaction Technology.    **
00025 ** The Excellence Cluster EXC 277 is a grant of the Deutsche       **
00026 ** Forschungsgemeinschaft (DFG) in the context of the German       **
00027 ** Excellence Initiative.                                          **
00028 **                                                                 **
00029 ********************************************************************/
00030 
00031 #pragma once
00032 
00033 #include <ICLUtils/CompatMacros.h>
00034 #include <ICLUtils/Point32f.h>
00035 #include <ICLUtils/Size32f.h>
00036 #include <ICLUtils/Rect32f.h>
00037 #include <ICLCore/Types.h>
00038 #include <string>
00039 #include <stdio.h>
00040 #include <QImage>
00041 
00042 namespace icl{
00044   namespace core{ class ImgBase; }
00047   namespace qt{
00049     class PaintEngine{
00050       public:
00051       virtual ~PaintEngine(){}
00052       enum AlignMode {NoAlign, Centered, Justify};
00053       enum TextWeight {Light, Normal, DemiBold, Bold, Black};
00054       enum TextStyle {StyleNormal, StyleItalic, StyleOblique };
00055   
00056       virtual void color(float r, float g, float b, float a=255)=0;
00057       virtual void fill(float r, float g, float b, float a=255)=0;
00058       virtual void fontsize(float size)=0;
00059       virtual void font(std::string name, float size = -1, TextWeight weight = Normal, TextStyle style = StyleNormal)=0;
00060   
00061       virtual void linewidth(float w)=0;
00062       virtual void pointsize(float s)=0;
00063       virtual void line(const utils::Point32f &a, const utils::Point32f &b)=0;
00064       virtual void point(const utils::Point32f &p)=0;
00065       virtual void image(const utils::Rect32f &r,core::ImgBase *image, AlignMode mode = Justify, 
00066                          core::scalemode sm=core::interpolateNN)=0;
00067       virtual void image(const utils::Rect32f &r,const QImage &image, AlignMode mode = Justify, 
00068                          core::scalemode sm=core::interpolateNN)=0;
00069       virtual void rect(const utils::Rect32f &r)=0;
00070       virtual void triangle(const utils::Point32f &a, const utils::Point32f &b, const utils::Point32f &c)=0;
00071       virtual void quad(const utils::Point32f &a, const utils::Point32f &b, const utils::Point32f &c, const utils::Point32f &d)=0;
00072       virtual void ellipse(const utils::Rect32f &r)=0;
00073       virtual void text(const utils::Rect32f &r, const std::string text, AlignMode mode = Centered)=0;
00074   
00076       virtual void bci(float brightness=0, float contrast=0, float floatensity=0)=0;
00077       virtual void bciAuto()=0;
00078       
00079       virtual void getColor(float *piColor)=0;
00080       virtual void getFill(float *piColor)=0;
00081       
00082       virtual float getFontSize() const =0;
00083   
00084     };
00085   } // namespace qt
00086 }// namespace
00087 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines