Image Component Library (ICL)
ImageRenderer.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 : ICLCore/src/ICLCore/ImageRenderer.h **
10 ** Module : ICLCore **
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 <ICLCore/Img.h>
35 #include <ICLUtils/Uncopyable.h>
36 
37 
38 namespace icl{
39  namespace core{
40 
42  struct Data;
43  Data *m_data;
44 
45  public:
46  ImageRenderer(ImgBase *image=0);
47  ~ImageRenderer();
48 
49  void setImage(ImgBase *image);
50 
51  void color(int r, int g, int b, int a);
52  void fill(int r, int g, int b, int a);
53  void symsize(float size);
54  void fontsize(float size);
55 
56  void sym(char sym, int x, int y);
57  void rect(int x, int y, int w, int h);
58  void triangle(int x1, int y1, int x2, int y2, int x3, int y3);
59  void line(int x1, int y1, int x2, int y2);
60  void linestrip(int n, int *xs, int *ys, int xStride=1, int yStride=1);
61  void pix(int x1, int x2);
62  void pix(int n, int *xs, int *ys, int xStride=1, int yStride=1);
63  void circle(int cx, int cy, int r);
64  void ellipse(int x, int y, int w, int h);
65  void text(int x, int y, const std::string &text);
66  };
67 
68  }
69 }
undocument this line if you encounter any issues!
Definition: Any.h:37
Class interface for un-copyable classes.
Definition: Uncopyable.h:64
ICLQt_API void triangle(ImgQ &image, int x1, int y1, int x2, int y2, int x3, int y3)
draws a triangle into an image
ICLQt_API void fontsize(int size)
sets up current fontsize (only available with Qt-Support)
ICLQt_API void text(ImgQ &image, int x, int y, const string &text)
renders a text into an image (only available with Qt-Support)
ICLQt_API void line(ImgQ &image, int x1, int y1, int x2, int y2)
draws a line into an image
Definition: ImageRenderer.h:41
ICLQt_API void linestrip(ImgQ &image, const std::vector< utils::Point > &pts, bool closeLoop=true)
draws a strip of connected lines
ICLQt_API void fill(float r, float g=-1, float b=-1, float alpha=255)
sets the current fill color to given r,g,b,alpha value
Data * m_data
Definition: ImageRenderer.h:42
ICLQt_API void pix(ImgQ &image, int x, int y)
draw a single pixel into an image
ICLQt_API void color(float r, float g=-1, float b=-1, float alpha=255)
sets the current color to given r,g,b,alpha value
ICLQt_API void circle(ImgQ &image, int x, int y, int r)
renders a filled circle into an image
ICLQt_API void rect(ImgQ &image, int x, int y, int w, int h, int rounding=0)
draws a rect into an image
ImgBase is the Image-Interface class that provides save access to underlying Img-template .
Definition: ImgBase.h:131
#define ICLCore_API
Definition: CompatMacros.h:174