OpendTect-6_4  6.4
uirgbarraycanvas.h
Go to the documentation of this file.
1 #ifndef uirgbarraycanvas_h
2 #define uirgbarraycanvas_h
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: Bert
8  Date: Feb 2007
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "uitoolsmod.h"
15 #include "uigraphicsview.h"
16 #include "color.h"
17 
18 class uiPixmapItem;
19 class uiRGBArray;
20 class uiPixmap;
21 class MouseEventHandler;
22 
23 
37 {
38 public:
39  uiRGBArrayCanvas(uiParent*,uiRGBArray&);
41 
42  void setBorder(const uiBorder&);
43  void setBGColor(const Color&);
44  void setDrawArr(bool);
45  void setPixmap(const uiPixmap&);
46  void removePixmap();
47 
48  uiRect arrArea() const { return arrarea_; }
49  uiRGBArray& rgbArray() { return rgbarr_; }
50  const uiRGBArray& rgbArray() const { return rgbarr_; }
51 
52  const uiRect& updateArea() { return updarea_; }
55 
56  inline const uiBorder& border() const { return border_; }
57  inline const Color& bgColor() const { return bgcolor_; }
58  inline bool arrDrawn() const { return dodraw_; }
59 
60  void beforeDraw();
61  void beforeDraw(int w,int h);
62  void setPixMapPos(int x,int y);
63  void updatePixmap();
64 
65 protected:
66 
68  uiRGBArray& rgbarr_;
71  bool dodraw_;
72 
76 
77  virtual void mkNewFill() {}
78  void rubberBandHandler(uiRect);
79  bool createPixmap();
80 
81 };
82 
83 
84 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Definition: uigeom.h:42
uiBorder border_
Definition: uirgbarraycanvas.h:69
const uiRGBArray & rgbArray() const
Definition: uirgbarraycanvas.h:50
const Color & bgColor() const
Definition: uirgbarraycanvas.h:57
uiRect arrarea_
Definition: uirgbarraycanvas.h:73
Color bgcolor_
Definition: uirgbarraycanvas.h:70
Definition: uiparent.h:26
uiRect arrArea() const
Definition: uirgbarraycanvas.h:48
uiPixmap * pixmap_
Definition: uirgbarraycanvas.h:75
bool arrDrawn() const
Definition: uirgbarraycanvas.h:58
uiRGBArray & rgbArray()
Definition: uirgbarraycanvas.h:49
uiPixmapItem * pixmapitm_
Definition: uirgbarraycanvas.h:67
bool dodraw_
Definition: uirgbarraycanvas.h:71
virtual void mkNewFill()
Definition: uirgbarraycanvas.h:77
Definition: mouseevent.h:162
Off-screen pixel-based paint device.
Definition: uipixmap.h:34
const uiBorder & border() const
Definition: uirgbarraycanvas.h:56
Definition: uigeom.h:78
Provides a canvas where a uiRGBArray is pre-drawn.
Definition: uirgbarraycanvas.h:36
uiRect updarea_
Definition: uirgbarraycanvas.h:74
uiRGBArray & rgbarr_
Definition: uirgbarraycanvas.h:68
const uiRect & updateArea()
Definition: uirgbarraycanvas.h:52
Definition: uigraphicsitemimpl.h:172
Definition: uigraphicsview.h:51
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019