|
KiCad PCB EDA Suite
|
Easy-PC's text measurement, so text lands where Easy-PC draws it. More...
#include <cstdint>#include <string>#include <math/box2.h>#include <math/vector2d.h>#include <wx/string.h>Go to the source code of this file.
Classes | |
| class | EASYPC::TEXT_METRICS |
Namespaces | |
| namespace | EASYPC |
Enumerations | |
| enum | EASYPC::TEXT_H_ALIGN : int32_t { EASYPC::TEXT_H_LEFT = 0 , EASYPC::TEXT_H_RIGHT = 1 , EASYPC::TEXT_H_CENTRE = 2 } |
| The source text position's alignment value. More... | |
| enum | EASYPC::TEXT_V_ALIGN : int32_t { EASYPC::TEXT_V_BASELINE = 0 , EASYPC::TEXT_V_TOP = 1 , EASYPC::TEXT_V_MIDDLE = 2 } |
| Source text positions always pass BASELINE. More... | |
Functions | |
| bool | EASYPC::TextStaysUpright (const SOURCE_DESIGN &aDesign, bool aSchematic) |
| Whether aDesign's text is drawn upright: the design's flag, which old schematics imply, or a schematic from DesignSpark Creator, Pro or ProtoPCB, which are always upright. | |
| int32_t | EASYPC::UprightRotation (int32_t aAngle, bool aKeepUpright) |
| With text kept upright, an angle above 135 and up to 305 degrees turns by 180. | |
| wxString | EASYPC::ToKiCadMarkup (const wxString &aText) |
| A displayed string in KiCad's markup. | |
Easy-PC's text measurement, so text lands where Easy-PC draws it.
Values are design units, Y up. The first line's baseline cell starts at the anchor and each later line is one interline pitch lower; alignment shifts each line by its own width; mirroring reflects about the anchor's X before rotating about the anchor. Fixed-pitch stroke characters are one text height wide, which is exact. Proportional stroke widths are absent from the file, so KiCad's stroke font estimates them. TrueType text cannot be measured.
Definition in file easypc_text_metrics.h.