diff --git a/common/preview_items/arc_assistant.cpp b/common/preview_items/arc_assistant.cpp index 9f31722b61..441699bffa 100644 --- a/common/preview_items/arc_assistant.cpp +++ b/common/preview_items/arc_assistant.cpp @@ -119,6 +119,8 @@ static void drawArcWithHilight( KIGFX::VIEW *aView, if( angleIsSpecial( aStartAngle - aEndAngle ) ) color = rs->IsBackgroundDark() ? COLOR4D( 0.5, 1.0, 0.5, 1.0 ) : COLOR4D( 0.0, 0.7, 0.0, 1.0 ) ; + gal->SetIsStroke( true ); + gal->SetIsFill( true ); gal->SetStrokeColor( color ); gal->SetFillColor( color.WithAlpha( 0.2 ) ); @@ -127,6 +129,20 @@ static void drawArcWithHilight( KIGFX::VIEW *aView, } +static void drawCircleGuide( KIGFX::VIEW* aView, const VECTOR2I& aOrigin, double aRad ) +{ + auto gal = aView->GetGAL(); + auto rs = static_cast( aView->GetPainter()->GetSettings() ); + + auto color = rs->GetLayerColor( LAYER_AUX_ITEMS ); + + gal->SetStrokeColor( color.WithAlpha( PreviewOverlayDeemphAlpha( true ) ) ); + gal->SetIsStroke( true ); + gal->SetIsFill( false ); + gal->DrawCircle( aOrigin, aRad ); +} + + void ARC_ASSISTANT::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const { auto& gal = *aView->GetGAL(); @@ -171,6 +187,9 @@ void ARC_ASSISTANT::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const // draw the angle reference arc drawArcWithHilight( aView, origin, innerRad, initAngle, 0.0 ); + // draw the radius guide circle + drawCircleGuide( aView, origin, m_constructMan.GetRadius() ); + double degs = getNormDeciDegFromRad( initAngle ); cursorStrings.push_back( DimensionLabel( "r", m_constructMan.GetRadius(), m_units ) );