45 m_view_top_left(0, 0, 0),
46 m_view_bottom_right(0, 0, 0),
47 m_view_center(0, 0, 0),
48 m_scene_top_left(0, 0, 0),
49 m_scene_bottom_right(0, 0, 0),
50 m_scene_center(0, 0, 0)
78 glViewport(0, 0, width(), height());
79 glMatrixMode(GL_PROJECTION);
95 double top, left, bottom, right;
118 float numDegrees = e->delta() / -8;
120 m_scale *= pow(1.1, numDegrees / 10.0);
155 glClearColor(0.58
f, 0.56
f, 0.5
f, 1);
156 glEnable(GL_POINT_SMOOTH);
157 glEnable(GL_LINE_SMOOTH);
158 glEnable(GL_POLYGON_SMOOTH);
159 glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
160 glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
161 glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
163 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
164 glDepthFunc(GL_NEVER);
165 glDisable(GL_DEPTH_TEST);
176 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
213 bool changed =
false;
243 double view_width = width() *
m_scale;
244 double view_height = height() *
m_scale;
252 if (view_width > scene_width)
275 if (view_height < scene_height)