61 return wxColour( 0, 0, 0, 30 );
63 return wxColour( 238, 243, 243 );
70 return wxColour( 238, 243, 243, 60 );
72 return wxColour( 84, 84, 84, 40 );
89 m_gal->SetLineWidth( 0 );
90 m_gal->SetIsFill(
true );
91 m_gal->SetIsStroke(
false );
104 const wxPoint& aPosition,
const wxSize& aSize,
GAL_TYPE aGalType ) :
105 PCB_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, wxDefaultSize, aOptions, aGalType ),
109 m_view->UseDrawPriority(
true );
124 ShowScrollbars( wxSHOW_SB_NEVER, wxSHOW_SB_NEVER );
133 BOX2I area = aBoardEdgesOnly ?
m_pcb->GetBoardEdgesBoundingBox() :
m_pcb->GetBoundingBox();
139 area.
SetEnd( pageSize.x, pageSize.y );
168 const wxSize clientSize = GetSize();
175 double scale =
m_view->GetScale() / std::max( fabs( vsize.
x / screenSize.
x ), fabs( vsize.
y / screenSize.
y ) );
177 if( !std::isfinite(
scale ) )
BASE_SCREEN class implementation.
constexpr EDA_IU_SCALE pcbIUScale
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
Information pertinent to a Pcbnew printed circuit board.
constexpr void SetOrigin(const Vec &pos)
constexpr size_type GetWidth() const
constexpr Vec Centre() const
constexpr size_type GetHeight() const
constexpr const SizeVec & GetSize() const
constexpr void SetEnd(coord_type x, coord_type y)
std::unique_ptr< KIGFX::PAINTER > m_painter
Contains information about how to draw items using GAL.
KIGFX::GAL * m_gal
Interface for drawing objects on a 2D-surface.
KIGFX::VIEW * m_view
Stores view settings (scale, center, etc.) and items to be drawn.
void RequestRefresh()
Make sure a refresh gets done on the next idle event if it hasn't already.
void StartDrawing()
Begin drawing if it was stopped previously.
GAL * m_gal
Instance of graphic abstraction layer that gives an interface to call commands used to draw (eg.
Contains methods for drawing PCB-specific items.
PCB_PAINTER(GAL *aGal, FRAME_T aFrameType)
virtual bool Draw(const VIEW_ITEM *aItem, int aLayer) override
Takes an instance of VIEW_ITEM and passes it to a function that knows how to draw the item.
An abstract base class for deriving all objects that can be added to a VIEW.
void UpdateColors()
Update the color settings in the painter and GAL.
PCB_DRAW_PANEL_GAL(wxWindow *aParentWindow, wxWindowID aWindowId, const wxPoint &aPosition, const wxSize &aSize, KIGFX::GAL_DISPLAY_OPTIONS &aOptions, GAL_TYPE aGalType=GAL_TYPE_OPENGL)
BOX2I GetDefaultViewBBox() const override
Return the bounding box of the view that should be used if model is not valid.
bool Draw(const KIGFX::VIEW_ITEM *aItem, int aLayer) override
const wxSize GetPageSizeIU() const
std::unique_ptr< BOARD_EDGES_BOUNDING_ITEM > m_pcb_bounding_box
ZONE_PREVIEW_CANVAS(BOARD *aPcb, ZONE *aZone, PCB_LAYER_ID aLayer, wxWindow *aParentWindow, KIGFX::GAL_DISPLAY_OPTIONS &aOptions, wxWindowID aWindowId=0, const wxPoint &aPosition=wxDefaultPosition, const wxSize &aSize=wxDefaultSize, GAL_TYPE aGalType=GAL_TYPE_OPENGL)
BOX2I GetBoardBoundingBox(bool aBoardEdgesOnly) const
const BOX2I GetDocumentExtents(bool aIncludeAllVisible=true) const
Handle a list of polygons defining a copper zone.
@ FRAME_FOOTPRINT_PREVIEW
PCB_LAYER_ID
A quick note on layer IDs:
void Refresh()
Update the board display after modifying it by a python script (note: it is automatically called by a...
VECTOR2< double > VECTOR2D
@ DRAW_ORDER_BOARD_BOUNDING
wxColour getBoundBoundingFillColor()
wxColour getCanvasBackgroundColor()