11 #ifndef __VIDEODISPLAY_H 12 #define __VIDEODISPLAY_H 22 #include <cvd/exceptions.h> 23 #include <cvd/image_ref.h> 38 using CVD::Exceptions::All::All;
78 static const DoNotMapStruct DoNotMap;
88 VideoDisplay(
double left,
double top,
double right,
double bottom,
double scale = 1,
int* visualAttr = defAttr,
bool map =
true);
107 void set_title(
const std::string& s);
110 int get_fd() {
return ConnectionNumber(my_display); }
113 void select_events(
long event_mask);
117 void get_event(XEvent* event);
121 void locate_display_pointer(
int& x,
int& y);
125 void locate_video_pointer(
double& x,
double& y);
137 void set_zoom(
double left,
double top,
double right,
double bottom,
double scale);
142 void zoom_in(
double cx,
double cy,
double factor = 2);
147 void zoom_out(
double cx,
double cy,
double factor = 2)
149 assert(factor != 0.0);
150 zoom_in(cx, cy, 1 / factor);
155 set_zoom(my_orig_left, my_orig_top, my_orig_right, my_orig_bottom, my_orig_scale);
168 void display_to_video(
int dx,
int dy,
double& vx,
double& vy);
174 void video_to_display(
double dx,
double dy,
int& vx,
int& vy);
194 bool my_positive_right;
195 bool my_positive_down;
199 double my_orig_right;
200 double my_orig_bottom;
201 double my_orig_scale;
203 XVisualInfo* my_visual;
204 GLXContext my_glx_context;
211 void init(
double,
double,
double,
double,
double,
int* visualAttr,
bool);
All classes and functions are within the CVD namespace.
Definition: argb.h:6
void zoom_reset()
Reset the image mapping to that when the VideoDisplay was created.
Definition: videodisplay.h:153
double video_width() const
What is the width of the local GL co-ordinates displayed?
Definition: videodisplay.h:159
An exception occurred during initialisation.
Definition: videodisplay.h:43
A cheap and cheerful GL display window using X and the GLX library.
Definition: videodisplay.h:70
void zoom_out(double cx, double cy, double factor=2)
Change the image mapping to zoom out around the specified point.
Definition: videodisplay.h:147
Display * display()
What is my display?
Definition: videodisplay.h:185
Base class for all CVD exceptions.
Definition: exceptions.h:15
Base class for all CVD::VideoDisplay exceptions.
Definition: videodisplay.h:36
Window window()
Which is my window?
Definition: videodisplay.h:187
An exception occurred during run-time.
Definition: videodisplay.h:50
int get_fd()
Returns the connection number for this display.
Definition: videodisplay.h:110
Definition: image_ref.h:29
double video_height() const
What is the height of the local GL co-ordinates displayed?
Definition: videodisplay.h:161