83 aOvl->
Rectangle( lbl.m_bbox.GetOrigin(), lbl.m_bbox.GetEnd() );
86 aOvl->
Line( lbl.m_target, nearest );
97 int bestDist = INT_MAX;
100 for(
int i = 0; i < 4; i++ )
104 if( dist < bestDist )
125 int bestDist = INT_MAX;
131 for(
int i = 0; i < 4; i++ )
141 for(
int j = 0; j < 4; j++ )
150 if( dist < bestDist )
168 while( iterLimit > 0 )
170 bool collisionsFound =
false;
172 for(
int i = 0; i <
m_labels.size(); i++ )
174 for(
int j = 0; j <
m_labels.size(); j++ )
182 bb_i.Inflate( 100000 );
183 bb_j.Inflate( 100000 );
189 collisionsFound =
true;
194 if( !collisionsFound )
void SetOrigin(const Vec &pos)
BOX2< Vec > & Normalize()
Ensure that the height and width are positive.
const Vec & GetPosition() const
bool Intersects(const BOX2< Vec > &aRect) const
coord_type GetHeight() const
coord_type GetWidth() const
void Move(const Vec &aMoveVector)
Move the rectangle by the aMoveVector.
void SetSize(const Vec &size)
bool Contains(const Vec &aPoint) const
FONT is an abstract base class for both outline and stroke fonts.
static FONT * GetFont(const wxString &aFontName=wxEmptyString, bool aBold=false, bool aItalic=false)
VECTOR2I StringBoundaryLimits(const wxString &aText, const VECTOR2I &aSize, int aThickness, bool aBold, bool aItalic) const
Compute the boundary limits of aText (the bounding box of all shapes).
A color representation with 4 components: red, green, blue, alpha.
Abstract interface for drawing on a 2D-surface.
void SetGlyphSize(const VECTOR2I aSize)
void SetLineWidth(double aLineWidth)
void Rectangle(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
void BitmapText(const wxString &aText, const VECTOR2I &aPosition, const EDA_ANGLE &aAngle)
void SetIsFill(bool aIsFillEnabled)
void Line(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
void SetIsStroke(bool aIsStrokeEnabled)
void SetStrokeColor(const COLOR4D &aColor)
VECTOR2I boxMtv(BOX2I b1, BOX2I b2)
std::vector< LABEL > m_labels
void Add(VECTOR2I target, wxString msg, KIGFX::COLOR4D color)
void Redraw(KIGFX::VIEW_OVERLAY *aOvl)
LABEL_MANAGER(KIGFX::GAL *aGal)
VECTOR2I nearestBoxCorner(BOX2I b, VECTOR2I p)
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
int PointCount() const
Return the number of points (vertices) in this line chain.
const VECTOR2I & CPoint(int aIndex) const
Return a reference to a given point in the line chain.
An 8 bit string that is assuredly encoded in UTF8, and supplies special conversion support to and fro...
T EuclideanNorm() const
Compute the Euclidean norm of the vector, which is defined as sqrt(x ** 2 + y ** 2).
static constexpr EDA_ANGLE & ANGLE_HORIZONTAL
double EuclideanNorm(const VECTOR2I &vector)
VECTOR2< double > VECTOR2D