MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / paintGL

Method paintGL

src/openms_gui/source/VISUAL/Plot3DOpenGLCanvas.cpp:251–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249 }
250
251 void Plot3DOpenGLCanvas::paintGL()
252 {
253 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
254 glLoadIdentity();
255
256 glTranslated(0.0, 0.0, -3.0 * corner_);
257 glRotated(xrot_ / 16.0, 1.0, 0.0, 0.0);
258 glRotated(yrot_ / 16.0, 0.0, 1.0, 0.0);
259 glRotated(zrot_ / 16.0, 0.0, 0.0, 1.0);
260 glTranslated(trans_x_, trans_y_, 3.0 * corner_);
261
262 glEnable(GL_DEPTH_TEST);
263 glEnable(GL_BLEND);
264 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
265
266 if (canvas_3d_.getLayerCount() != 0)
267 {
268 glCallList(ground_);
269
270 if (canvas_3d_.show_grid_) { glCallList(gridlines_); }
271
272 glCallList(axes_);
273 glCallList(axes_ticks_);
274
275 if (canvas_3d_.action_mode_ == PlotCanvas::AM_ZOOM
276 || canvas_3d_.action_mode_ == PlotCanvas::AM_TRANSLATE)
277 {
278 glCallList(stickdata_);
279 }
280
281 // draw axes legend
282 if (this->paintEngine()) // check if the paint device is properly initialized to suppress Qt warning
283 {
284 painter_ = new QPainter(this);
285 if (painter_->isActive())
286 {
287 drawAxesLegend_();
288 painter_->end();
289 }
290 delete(painter_);
291 }
292 }
293 }
294
295 void Plot3DOpenGLCanvas::drawAxesLegend_()
296 {

Callers

nothing calls this directly

Calls 3

getLayerCountMethod · 0.80
isActiveMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected