Add width/height adjustment to reference image

Allows setting specific width or height on a reference image instead of
just scale

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18567
This commit is contained in:
Seth Hillbrand
2025-08-26 11:22:32 -07:00
parent 2db8c6eca0
commit 29c4d9b197
9 changed files with 524 additions and 12 deletions
+20
View File
@@ -118,6 +118,26 @@ bool PANEL_IMAGE_EDITOR::TransferDataFromWindow()
}
double PANEL_IMAGE_EDITOR::GetScale() const
{
return m_scale.GetDoubleValue();
}
void PANEL_IMAGE_EDITOR::SetScale( double aScale )
{
m_scale.ChangeDoubleValue( aScale );
m_workingImage->SetScale( aScale );
m_panelDraw->Refresh();
}
VECTOR2I PANEL_IMAGE_EDITOR::GetImageSize() const
{
return m_workingImage->GetSize();
}
void PANEL_IMAGE_EDITOR::OnRedrawPanel( wxPaintEvent& event )
{
wxPaintDC dc( m_panelDraw );