46 m_overrideTextEnabled( false ),
51 m_suppressZeroes( false ),
54 m_extensionOffset( 0 ),
56 m_keepTextAligned( true ),
58 m_inClearRenderCache( false )
105template<
typename ShapeType>
108 m_shapes.push_back( std::make_shared<ShapeType>( aShape ) );
114 struct lconv* lc = localeconv();
115 wxChar sep = lc->decimal_point[0];
128 default: precision = precision - 4;
break;
132 wxString format = wxT(
"%." ) +
wxString::Format( wxT(
"%i" ), precision ) + wxT(
"f" );
138 while(
text.Last() ==
'0' )
142 if(
text.Last() ==
'.' ||
text.Last() == sep )
258 int axis = aMirrorLeftRight ? axis_pos.
x : axis_pos.
y;
261#define INVERT( pos ) ( ( pos ) = axis - ( ( pos ) - axis ) )
262 if( aMirrorLeftRight )
272 if( aMirrorLeftRight )
291 std::vector<MSG_PANEL_ITEM>& aList )
296 wxCHECK_RET(
m_parent !=
nullptr, wxT(
"PCB_TEXT::GetMsgPanelInfo() m_Parent is NULL." ) );
300 aList.emplace_back(
_(
"Prefix" ),
GetPrefix() );
322 aList.emplace_back(
_(
"Suffix" ),
GetSuffix() );
331 aList.emplace_back(
_(
"Font" ),
GetFont() ?
GetFont()->GetName() :
_(
"Default" ) );
345 aList.emplace_back( start, wxEmptyString );
358 aList.emplace_back( start, end );
362 aList.emplace_back(
_(
"Status" ),
_(
"Locked" ) );
370 std::shared_ptr<SHAPE_COMPOUND> effectiveShape = std::make_shared<SHAPE_COMPOUND>();
374 for(
const std::shared_ptr<SHAPE>& shape :
GetShapes() )
375 effectiveShape->AddShape( shape->Clone() );
377 return effectiveShape;
390 for(
const std::shared_ptr<SHAPE>& shape :
GetShapes() )
392 if( shape->Collide( aPosition, dist_max ) )
420 int xmin, xmax, ymin, ymax;
428 for(
const std::shared_ptr<SHAPE>& shape :
GetShapes() )
430 BOX2I shapeBox = shape->BBox();
433 xmin = std::min( xmin, shapeBox.
GetOrigin().
x );
434 xmax = std::max( xmax, shapeBox.
GetEnd().
x );
435 ymin = std::min( ymin, shapeBox.
GetOrigin().
y );
436 ymax = std::max( ymax, shapeBox.
GetEnd().
y );
471 VECTOR2I endpoint( aStart ? aSeg.
B : aSeg.
A );
478 if(
OPT_VECTOR2I intersection = ( *seg ).Intersect( aSeg ) )
480 if( ( *intersection - start ).SquaredEuclideanNorm() <
481 ( endpoint - start ).SquaredEuclideanNorm() )
482 endpoint = *intersection;
486 if( start == endpoint )
496 VECTOR2I endpoint( aStart ? aSeg.
B : aSeg.
A );
501 std::vector<VECTOR2I> intersections = aCircle.
Intersect( aSeg );
505 if( ( intersection - start ).SquaredEuclideanNorm() <
506 ( endpoint - start ).SquaredEuclideanNorm() )
507 endpoint = intersection;
510 if( start == endpoint )
518 int aClearance,
int aError,
ERROR_LOC aErrorLoc,
519 bool aIgnoreLineWidth )
const
521 wxASSERT_MSG( !aIgnoreLineWidth, wxT(
"IgnoreLineWidth has no meaning for dimensions." ) );
523 for(
const std::shared_ptr<SHAPE>& shape :
m_shapes )
541 wxFAIL_MSG( wxT(
"PCB_DIMENSION_BASE::TransformShapeToPolygon unknown shape type." ) );
564 wxASSERT( aImage->
Type() ==
Type() );
592 VECTOR2D crossBar( aCrossbarEnd - aCrossbarStart );
594 if( height.
Cross( crossBar ) > 0 )
614 extension =
VECTOR2I( -dimension.
y, dimension.
x );
616 extension =
VECTOR2I( dimension.
y, -dimension.
x );
655 bool containsA = polyBox.
Contains( crossbar.
A );
656 bool containsB = polyBox.
Contains( crossbar.
B );
667 if( !containsA && !containsB && !endpointA && !endpointB )
692 if( crossbarCenter.
x == 0 )
694 else if( crossbarCenter.
x < 0 )
699 VECTOR2I textOffset = crossbarCenter;
701 textOffset = crossbarCenter + textOffset.
Resize( textOffsetDistance );
755 wxASSERT( aImage->
Type() ==
Type() );
837 bool containsA = polyBox.
Contains( crossbar.
A );
838 bool containsB = polyBox.
Contains( crossbar.
B );
849 if( !containsA && !containsB && !endpointA && !endpointB )
877 textOffset.
y = -textOffsetDistance;
879 textOffset.
x = -textOffsetDistance;
881 textOffset += crossbarCenter;
892 if(
abs( crossbarCenter.
x ) >
abs( crossbarCenter.
y ) )
907 angle.Normalize180();
927 else if( angle < -ANGLE_45 && angle >= -
ANGLE_135 )
971 wxASSERT( aImage->
Type() ==
Type() );
1025 double radius = ( textBox.
GetWidth() / 2.0 ) - penWidth;
1038 arrowSegEnd =
m_end;
1067 double radius = ( textBox.
GetWidth() / 2.0 ) - penWidth;
1078 if( textSegEnd && *arrowSegEnd ==
m_end )
1094 aList.emplace_back( start, wxEmptyString );
1120 wxASSERT( aImage->
Type() ==
Type() );
1211 arrowSeg.
B = *arrowSegEnd;
1214 textSeg.
B = *textSegEnd;
1247 wxASSERT( aImage->
Type() ==
Type() );
1334 const wxString groupDimension =
_HKI(
"Dimension Properties" );
1381 const wxString groupDimension =
_HKI(
"Dimension Properties" );
1399 _HKI(
"Hyperlink" ),
1429 _HKI(
"Hyperlink" ),
1450 const wxString groupDimension =
_HKI(
"Dimension Properties" );
1464 _HKI(
"Hyperlink" ),
1490 const wxString groupDimension =
_HKI(
"Dimension Properties" );
1503 _HKI(
"Hyperlink" ),
1534 _HKI(
"Hyperlink" ),
constexpr EDA_IU_SCALE pcbIUScale
BITMAPS
A list of all bitmap identifiers.
@ add_orthogonal_dimension
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
virtual const BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
virtual LSET GetLayerSet() const
Return a std::bitset of all layers on which the item physically resides.
virtual bool IsLocked() const
wxString GetLayerName() const
Return the name of the PCB layer on which the item resides.
BOX2< Vec > & Normalize()
Ensure that the height and width are positive.
const Vec & GetOrigin() const
void SetX(coord_type val)
const Vec GetCenter() const
bool Intersects(const BOX2< Vec > &aRect) const
void SetY(coord_type val)
coord_type GetWidth() const
void SetWidth(coord_type val)
bool Contains(const Vec &aPoint) const
BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
coord_type GetRight() const
void SetHeight(coord_type val)
coord_type GetBottom() const
BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Modify the position and size of the rectangle in order to contain aRect.
Represent basic circle geometry with utility geometry functions.
std::vector< VECTOR2I > Intersect(const CIRCLE &aCircle) const
Compute the intersection points between this circle and aCircle.
bool Contains(const VECTOR2I &aP) const
Return true if aP is on the circumference of this circle.
ORIGIN_TRANSFORMS & GetOriginTransforms() override
Return a reference to the default ORIGIN_TRANSFORMS object.
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
KICAD_T Type() const
Returns the type of object.
virtual const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
EDA_ITEM * m_parent
Linked list: Link (parent struct)
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
int GetTextHeight() const
BOX2I GetTextBox(int aLine=-1, bool aInvertY=false) const
Useful in multiline texts to calculate the full text or a line area (for zones filling,...
const VECTOR2I & GetTextPos() const
const EDA_ANGLE & GetTextAngle() const
virtual const wxString & GetText() const
Return the string associated with the text object.
void SetTextPos(const VECTOR2I &aPoint)
KIFONT::FONT * GetFont() const
void SetMirrored(bool isMirrored)
void Offset(const VECTOR2I &aOffset)
virtual void ClearRenderCache()
int GetEffectiveTextPenWidth(int aDefaultPenWidth=0) const
The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultPenWidth.
std::shared_ptr< SHAPE_COMPOUND > GetEffectiveTextShape(bool aTriangulate=true, bool aUseTextRotation=true) const
build a list of segments (SHAPE_SEGMENT) to describe a text shape.
virtual void SetText(const wxString &aText)
virtual void SetTextAngle(const EDA_ANGLE &aAngle)
int GetTextThickness() const
static ENUM_MAP< T > & Instance()
Class that other classes need to inherit from, in order to be inspectable.
static LSET SideSpecificMask()
EDA_UNITS GetUnits() const
bool m_autoUnits
If true, follow the currently selected UI units.
void Update()
Update the dimension's cached text and geometry.
void ChangeSuffix(const wxString &aSuffix)
wxString GetOverrideText() const
wxString GetSuffix() const
std::vector< std::shared_ptr< SHAPE > > m_shapes
void TransformShapeToPolygon(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aError, ERROR_LOC aErrorLoc, bool aIgnoreLineWidth=false) const override
Convert the item shape to a closed polygon.
void Flip(const VECTOR2I &aCentre, bool aFlipLeftRight) override
Flip this object, i.e.
void ClearRenderCache() override
int m_lineThickness
Thickness used for all graphics in the dimension.
void Move(const VECTOR2I &offset) override
Move this object.
bool m_suppressZeroes
Suppress trailing zeroes.
void SetUnits(EDA_UNITS aUnits)
DIM_PRECISION m_precision
Number of digits to display after decimal.
std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer, FLASHING aFlash=FLASHING::DEFAULT) const override
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
static OPT_VECTOR2I segCircleIntersection(CIRCLE &aCircle, SEG &aSeg, bool aStart=true)
void addShape(const ShapeType &aShape)
void SetPrefix(const wxString &aPrefix)
wxString m_suffix
String appended to the value.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
void ChangeOverrideText(const wxString &aValue)
bool m_inClearRenderCache
re-entrancy guard
PCB_DIMENSION_BASE(BOARD_ITEM *aParent, KICAD_T aType=PCB_DIMENSION_T)
int m_extensionOffset
Distance from feature points to extension line start.
bool m_keepTextAligned
Calculate text orientation to match dimension.
DIM_PRECISION GetPrecision() const
wxString GetPrefix() const
void SetSuffix(const wxString &aSuffix)
const std::vector< std::shared_ptr< SHAPE > > & GetShapes() const
DIM_UNITS_MODE GetUnitsMode() const
virtual void updateText()
Update the text field value from the current geometry (called by updateGeometry normally).
bool HitTest(const VECTOR2I &aPosition, int aAccuracy) const override
Test if aPosition is inside or on the boundary of this item.
EDA_UNITS m_units
0 = inches, 1 = mm
int m_measuredValue
value of PCB dimensions
DIM_UNITS_FORMAT GetUnitsFormat() const
virtual const VECTOR2I & GetStart() const
The dimension's origin is the first feature point for the dimension.
wxString m_valueString
Displayed value when m_overrideValue = true.
void ChangePrecision(DIM_PRECISION aPrecision)
bool m_overrideTextEnabled
Manually specify the displayed measurement value.
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const override
Return a user-visible description string of this item.
DIM_UNITS_FORMAT m_unitsFormat
How to render the units suffix.
int GetMeasuredValue() const
bool GetSuppressZeroes() const
const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
DIM_TEXT_POSITION m_textPosition
How to position the text.
static OPT_VECTOR2I segPolyIntersection(const SHAPE_POLY_SET &aPoly, const SEG &aSeg, bool aStart=true)
Find the intersection between a given segment and polygon outline.
void SetOverrideText(const wxString &aValue)
wxString GetValueText() const
void ChangePrefix(const wxString &aPrefix)
wxString m_prefix
String prepended to the value.
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
void ChangeUnitsFormat(const DIM_UNITS_FORMAT aFormat)
void ChangeSuppressZeroes(bool aSuppress)
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
virtual void Mirror(const VECTOR2I &axis_pos, bool aMirrorLeftRight=false)
Mirror the dimension relative to a given horizontal axis.
bool GetOverrideTextEnabled() const
void SetUnitsMode(DIM_UNITS_MODE aMode)
int m_arrowLength
Length of arrow shapes.
virtual const VECTOR2I & GetEnd() const
VECTOR2I m_end
Internal cache of drawn shapes.
void ChangeUnitsMode(DIM_UNITS_MODE aMode)
VECTOR2I GetPosition() const override
For better understanding of the points that make a dimension:
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
int m_height
Perpendicular distance from features to crossbar.
void ChangeExtensionHeight(int aHeight)
void updateText() override
Update the text field value from the current geometry (called by updateGeometry normally).
VECTOR2I m_crossBarStart
Crossbar start control point.
void UpdateHeight(const VECTOR2I &aCrossbarStart, const VECTOR2I &aCrossbarEnd)
Update the stored height basing on points coordinates.
virtual void swapData(BOARD_ITEM *aImage) override
PCB_DIM_ALIGNED(BOARD_ITEM *aParent, KICAD_T aType)
int m_extensionHeight
Length of extension lines past the crossbar.
VECTOR2I m_crossBarEnd
Crossbar end control point.
void Mirror(const VECTOR2I &axis_pos, bool aMirrorLeftRight=false) override
Mirror the dimension relative to a given horizontal axis.
void ChangeHeight(int aHeight)
void updateGeometry() override
Update the cached geometry of the dimension after changing any of its properties.
int GetExtensionHeight() const
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
Mark the center of a circle or arc with a cross shape.
PCB_DIM_CENTER(BOARD_ITEM *aParent, bool aInFP=false)
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
void updateGeometry() override
Update the cached geometry of the dimension after changing any of its properties.
const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
virtual void swapData(BOARD_ITEM *aImage) override
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
A leader is a dimension-like object pointing to a specific point.
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
DIM_TEXT_BORDER m_textBorder
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
DIM_TEXT_BORDER GetTextBorder() const
virtual void swapData(BOARD_ITEM *aImage) override
PCB_DIM_LEADER(BOARD_ITEM *aParent, bool aInFP=false)
void updateGeometry() override
Update the cached geometry of the dimension after changing any of its properties.
void updateText() override
Update the text field value from the current geometry (called by updateGeometry normally).
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
void ChangeTextBorder(DIM_TEXT_BORDER aBorder)
An orthogonal dimension is like an aligned dimension, but the extension lines are locked to the X or ...
PCB_DIM_ORTHOGONAL(BOARD_ITEM *aParent, bool aInFP=false)
void swapData(BOARD_ITEM *aImage) override
void updateText() override
Update the text field value from the current geometry (called by updateGeometry normally).
void updateGeometry() override
Update the cached geometry of the dimension after changing any of its properties.
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
DIR m_orientation
What axis to lock the dimension line to.
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
A radial dimension indicates either the radius or diameter of an arc or circle.
int GetLeaderLength() const
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
void updateText() override
Update the text field value from the current geometry (called by updateGeometry normally).
virtual void swapData(BOARD_ITEM *aImage) override
void updateGeometry() override
Update the cached geometry of the dimension after changing any of its properties.
void ChangeLeaderLength(int aLength)
PCB_DIM_RADIAL(BOARD_ITEM *aParent, bool aInFP=false)
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
wxString GetShownText(int aDepth=0, bool aAllowExtraText=true) const override
Return the string actually shown after processing of the base text.
bool TextHitTest(const VECTOR2I &aPoint, int aAccuracy=0) const override
Test if aPoint is within the bounds of this object.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
Provide class metadata.Helper macro to map type hashes to names.
void InheritsAfter(TYPE_ID aDerived, TYPE_ID aBase)
Declare an inheritance relationship between types.
static PROPERTY_MANAGER & Instance()
PROPERTY_BASE & AddProperty(PROPERTY_BASE *aProperty, const wxString &aGroup=wxEmptyString)
Register a property.
void OverrideAvailability(TYPE_ID aDerived, TYPE_ID aBase, const wxString &aName, std::function< bool(INSPECTABLE *)> aFunc)
Sets an override availability functor for a base class property of a given derived class.
void AddTypeCast(TYPE_CAST_BASE *aCast)
Register a type converter.
const VECTOR2I GetCenter() const
Base class for iterating over all segments in a given SHAPE_POLY_SET.
Represent a set of closed polygons.
void Rotate(const EDA_ANGLE &aAngle, const VECTOR2I &aCenter={ 0, 0 }) override
Rotate all vertices by a given angle.
int Append(int x, int y, int aOutline=-1, int aHole=-1, bool aAllowDuplication=false)
Add a new vertex to the contour indexed by aOutline and aHole (defaults to the outline of the last po...
int NewOutline()
Creates a new hole in a given outline.
SEGMENT_ITERATOR IterateSegments(int aFirst, int aLast, bool aIterateHoles=false)
Return an iterator object, for iterating between aFirst and aLast outline, with or without holes (def...
CONST_SEGMENT_ITERATOR CIterateSegments(int aFirst, int aLast, bool aIterateHoles=false) const
Return an iterator object, for iterating aPolygonIdx-th polygon edges.
bool Contains(const VECTOR2I &aP, int aSubpolyIndex=-1, int aAccuracy=0, bool aUseBBoxCaches=false) const
Return true if a given subpolygon contains the point aP.
const SEG & GetSeg() const
wxString MessageTextFromValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
A lower-precision version of StringFromValue().
void SetUserUnits(EDA_UNITS aUnits)
T EuclideanNorm() const
Compute the Euclidean norm of the vector, which is defined as sqrt(x ** 2 + y ** 2).
extended_type Cross(const VECTOR2< T > &aVector) const
Compute cross product of self with aVector.
VECTOR2< T > Resize(T aNewLength) const
Return a vector of the same direction, but length specified in aNewLength.
void TransformCircleToPolygon(SHAPE_LINE_CHAIN &aBuffer, const VECTOR2I &aCenter, int aRadius, int aError, ERROR_LOC aErrorLoc, int aMinSegCount=0)
Convert a circle to a polygon, using multiple straight lines.
void TransformOvalToPolygon(SHAPE_POLY_SET &aBuffer, const VECTOR2I &aStart, const VECTOR2I &aEnd, int aWidth, int aError, ERROR_LOC aErrorLoc, int aMinSegCount=0)
Convert a oblong shape to a polygon, using multiple segments.
static constexpr EDA_ANGLE & ANGLE_180
static constexpr EDA_ANGLE & ANGLE_HORIZONTAL
static constexpr EDA_ANGLE & ANGLE_VERTICAL
static constexpr EDA_ANGLE & ANGLE_45
static constexpr EDA_ANGLE & FULL_CIRCLE
static constexpr EDA_ANGLE & ANGLE_90
static constexpr EDA_ANGLE & ANGLE_270
static constexpr EDA_ANGLE & ANGLE_135
#define PCB_EDIT_FRAME_NAME
ERROR_LOC
When approximating an arc or circle, should the error be placed on the outside or inside of the curve...
FLASHING
Enum used during connectivity building to ensure we do not query connectivity while building the data...
PCB_LAYER_ID
A quick note on layer IDs:
PCB_LAYER_ID FlipLayer(PCB_LAYER_ID aLayerId, int aCopperLayersCount)
double ToUserUnit(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnit, double aValue)
Function To_User_Unit convert aValue in internal units to the appropriate user units defined by aUnit...
wxString GetText(EDA_UNITS aUnits, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Get the units string for a given units type.
wxString GetLabel(EDA_UNITS aUnits, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Get the units string for a given units type.
static DIRECTION_45::AngleType angle(const VECTOR2I &a, const VECTOR2I &b)
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
static struct LEADER_DIMENSION_DESC LEADER_DIMENSION_DESC
static struct ORTHOGONAL_DIMENSION_DESC ORTHOGONAL_DIMENSION_DESC
static const EDA_ANGLE s_arrowAngle(27.5, DEGREES_T)
static struct CENTER_DIMENSION_DESC CENTER_DIMENSION_DESC
static struct DIMENSION_DESC _DIMENSION_DESC
static struct RADIAL_DIMENSION_DESC RADIAL_DIMENSION_DESC
static struct ALIGNED_DIMENSION_DESC ALIGNED_DIMENSION_DESC
DIM_TEXT_POSITION
Where to place the text on a dimension.
@ OUTSIDE
Text appears outside the dimension line (default)
@ INLINE
Text appears in line with the dimension line.
DIM_UNITS_FORMAT
How to display the units in a dimension's text.
DIM_UNITS_MODE
Used for storing the units selection in the file because EDA_UNITS alone doesn't cut it.
DIM_TEXT_BORDER
Frame to show around dimension text.
#define ENUM_TO_WXANY(type)
Macro to define read-only fields (no setter method available)
@ PT_SIZE
Size expressed in distance units (mm/inch)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
std::optional< VECTOR2I > OPT_VECTOR2I
ORTHOGONAL_DIMENSION_DESC()
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
@ PCB_DIM_ORTHOGONAL_T
class PCB_DIM_ORTHOGONAL, a linear dimension constrained to x/y
@ PCB_DIM_LEADER_T
class PCB_DIM_LEADER, a leader dimension (graphic item)
@ PCB_DIM_CENTER_T
class PCB_DIM_CENTER, a center point marking (graphic item)
@ PCB_FP_DIM_CENTER_T
class PCB_DIM_CENTER, a center point marking (graphic item)
@ PCB_FP_DIM_ORTHOGONAL_T
class PCB_DIM_ORTHOGONAL, a linear dimension constrained to x/y
@ PCB_FP_DIM_LEADER_T
class PCB_DIM_LEADER, a leader dimension (graphic item)
@ PCB_FP_DIM_RADIAL_T
class PCB_DIM_RADIAL, a radius or diameter dimension
@ PCB_DIM_RADIAL_T
class PCB_DIM_RADIAL, a radius or diameter dimension
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".