16 #ifndef TRGCDCDisplayDrawingAreaHough_FLAG_
17 #define TRGCDCDisplayDrawingAreaHough_FLAG_
19 #include "trg/cdc/DisplayDrawingArea.h"
21 #ifdef TRGCDC_SHORT_NAMES
22 #define TCDDAreaHough TRGCDCDisplayDrawingAreaHough
32 class TRGCDCHoughPlane;
35 class TRGCDCDisplayDrawingAreaHough :
public TRGCDCDisplayDrawingArea {
40 TRGCDCDisplayDrawingAreaHough(TRGCDCDisplay&,
int size);
43 virtual ~TRGCDCDisplayDrawingAreaHough();
46 double scale(
void)
const;
47 void resetPosition(
void)
override;
48 bool wireName(
void)
const;
50 bool oldCDC(
void)
const;
53 void clear(
void)
override;
55 virtual bool on_expose_event(GdkEventExpose*)
override;
56 virtual bool on_button_press_event(GdkEventButton*)
override;
58 void append(
const TRGCDCHoughPlane*
const);
61 virtual void on_realize()
override;
65 int xT(
double x)
const;
66 int yT(
double y)
const;
67 int xR(
double x)
const;
68 int yR(
double y)
const;
74 int drawCell(
unsigned xCell,
unsigned yCell);
77 int drawRegion(
const std::vector<unsigned>& region);
86 const TRGCDCHoughPlane* _hp;
88 Glib::RefPtr<Gdk::Window> _window;
89 int _winx, _winy, _winw, _winh, _wind;
91 Glib::RefPtr<Gdk::GC> _gc;
92 Gdk::Color _blue, _red, _green, _black, _white, _gray, _yellow;
93 Gdk::Color _gray0, _gray1, _gray2, _gray3;
100 TRGCDCDisplayDrawingAreaHough::scale(
double a)
107 TRGCDCDisplayDrawingAreaHough::scale(
void)
const
114 TRGCDCDisplayDrawingAreaHough::wireName(
void)
const
121 TRGCDCDisplayDrawingAreaHough::wireName(
bool a)
123 return _wireName = a;
128 TRGCDCDisplayDrawingAreaHough::toY(
int a)
const
135 TRGCDCDisplayDrawingAreaHough::clear(
void)
142 TRGCDCDisplayDrawingAreaHough::append(
const TRGCDCHoughPlane*
const hp)
145 on_expose_event((GdkEventExpose*) NULL);
151 #endif // TRGCDCDisplayDrawingAreaHough_FLAG_