Commit Graph

3 Commits

Author SHA1 Message Date
Werni a7d5d1f091 Add more consts all over the place 2020-10-27 11:03:35 +00:00
Mikolaj Wielgus d82ad7cfe3 PCBNew: Fix values displayed in the bottom panel
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6046
2020-10-18 06:16:19 +02:00
Reece R. Pollack 3fec2805ec Add the ORIGIN_TRANSFORMS class
This commit adds the ORIGIN_TRANSFORMS class to support Display Origin
Transforms in all KiCad applications.

Functions are provided to perform four basic types of origin coordinate
transforms:
  * Transform a relative coordinate from internal to display form
  * Transform a relative coordinate from display to internal form
  * Transform an absolute coordinate from internal to display form
  * Transform an absolute coordinate from display to internal form

These functions are supported for data types "int", "long long int",
and "double". The default implementations for all but "int" simply
return their input unchanged; the implementation for "int" invokes
the implementation for "long long int".

The expectation is that the different KiCad applications will create
derived classes from this base class and override the functions as
needed. Protected template functions are provided for the standard
translations to maintain consistency within the derived classes.
2020-08-26 17:54:21 +00:00