|
KiCad PCB EDA Suite
|
What the last zoom to fit showed, so a canvas that changes size can fit it again. More...
#include <automatic_fit.h>
Public Member Functions | |
| void | Record (const BOX2I &aBox, std::optional< double > aMarginScale, double aScale, const VECTOR2D &aCenter) |
| Note a fit of aBox that left the view at aScale and aCenter. | |
| void | Clear () |
| bool | Holds (double aScale, const VECTOR2D &aCenter) const |
| True while a view at aScale and aCenter shows exactly what the last fit left. | |
| const BOX2I & | GetBox () const |
| std::optional< double > | GetMarginScale () const |
Private Attributes | |
| bool | m_valid = false |
| BOX2I | m_box |
| std::optional< double > | m_marginScale |
| double | m_scale = 0.0 |
| VECTOR2D | m_center |
What the last zoom to fit showed, so a canvas that changes size can fit it again.
The view counts as still at its automatic fit while its scale and centre are exactly those the fit left. Any zoom or pan, by the user or by a tool, changes one of them and so ends it without having to be reported here.
Definition at line 38 of file automatic_fit.h.
|
inline |
Definition at line 51 of file automatic_fit.h.
References m_valid.
|
inline |
Definition at line 59 of file automatic_fit.h.
References m_box.
|
inline |
Definition at line 61 of file automatic_fit.h.
References m_marginScale.
|
inline |
True while a view at aScale and aCenter shows exactly what the last fit left.
Definition at line 54 of file automatic_fit.h.
|
inline |
Note a fit of aBox that left the view at aScale and aCenter.
Definition at line 42 of file automatic_fit.h.
References m_box, m_center, m_marginScale, m_scale, and m_valid.
|
private |
Definition at line 65 of file automatic_fit.h.
|
private |
Definition at line 68 of file automatic_fit.h.
|
private |
Definition at line 66 of file automatic_fit.h.
Referenced by GetMarginScale(), and Record().
|
private |
Definition at line 67 of file automatic_fit.h.
|
private |
Definition at line 64 of file automatic_fit.h.