View
- class compas_view2.views.View(app, background_color=(1, 1, 1, 1), selection_color=(1.0, 1.0, 0.0), mode='shaded', show_grid=True)[source]
Bases:
QOpenGLWidgetBase OpenGL view widget.
- Parameters:
app (
compas_view2.app.App) – The parent application of the view.background_color (tuple[float, float, float, float], optional) – The background or “clear” color of the view. Default is
(1.0, 1.0, 1.0, 1.0).selection_color (tuple[float, float, float], optional) – The highlight color of selected objects. Default is
(1.0, 1.0, 0.0).mode (‘shaded’ | ‘ghosted’, optional) – The display mode. Default is
'shaded'.show_grid (bool, optional) – Flag for turning the grid on or off. Default is
True, which turns the grid on.
Methods
Clear the view.
Initialize the OpenGL canvas.
Callback for the mouse move event.
Paint the OpenGL canvas.
Resize the OpenGL canvas.
Inherited Methods