SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmmvis::sectionview::DiagramViewport Struct Reference

User zoom / pan applied on top of the automatic fit. More...

#include <sectiondiagram.h>

Collaboration diagram for openswmmvis::sectionview::DiagramViewport:

Public Member Functions

bool isIdentity () const
 

Public Attributes

double zoom = 1.0
 1.0 = fitted to the widget.
 
QPointF panPx
 Additional translation, in screen pixels.
 

Detailed Description

User zoom / pan applied on top of the automatic fit.

The painter always fits the model to the widget first; this is layered over that result, so "zoom to extents" is simply a default-constructed viewport and no state has to be recomputed when the model changes.

Only the GEOMETRY is scaled — text keeps its point size, and dimension / leader offsets keep their pixel lengths. That is the engineering-drawing convention, and it is what makes zooming useful for legibility: the drawing spreads out underneath labels that stay readable, instead of everything growing together and staying equally cramped.

Member Function Documentation

◆ isIdentity()

bool openswmmvis::sectionview::DiagramViewport::isIdentity ( ) const
inline

Member Data Documentation

◆ panPx

QPointF openswmmvis::sectionview::DiagramViewport::panPx

Additional translation, in screen pixels.

◆ zoom

double openswmmvis::sectionview::DiagramViewport::zoom = 1.0

1.0 = fitted to the widget.


The documentation for this struct was generated from the following file: