From 46f9fba0abc4076a6b464bb2133565a5e66dabd5 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Fri, 11 Jul 2025 23:56:40 +0200 Subject: [PATCH] Generalizing fill tool code --- src/db/db/dbFillTool.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/db/db/dbFillTool.cc b/src/db/db/dbFillTool.cc index f6534abdf..50fa34cfe 100644 --- a/src/db/db/dbFillTool.cc +++ b/src/db/db/dbFillTool.cc @@ -84,7 +84,9 @@ public: db::Box fp_bbox = fp.box (); // compensate for distortion by sheared kernel - fp_bbox.enlarge (db::Vector (std::abs (db::Coord (m_column_step.x () * m_column_steps)), std::abs (db::Coord (m_row_step.y () * m_row_steps)))); + db::Coord ex = std::max (std::abs (db::Coord (m_column_step.x () * m_column_steps)), std::abs (db::Coord (m_row_step.x () * m_row_steps))); + db::Coord ey = std::max (std::abs (db::Coord (m_column_step.y () * m_column_steps)), std::abs (db::Coord (m_row_step.y () * m_row_steps))); + fp_bbox.enlarge (db::Vector (ex, ey)); int columns_per_rows = (int (m_row_steps) * m_row_step.y ()) / dy; int rows_per_columns = (int (m_column_steps) * m_column_step.x ()) / dx;