Switch preview items to use abstract render settings
This commit is contained in:
parent
7a1ced7883
commit
e675a93b92
|
@ -28,7 +28,6 @@
|
|||
|
||||
#include <gal/graphics_abstraction_layer.h>
|
||||
#include <view/view.h>
|
||||
#include <pcb_painter.h>
|
||||
|
||||
#include <common.h>
|
||||
#include <base_units.h>
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
#include <preview_items/preview_utils.h>
|
||||
|
||||
#include <gal/graphics_abstraction_layer.h>
|
||||
#include <painter.h>
|
||||
#include <view/view.h>
|
||||
#include <pcb_painter.h>
|
||||
|
||||
using namespace KIGFX::PREVIEW;
|
||||
|
||||
|
@ -58,7 +58,7 @@ void POLYGON_ITEM::SetPoints( const SHAPE_LINE_CHAIN& aLockedInPts,
|
|||
void POLYGON_ITEM::drawPreviewShape( KIGFX::VIEW* aView ) const
|
||||
{
|
||||
auto& gal = *aView->GetGAL();
|
||||
auto rs = static_cast<KIGFX::PCB_RENDER_SETTINGS*>( aView->GetPainter()->GetSettings() );
|
||||
auto rs = aView->GetPainter()->GetSettings();
|
||||
|
||||
gal.DrawPolyline( m_lockedChain );
|
||||
gal.DrawPolygon( m_polyfill );
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <preview_items/preview_utils.h>
|
||||
#include <gal/graphics_abstraction_layer.h>
|
||||
#include <base_units.h>
|
||||
#include <pcb_painter.h>
|
||||
#include <painter.h>
|
||||
#include <view/view.h>
|
||||
|
||||
double KIGFX::PREVIEW::PreviewOverlayDeemphAlpha( bool aDeemph )
|
||||
|
@ -99,7 +99,7 @@ void KIGFX::PREVIEW::DrawTextNextToCursor( KIGFX::VIEW* aView,
|
|||
{
|
||||
auto gal = aView->GetGAL();
|
||||
auto glyphSize = gal->GetGlyphSize();
|
||||
auto rs = static_cast<KIGFX::PCB_RENDER_SETTINGS*>( aView->GetPainter()->GetSettings() );
|
||||
auto rs = aView->GetPainter()->GetSettings();
|
||||
|
||||
const auto lineSpace = glyphSize.y * 0.2;
|
||||
auto linePitch = glyphSize.y + lineSpace;
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
#include <preview_items/preview_utils.h>
|
||||
#include <gal/graphics_abstraction_layer.h>
|
||||
#include <layers_id_colors_and_visibility.h>
|
||||
#include <painter.h>
|
||||
#include <view/view.h>
|
||||
#include <pcb_painter.h>
|
||||
|
||||
#include <base_units.h>
|
||||
#include <common.h>
|
||||
|
@ -122,7 +122,7 @@ void drawTicksAlongLine( KIGFX::VIEW *aView, const VECTOR2D& aOrigin,
|
|||
auto gal = aView->GetGAL();
|
||||
double tickSpace;
|
||||
TICK_FORMAT tickF = getTickFormatForScale( gal->GetWorldScale(), tickSpace, aUnits );
|
||||
auto rs = static_cast<KIGFX::PCB_RENDER_SETTINGS*>( aView->GetPainter()->GetSettings() );
|
||||
auto rs = aView->GetPainter()->GetSettings();
|
||||
|
||||
// number of ticks in whole ruler
|
||||
int numTicks = (int) std::ceil( aLine.EuclideanNorm() / tickSpace );
|
||||
|
@ -226,7 +226,7 @@ void RULER_ITEM::ViewGetLayers( int aLayers[], int& aCount ) const
|
|||
void RULER_ITEM::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const
|
||||
{
|
||||
auto& gal = *aView->GetGAL();
|
||||
auto rs = static_cast<KIGFX::RENDER_SETTINGS*>( aView->GetPainter()->GetSettings() );
|
||||
auto rs = aView->GetPainter()->GetSettings();
|
||||
|
||||
VECTOR2D origin = m_geomMgr.GetOrigin();
|
||||
VECTOR2D end = m_geomMgr.GetEnd();
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
#include <preview_items/selection_area.h>
|
||||
|
||||
#include <gal/graphics_abstraction_layer.h>
|
||||
#include <painter.h>
|
||||
#include <view/view.h>
|
||||
#include <pcb_painter.h>
|
||||
|
||||
using namespace KIGFX::PREVIEW;
|
||||
|
||||
|
|
Loading…
Reference in New Issue