63 const wxPoint& aPosition,
const wxSize& aSize,
GAL_TYPE aGalType ) :
76 ShowScrollbars( wxSHOW_SB_NEVER, wxSHOW_SB_NEVER );
78 m_painter->GetSettings()->SetBackgroundColor(
95 area.
SetEnd( pageSize.x, pageSize.y );
148 return wxSize( sizeIU.
x, sizeIU.
y );
157 const wxSize clientSize = GetSize();
159 VECTOR2D(
static_cast<double>( clientSize.x ),
static_cast<double>( clientSize.y ) ),
167 / std::max( fabs( vsize.
x / screenSize.
x ), fabs( vsize.
y / screenSize.
y ) );
169 if( !std::isfinite(
scale ) )
BASE_SCREEN class implementation.
constexpr EDA_IU_SCALE pcbIUScale
Information pertinent to a Pcbnew printed circuit board.
const BOX2I GetBoardEdgesBoundingBox() const
Return the board bounding box calculated using exclusively the board edges (graphics on Edge....
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
const PAGE_INFO & GetPageSettings() const
bool IsLayerVisible(PCB_LAYER_ID aLayer) const
A proxy function that calls the correspondent function in m_BoardSettings tests whether a given layer...
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 StartDrawing()
Begin drawing if it was stopped previously.
virtual void SetScale(double aScale, VECTOR2D aAnchor={ 0, 0 })
Set the scaling factor, zooming around a given anchor point.
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1)
Add a VIEW_ITEM to the view.
virtual void Remove(VIEW_ITEM *aItem)
Remove a VIEW_ITEM from the view.
void SetPainter(PAINTER *aPainter)
Set the painter object used by the view for drawing #VIEW_ITEMS.
void SetLayerVisible(int aLayer, bool aVisible=true)
Control the visibility of a particular layer.
VECTOR2D ToWorld(const VECTOR2D &aCoord, bool aAbsolute=true) const
Converts a screen space point/vector to a point/vector in world space coordinates.
void UseDrawPriority(bool aFlag)
void SetCenter(const VECTOR2D &aCenter)
Set the center point of the VIEW (i.e.
const VECTOR2D GetSizeIU(double aIUScale) const
Gets the page size in internal units.
const BOX2I GetDocumentExtents(bool aIncludeAllVisible=true) const
void ActivateSelectedZone(ZONE *aZone) override
BOX2I GetBoardBoundingBox(bool aBoardEdgesOnly) const
PANEL_ZONE_GAL(BOARD *aPcb, wxWindow *aParentWindow, KIGFX::GAL_DISPLAY_OPTIONS &aOptions, wxWindowID aWindowId=0, const wxPoint &aPosition=wxDefaultPosition, const wxSize &aSize=wxDefaultSize, GAL_TYPE aGalType=GAL_TYPE_OPENGL)
const wxSize GetPageSizeIU() const
std::unique_ptr< BOARD_EDGES_BOUNDING_ITEM > m_pcb_bounding_box
bool OnLayerSelected(int aLayer)
Show the zone painting on layer.
~PANEL_ZONE_GAL() override
void UpdateColors()
Update the color settings in the painter and GAL.
BOX2I GetDefaultViewBBox() const override
Return the bounding box of the view that should be used if model is not valid.
static wxColour GetCanvasBackgroundColor()
Handle a list of polygons defining a copper zone.
PCB_LAYER_ID GetFirstLayer() const
@ FRAME_FOOTPRINT_PREVIEW
@ DRAW_ORDER_BOARD_BOUNDING
void Refresh()
Update the board display after modifying it by a python script (note: it is automatically called by a...
VECTOR2< double > VECTOR2D