KiCad PCB EDA Suite
|
Helper class to gather logic relating to the positioning of text in the four pin "slots": More...
Classes | |
struct | SLOT |
struct | TEXT_PLACEMENT |
Public Types | |
enum | SLOT_ID { INSIDE = 0 , OUTSIDE , ABOVE , BELOW } |
enum class | SLOT_ROLE { NAME = 0 , NUMBER , ELECTRICAL_TYPE } |
using | const_iterator = std::array< SLOT, 4 >::const_iterator |
Public Member Functions | |
PIN_TEXTS (const SCH_PIN &aPin, float aPenWidth, float aPinTextMargin) | |
const_iterator | begin () const |
const_iterator | end () const |
SLOT & | GetSlot (SLOT_ID aSlot) |
const SLOT & | GetSlot (SLOT_ID aSlot) const |
void | ComputeOffsets () |
bool | SlotRendersAsBitmap (const SLOT &aSlot, KIGFX::GAL &aGal) const |
void | SetColorOverride (const COLOR4D &aColor) |
Replace all slot colours with a new colour. | |
TEXT_PLACEMENT | GetTextPlacement (const PIN_TEXTS::SLOT &aSlot, PIN_ORIENTATION aPinOrientation) const |
Private Attributes | |
const SCH_PIN & | m_pin |
std::array< SLOT, 4 > | m_slots |
std::array< int, 4 > | m_offsets |
const float | m_penWidth |
const float | m_pinTextMargin |
Helper class to gather logic relating to the positioning of text in the four pin "slots":
above
inside |-----—x outside below
Definition at line 985 of file sch_painter.cpp.
using KIGFX::PIN_TEXTS::const_iterator = std::array<SLOT, 4>::const_iterator |
Definition at line 1047 of file sch_painter.cpp.
Enumerator | |
---|---|
INSIDE | |
OUTSIDE | |
ABOVE | |
BELOW |
Definition at line 988 of file sch_painter.cpp.
|
strong |
Enumerator | |
---|---|
NAME | |
NUMBER | |
ELECTRICAL_TYPE |
Definition at line 996 of file sch_painter.cpp.
|
inline |
Definition at line 1040 of file sch_painter.cpp.
|
inline |
Definition at line 1049 of file sch_painter.cpp.
|
inline |
Definition at line 1056 of file sch_painter.cpp.
References INSIDE, OUTSIDE, and TARGET_PIN_RADIUS.
Referenced by KIGFX::SCH_PAINTER::draw().
|
inline |
Definition at line 1051 of file sch_painter.cpp.
Definition at line 1053 of file sch_painter.cpp.
Referenced by KIGFX::SCH_PAINTER::draw().
Definition at line 1054 of file sch_painter.cpp.
|
inline |
Definition at line 1092 of file sch_painter.cpp.
References KIGFX::PIN_TEXTS::TEXT_PLACEMENT::Angle, ANGLE_HORIZONTAL, ANGLE_VERTICAL, GetFlippedAlignment(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, GR_TEXT_V_ALIGN_BOTTOM, GR_TEXT_V_ALIGN_CENTER, GR_TEXT_V_ALIGN_TOP, KIGFX::PIN_TEXTS::TEXT_PLACEMENT::HAlign, KIGFX::PIN_TEXTS::TEXT_PLACEMENT::IconSide, INSIDE, OUTSIDE, KIGFX::PIN_TEXTS::TEXT_PLACEMENT::Pos, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by KIGFX::SCH_PAINTER::draw().
|
inline |
Replace all slot colours with a new colour.
Definition at line 1084 of file sch_painter.cpp.
Referenced by KIGFX::SCH_PAINTER::draw().
|
inline |
Definition at line 1069 of file sch_painter.cpp.
References BITMAP_FONT_SIZE_THRESHOLD, KIGFX::GAL::GetWorldScale(), and KIGFX::PIN_TEXTS::SLOT::size.
Referenced by KIGFX::SCH_PAINTER::draw().
|
private |
Definition at line 1183 of file sch_painter.cpp.
|
private |
Definition at line 1184 of file sch_painter.cpp.
|
private |
Definition at line 1181 of file sch_painter.cpp.
|
private |
Definition at line 1185 of file sch_painter.cpp.
|
private |
Definition at line 1182 of file sch_painter.cpp.