KiCad PCB EDA Suite
|
#include <view_overlay.h>
Classes | |
struct | COMMAND |
struct | COMMAND_ARC |
struct | COMMAND_BITMAP_TEXT |
struct | COMMAND_CIRCLE |
struct | COMMAND_GLYPH_SIZE |
struct | COMMAND_LINE |
struct | COMMAND_POINT_POLYGON |
struct | COMMAND_POLY_POLYGON |
struct | COMMAND_POLYGON |
struct | COMMAND_RECTANGLE |
struct | COMMAND_SET_COLOR |
struct | COMMAND_SET_FILL |
struct | COMMAND_SET_STROKE |
struct | COMMAND_SET_WIDTH |
Public Member Functions | |
VIEW_OVERLAY () | |
virtual | ~VIEW_OVERLAY () |
void | Clear () |
virtual const BOX2I | ViewBBox () const override |
Return the bounding box of the item covering all its layers. More... | |
virtual void | ViewDraw (int aLayer, VIEW *aView) const override |
Draw the parts of the object belonging to layer aLayer. More... | |
virtual void | ViewGetLayers (int aLayers[], int &aCount) const override |
Return the all the layers within the VIEW the object is painted on. More... | |
void | Line (const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint) |
void | Line (const SEG &aSeg) |
void | Segment (const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint, double aWidth) |
void | Circle (const VECTOR2D &aCenterPoint, double aRadius) |
void | Arc (const VECTOR2D &aCenterPoint, double aRadius, const EDA_ANGLE &aStartAngle, const EDA_ANGLE &aEndAngle) |
void | Rectangle (const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint) |
void | Cross (const VECTOR2D &aP, int aSize) |
void | Polygon (const std::deque< VECTOR2D > &aPointList) |
void | Polygon (const SHAPE_POLY_SET &aPolySet) |
void | Polyline (const SHAPE_LINE_CHAIN &aPolyLine) |
void | Polygon (const VECTOR2D aPointList[], int aListSize) |
void | BitmapText (const wxString &aText, const VECTOR2I &aPosition, const EDA_ANGLE &aAngle) |
void | SetIsFill (bool aIsFillEnabled) |
void | SetIsStroke (bool aIsStrokeEnabled) |
void | SetFillColor (const COLOR4D &aColor) |
void | SetStrokeColor (const COLOR4D &aColor) |
void | SetGlyphSize (const VECTOR2I &aSize) |
void | SetLineWidth (double aLineWidth) |
const COLOR4D & | GetStrokeColor () const |
const COLOR4D & | GetFillColor () const |
virtual double | ViewGetLOD (int aLayer, VIEW *aView) const |
Return the level of detail (LOD) of the item. More... | |
VIEW_ITEM_DATA * | viewPrivData () const |
void | ClearViewPrivData () |
bool | Set (PROPERTY_BASE *aProperty, wxAny &aValue) |
template<typename T > | |
bool | Set (PROPERTY_BASE *aProperty, T aValue) |
template<typename T > | |
bool | Set (const wxString &aProperty, T aValue) |
wxAny | Get (PROPERTY_BASE *aProperty) const |
template<typename T > | |
T | Get (PROPERTY_BASE *aProperty) const |
template<typename T > | |
std::optional< T > | Get (const wxString &aProperty) const |
Private Member Functions | |
void | releaseCommands () |
Private Attributes | |
COLOR4D | m_strokeColor |
COLOR4D | m_fillColor |
std::vector< COMMAND * > | m_commands |
VIEW_ITEM_DATA * | m_viewPrivData |
Definition at line 44 of file view_overlay.h.
KIGFX::VIEW_OVERLAY::VIEW_OVERLAY | ( | ) |
Definition at line 265 of file view_overlay.cpp.
|
virtual |
Definition at line 270 of file view_overlay.cpp.
References releaseCommands().
void KIGFX::VIEW_OVERLAY::Arc | ( | const VECTOR2D & | aCenterPoint, |
double | aRadius, | ||
const EDA_ANGLE & | aStartAngle, | ||
const EDA_ANGLE & | aEndAngle | ||
) |
Definition at line 373 of file view_overlay.cpp.
References m_commands.
Referenced by PNS_LOG_VIEWER_OVERLAY::Arc().
void KIGFX::VIEW_OVERLAY::BitmapText | ( | const wxString & | aText, |
const VECTOR2I & | aPosition, | ||
const EDA_ANGLE & | aAngle | ||
) |
Definition at line 398 of file view_overlay.cpp.
References m_commands.
Referenced by LABEL_MANAGER::Redraw().
void KIGFX::VIEW_OVERLAY::Circle | ( | const VECTOR2D & | aCenterPoint, |
double | aRadius | ||
) |
Definition at line 367 of file view_overlay.cpp.
References m_commands.
void KIGFX::VIEW_OVERLAY::Clear | ( | ) |
Definition at line 285 of file view_overlay.cpp.
References releaseCommands().
|
inlineinherited |
Definition at line 143 of file view_item.h.
References KIGFX::VIEW_ITEM::m_viewPrivData.
Referenced by KIGFX::VIEW::OnDestroy().
void KIGFX::VIEW_OVERLAY::Cross | ( | const VECTOR2D & | aP, |
int | aSize | ||
) |
Definition at line 429 of file view_overlay.cpp.
References Line().
|
inlineinherited |
Definition at line 104 of file inspectable.h.
References PROPERTY_BASE::get(), PROPERTY_MANAGER::GetProperty(), PROPERTY_MANAGER::Instance(), PROPERTY_BASE::OwnerHash(), TYPE_HASH, and PROPERTY_MANAGER::TypeCast().
|
inlineinherited |
Definition at line 84 of file inspectable.h.
References PROPERTY_BASE::getter(), PROPERTY_MANAGER::Instance(), PROPERTY_BASE::OwnerHash(), TYPE_HASH, and PROPERTY_MANAGER::TypeCast().
Referenced by BOOST_AUTO_TEST_CASE(), CLASS_D_DESC::CLASS_D_DESC(), EDA_SHAPE_DESC::EDA_SHAPE_DESC(), PROPERTIES_PANEL::getItemValue(), PCB_EXPR_VAR_REF::GetValue(), and PAD_DESC::PAD_DESC().
|
inlineinherited |
Definition at line 92 of file inspectable.h.
References PROPERTY_BASE::get(), PROPERTY_MANAGER::Instance(), PROPERTY_BASE::OwnerHash(), TYPE_HASH, and PROPERTY_MANAGER::TypeCast().
|
inline |
|
inline |
Definition at line 104 of file view_overlay.h.
References m_strokeColor.
Referenced by PNS_LOG_VIEWER_OVERLAY::AnnotatedPoint(), PNS_LOG_VIEWER_OVERLAY::AnnotatedPolyline(), and PNS_LOG_VIEWER_OVERLAY::Arc().
void KIGFX::VIEW_OVERLAY::Line | ( | const SEG & | aSeg | ) |
Definition at line 320 of file view_overlay.cpp.
References m_commands.
Referenced by PNS_LOG_VIEWER_OVERLAY::AnnotatedPoint(), Cross(), Line(), Polyline(), LABEL_MANAGER::Redraw(), and Segment().
void KIGFX::VIEW_OVERLAY::Polygon | ( | const SHAPE_POLY_SET & | aPolySet | ) |
Definition at line 349 of file view_overlay.cpp.
References m_commands.
void KIGFX::VIEW_OVERLAY::Polygon | ( | const std::deque< VECTOR2D > & | aPointList | ) |
Definition at line 355 of file view_overlay.cpp.
References m_commands.
void KIGFX::VIEW_OVERLAY::Polygon | ( | const VECTOR2D | aPointList[], |
int | aListSize | ||
) |
Definition at line 361 of file view_overlay.cpp.
References m_commands.
void KIGFX::VIEW_OVERLAY::Polyline | ( | const SHAPE_LINE_CHAIN & | aPolyLine | ) |
Definition at line 339 of file view_overlay.cpp.
References SHAPE_LINE_CHAIN::CSegment(), Line(), SHAPE_LINE_CHAIN::SegmentCount(), SetIsFill(), and SetIsStroke().
Referenced by PNS_LOG_VIEWER_OVERLAY::AnnotatedPolyline().
Definition at line 380 of file view_overlay.cpp.
References m_commands.
Referenced by LABEL_MANAGER::Redraw().
|
private |
Definition at line 276 of file view_overlay.cpp.
References m_commands.
Referenced by Clear(), and ~VIEW_OVERLAY().
void KIGFX::VIEW_OVERLAY::Segment | ( | const VECTOR2D & | aStartPoint, |
const VECTOR2D & | aEndPoint, | ||
double | aWidth | ||
) |
Definition at line 332 of file view_overlay.cpp.
References Line(), and SetLineWidth().
|
inlineinherited |
Definition at line 66 of file inspectable.h.
References PROPERTY_MANAGER::GetProperty(), PROPERTY_MANAGER::Instance(), PROPERTY_BASE::OwnerHash(), PROPERTY_BASE::set(), TYPE_HASH, and PROPERTY_MANAGER::TypeCast().
|
inlineinherited |
Definition at line 54 of file inspectable.h.
References PROPERTY_MANAGER::Instance(), PROPERTY_BASE::OwnerHash(), PROPERTY_BASE::set(), TYPE_HASH, and PROPERTY_MANAGER::TypeCast().
|
inlineinherited |
Definition at line 42 of file inspectable.h.
References PROPERTY_MANAGER::Instance(), PROPERTY_BASE::OwnerHash(), PROPERTY_BASE::setter(), TYPE_HASH, and PROPERTY_MANAGER::TypeCast().
Referenced by PCB_PROPERTIES_PANEL::valueChanged().
void KIGFX::VIEW_OVERLAY::SetFillColor | ( | const COLOR4D & | aColor | ) |
Definition at line 411 of file view_overlay.cpp.
References m_commands, and m_fillColor.
void KIGFX::VIEW_OVERLAY::SetGlyphSize | ( | const VECTOR2I & | aSize | ) |
Definition at line 392 of file view_overlay.cpp.
References m_commands.
void KIGFX::VIEW_OVERLAY::SetIsFill | ( | bool | aIsFillEnabled | ) |
Definition at line 386 of file view_overlay.cpp.
References m_commands.
Referenced by Polyline(), and LABEL_MANAGER::Redraw().
void KIGFX::VIEW_OVERLAY::SetIsStroke | ( | bool | aIsStrokeEnabled | ) |
Definition at line 405 of file view_overlay.cpp.
References m_commands.
Referenced by Polyline(), and LABEL_MANAGER::Redraw().
void KIGFX::VIEW_OVERLAY::SetLineWidth | ( | double | aLineWidth | ) |
Definition at line 424 of file view_overlay.cpp.
References m_commands.
Referenced by PNS_LOG_VIEWER_OVERLAY::Arc(), LABEL_MANAGER::Redraw(), and Segment().
void KIGFX::VIEW_OVERLAY::SetStrokeColor | ( | const COLOR4D & | aColor | ) |
Definition at line 418 of file view_overlay.cpp.
References m_commands, and m_strokeColor.
Referenced by PNS_LOG_VIEWER_OVERLAY::Arc(), and LABEL_MANAGER::Redraw().
|
overridevirtual |
Return the bounding box of the item covering all its layers.
Implements KIGFX::VIEW_ITEM.
Definition at line 291 of file view_overlay.cpp.
References BOX2< Vec >::SetMaximum().
|
overridevirtual |
Draw the parts of the object belonging to layer aLayer.
An alternative way for drawing objects if there is no #PAINTER assigned for the view or if the PAINTER doesn't know how to paint this particular implementation of VIEW_ITEM. The preferred way of drawing is to design an appropriate PAINTER object, the method below is intended only for quick hacks and debugging purposes.
aLayer | is the current drawing layer. |
aView | is a pointer to the VIEW device we are drawing on. |
Reimplemented from KIGFX::VIEW_ITEM.
Definition at line 300 of file view_overlay.cpp.
References KIGFX::VIEW::GetGAL(), m_commands, and KIGFX::GAL::PushDepth().
|
overridevirtual |
Return the all the layers within the VIEW the object is painted on.
For instance, a PAD spans zero or more copper layers and a few technical layers. ViewDraw() or PAINTER::Draw() is repeatedly called for each of the layers returned by ViewGetLayers(), depending on the rendering order.
aLayers[] | is the output layer index array. |
aCount | is the number of layer indices in aLayers[]. |
Implements KIGFX::VIEW_ITEM.
Definition at line 313 of file view_overlay.cpp.
References LAYER_GP_OVERLAY.
|
inlinevirtualinherited |
Return the level of detail (LOD) of the item.
A level of detail is the minimal VIEW scale that is sufficient for an item to be shown on a given layer.
aLayer | is the current drawing layer. |
aView | is a pointer to the VIEW device we are drawing on. |
Reimplemented in SCH_LINE, GERBER_DRAW_ITEM, PCB_GROUP, FOOTPRINT, FP_SHAPE, FP_TEXT, FP_TEXTBOX, PAD, PCB_BITMAP, PCB_SHAPE, PCB_TEXT, PCB_TEXTBOX, PCB_TRACK, PCB_VIA, ZONE, and FP_ZONE.
Definition at line 132 of file view_item.h.
Referenced by PNS_KICAD_IFACE::IsItemVisible(), KIGFX::VIEW::DRAW_ITEM_VISITOR::operator()(), EE_GRID_HELPER::queryVisible(), and PCB_GRID_HELPER::queryVisible().
|
inlineinherited |
Definition at line 138 of file view_item.h.
References KIGFX::VIEW_ITEM::m_viewPrivData.
Referenced by KIGFX::VIEW::Add(), KIGFX::VIEW::draw(), KIGFX::VIEW::HasItem(), KIGFX::VIEW::Hide(), KIGFX::VIEW::invalidateItem(), KIGFX::VIEW::IsVisible(), KIGFX::VIEW::OnDestroy(), KIGFX::QUERY_VISITOR< CONTAINER >::operator()(), KIGFX::VIEW::UPDATE_COLOR_VISITOR::operator()(), KIGFX::VIEW::UPDATE_DEPTH_VISITOR::operator()(), KIGFX::VIEW::DRAW_ITEM_VISITOR::operator()(), KIGFX::VIEW::RECACHE_ITEM_VISITOR::operator()(), KIGFX::VIEW::CLEAR_LAYER_CACHE_VISITOR::operator()(), KIGFX::VIEW::Remove(), KIGFX::VIEW::SetVisible(), KIGFX::VIEW::Update(), KIGFX::VIEW::updateItemColor(), KIGFX::VIEW::updateItemGeometry(), and KIGFX::VIEW::updateLayers().
|
private |
Definition at line 113 of file view_overlay.h.
Referenced by Arc(), BitmapText(), Circle(), Line(), Polygon(), Rectangle(), releaseCommands(), SetFillColor(), SetGlyphSize(), SetIsFill(), SetIsStroke(), SetLineWidth(), SetStrokeColor(), and ViewDraw().
|
private |
Definition at line 111 of file view_overlay.h.
Referenced by GetFillColor(), and SetFillColor().
|
private |
Definition at line 110 of file view_overlay.h.
Referenced by GetStrokeColor(), and SetStrokeColor().
|
privateinherited |
Definition at line 151 of file view_item.h.
Referenced by KIGFX::VIEW::Add(), KIGFX::VIEW_ITEM::ClearViewPrivData(), KIGFX::VIEW_ITEM::viewPrivData(), and KIGFX::VIEW_ITEM::~VIEW_ITEM().