Loading pcbnew/class_dimension.cpp +19 −0 Original line number Diff line number Diff line Loading @@ -468,6 +468,15 @@ EDA_RECT DIMENSION::GetBoundingBox() const ymax = std::max( ymax, m_featureLineGO.y ); ymax = std::max( ymax, m_featureLineGF.y ); xmin = std::min( xmin, m_featureLineDO.x ); xmin = std::min( xmin, m_featureLineDF.x ); ymin = std::min( ymin, m_featureLineDO.y ); ymin = std::min( ymin, m_featureLineDF.y ); xmax = std::max( xmax, m_featureLineDO.x ); xmax = std::max( xmax, m_featureLineDF.x ); ymax = std::max( ymax, m_featureLineDO.y ); ymax = std::max( ymax, m_featureLineDF.y ); bBox.SetX( xmin ); bBox.SetY( ymin ); bBox.SetWidth( xmax - xmin + 1 ); Loading @@ -489,6 +498,16 @@ wxString DIMENSION::GetSelectMenuText() const } const BOX2I DIMENSION::ViewBBox() const { BOX2I dimBBox = BOX2I( VECTOR2I( GetBoundingBox().GetPosition() ), VECTOR2I( GetBoundingBox().GetSize() ) ); dimBBox.Merge( m_Text.ViewBBox() ); return dimBBox; } void DIMENSION::ViewGetLayers( int aLayers[], int& aCount ) const { // Layer that simply displays the text Loading pcbnew/class_dimension.h +3 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,9 @@ public: EDA_ITEM* Clone() const; /// @copydoc VIEW_ITEM::ViewBBox() virtual const BOX2I ViewBBox() const; /// @copydoc VIEW_ITEM::ViewGetLayers() virtual void ViewGetLayers( int aLayers[], int& aCount ) const; Loading Loading
pcbnew/class_dimension.cpp +19 −0 Original line number Diff line number Diff line Loading @@ -468,6 +468,15 @@ EDA_RECT DIMENSION::GetBoundingBox() const ymax = std::max( ymax, m_featureLineGO.y ); ymax = std::max( ymax, m_featureLineGF.y ); xmin = std::min( xmin, m_featureLineDO.x ); xmin = std::min( xmin, m_featureLineDF.x ); ymin = std::min( ymin, m_featureLineDO.y ); ymin = std::min( ymin, m_featureLineDF.y ); xmax = std::max( xmax, m_featureLineDO.x ); xmax = std::max( xmax, m_featureLineDF.x ); ymax = std::max( ymax, m_featureLineDO.y ); ymax = std::max( ymax, m_featureLineDF.y ); bBox.SetX( xmin ); bBox.SetY( ymin ); bBox.SetWidth( xmax - xmin + 1 ); Loading @@ -489,6 +498,16 @@ wxString DIMENSION::GetSelectMenuText() const } const BOX2I DIMENSION::ViewBBox() const { BOX2I dimBBox = BOX2I( VECTOR2I( GetBoundingBox().GetPosition() ), VECTOR2I( GetBoundingBox().GetSize() ) ); dimBBox.Merge( m_Text.ViewBBox() ); return dimBBox; } void DIMENSION::ViewGetLayers( int aLayers[], int& aCount ) const { // Layer that simply displays the text Loading
pcbnew/class_dimension.h +3 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,9 @@ public: EDA_ITEM* Clone() const; /// @copydoc VIEW_ITEM::ViewBBox() virtual const BOX2I ViewBBox() const; /// @copydoc VIEW_ITEM::ViewGetLayers() virtual void ViewGetLayers( int aLayers[], int& aCount ) const; Loading