43    return ( aPoint.
x > topLeft.
x && aPoint.
y > topLeft.
y &&
 
   44             aPoint.
x < bottomRight.
x && aPoint.
y < bottomRight.
y );
 
 
   66            if( point.WithinPoint( aLocation, size ) )
 
   73        if( line.WithinPoint( aLocation, size ) )
 
 
   87        if( idx >= aPointIdx )
 
 
  101        if( idx >= aPointIdx )
 
 
  113        if( idx + 1 == aPointIdx )
 
  117        if( idx > aPointIdx )
 
  121    return ( aPointIdx == 0 );
 
 
  129        if( idx == aPointIdx )
 
  133        if( idx > aPointIdx )
 
  138    return ( aPointIdx == (
int) 
m_points.size() - 1 );
 
 
  144    for( 
unsigned int i = 0; i < 
m_points.size(); ++i )
 
 
  164    for( 
unsigned int i = 0; i < 
m_lines.size(); ++i )
 
 
  181    for( 
unsigned int i = 0; i < 
m_points.size(); ++i )
 
 
  201    for( 
unsigned int i = 0; i < 
m_lines.size(); ++i )
 
 
  230            box.
Merge( point.GetPosition() );
 
  234    for( 
const auto& line : 
m_lines )
 
  238            box.
SetOrigin( line.GetOrigin().GetPosition() );
 
  239            box.
SetEnd( line.GetEnd().GetPosition() );
 
  244            box.
Merge( line.GetOrigin().GetPosition() );
 
  245            box.
Merge( line.GetEnd().GetPosition() );
 
 
  269    if( brightness > 0.5 )
 
  274    else if( brightness > 0.2 )
 
  297            [&]( 
const EDIT_POINT& aPoint, 
bool aDrawCircle = false )
 
  319        drawPoint( point, point.DrawCircle() );
 
  323        if( line.HasCenterPoint() )
 
  325            drawPoint( line.GetPosition(), 
true );
 
  328        if( line.DrawLine() )
 
  332            gal->
DrawLine( line.GetOrigin().GetPosition(), line.GetEnd().GetPosition() );
 
 
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
 
constexpr void SetOrigin(const Vec &pos)
 
constexpr BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Modify the position and size of the rectangle in order to contain aRect.
 
constexpr void SetEnd(coord_type x, coord_type y)
 
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
 
Represent a line connecting two EDIT_POINTs.
 
bool IsContourStart(int aPointIdx) const
Check if a point with given index is a contour origin.
 
bool m_allowPoints
If false, only allow editing of EDIT_LINES.
 
int GetContourEndIdx(int aPointIdx) const
Return index of the contour finish for a point with given index.
 
virtual const BOX2I ViewBBox() const override
 
EDIT_POINT * Previous(const EDIT_POINT &aPoint, bool aTraverseContours=true)
Return the point that is after the given point in the list.
 
EDIT_POINT * Next(const EDIT_POINT &aPoint, bool aTraverseContours=true)
Return the point that is before the given point in the list.
 
std::deque< EDIT_LINE > m_lines
EDIT_LINEs for modifying m_parent.
 
std::list< int > m_contours
Indices of end contour points.
 
EDIT_POINTS(EDA_ITEM *aParent)
 
bool m_swapY
Parent's Y coords are inverted.
 
bool IsContourEnd(int aPointIdx) const
Check is a point with given index is a contour finish.
 
EDA_ITEM * m_parent
Parent of the EDIT_POINTs.
 
std::deque< EDIT_POINT > m_points
EDIT_POINTs for modifying m_parent.
 
bool m_swapX
Parent's X coords are inverted.
 
EDIT_POINT * FindPoint(const VECTOR2I &aLocation, KIGFX::VIEW *aView)
Return a point that is at given coordinates or NULL if there is no such point.
 
int GetContourStartIdx(int aPointIdx) const
Return index of the contour origin for a point with given index.
 
virtual void ViewDraw(int aLayer, KIGFX::VIEW *aView) const override
 
Represent a single point that can be used for modifying items.
 
static const int HOVER_SIZE
Border size when hovering.
 
static const int POINT_SIZE
Single point size in pixels.
 
virtual VECTOR2I GetPosition() const
Return coordinates of an EDIT_POINT.
 
bool WithinPoint(const VECTOR2I &aPoint, unsigned int aSize) const
Check if given point is within a square centered in the EDIT_POINT position.
 
static const int BORDER_SIZE
Border size when not hovering.
 
A color representation with 4 components: red, green, blue, alpha.
 
COLOR4D WithAlpha(double aAlpha) const
Return a color with the same color, but the given alpha.
 
COLOR4D & Invert()
Makes the color inverted, alpha remains the same.
 
COLOR4D Darkened(double aFactor) const
Return a color that is darker by a given factor, without modifying object.
 
double GetBrightness() const
Returns the brightness value of the color ranged from 0.0 to 1.0.
 
COLOR4D Brightened(double aFactor) const
Return a color that is brighter by a given factor, without modifying object.
 
double Distance(const COLOR4D &other) const
Returns the distance (in RGB space) between two colors.
 
Attribute save/restore for GAL attributes.
 
Abstract interface for drawing on a 2D-surface.
 
virtual void SetLayerDepth(double aLayerDepth)
Set the depth of the layer (position on the z-axis)
 
virtual void SetIsFill(bool aIsFillEnabled)
Enable/disable fill.
 
virtual void DrawRectangle(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
Draw a rectangle.
 
virtual void SetFillColor(const COLOR4D &aColor)
Set the fill color.
 
virtual void DrawCircle(const VECTOR2D &aCenterPoint, double aRadius)
Draw a circle using world coordinates.
 
virtual void SetLineWidth(float aLineWidth)
Set the line width.
 
virtual void SetStrokeColor(const COLOR4D &aColor)
Set the stroke color.
 
virtual void SetIsStroke(bool aIsStrokeEnabled)
Enable/disable stroked outlines.
 
virtual void DrawLine(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
Draw a line.
 
const COLOR4D & GetClearColor() const
 
double GetMinDepth() const
 
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
 
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
 
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
 
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
 
GAL * GetGAL() const
Return the GAL this view is using to draw graphical primitives.
 
VECTOR2D ToWorld(const VECTOR2D &aCoord, bool aAbsolute=true) const
Converts a screen space point/vector to a point/vector in world space coordinates.
 
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
 
static bool empty(const wxTextEntryBase *aCtrl)
 
@ LAYER_AUX_ITEMS
Auxiliary items (guides, rule, etc).
 
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
 
@ NOT_USED
the 3d code uses this value
 
VECTOR2< int32_t > VECTOR2I