summaryrefslogtreecommitdiff
path: root/extensions/source/scanner
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/scanner')
-rw-r--r--extensions/source/scanner/grid.cxx8
-rw-r--r--extensions/source/scanner/sanedlg.cxx32
2 files changed, 20 insertions, 20 deletions
diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx
index f7d08a96a28a..fac5f706ca10 100644
--- a/extensions/source/scanner/grid.cxx
+++ b/extensions/source/scanner/grid.cxx
@@ -60,12 +60,12 @@ class GridWindow : public vcl::Window
bool isHit(vcl::Window& rWin, const Point& rPos)
{
const Point aOffset(rWin.PixelToLogic(Point(mnOffX, mnOffY)));
- const Rectangle aTarget(maPos - aOffset, maPos + aOffset);
+ const tools::Rectangle aTarget(maPos - aOffset, maPos + aOffset);
return aTarget.IsInside(rPos);
}
};
- Rectangle m_aGridArea;
+ tools::Rectangle m_aGridArea;
double m_fMinX;
double m_fMinY;
@@ -132,7 +132,7 @@ public:
void ChangeMode(ResetType nType);
- virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) override;
+ virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect ) override;
};
GridWindow::GridWindow(vcl::Window* pParent)
@@ -528,7 +528,7 @@ void GridWindow::drawHandles(vcl::RenderContext& rRenderContext)
}
}
-void GridWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void GridWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
Window::Paint(rRenderContext, rRect);
drawGrid(rRenderContext);
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index 50033df310a9..cc712b24ccd3 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -52,14 +52,14 @@ void DrawRectangles(vcl::RenderContext& rRenderContext, Point& rUL, Point& rBR)
rRenderContext.DrawLine(aBL, rBR);
rRenderContext.DrawLine(rBR, aUR);
rRenderContext.DrawLine(aUR, rUL);
- rRenderContext.DrawRect(Rectangle(rUL, Size(RECT_SIZE_PIX,RECT_SIZE_PIX)));
- rRenderContext.DrawRect(Rectangle(aBL, Size(RECT_SIZE_PIX, -RECT_SIZE_PIX)));
- rRenderContext.DrawRect(Rectangle(rBR, Size(-RECT_SIZE_PIX, -RECT_SIZE_PIX)));
- rRenderContext.DrawRect(Rectangle(aUR, Size(-RECT_SIZE_PIX, RECT_SIZE_PIX )));
- rRenderContext.DrawRect(Rectangle(Point(nMiddleX - RECT_SIZE_PIX / 2, rUL.Y()), Size(RECT_SIZE_PIX, RECT_SIZE_PIX)));
- rRenderContext.DrawRect(Rectangle(Point(nMiddleX - RECT_SIZE_PIX / 2, rBR.Y()), Size(RECT_SIZE_PIX, -RECT_SIZE_PIX)));
- rRenderContext.DrawRect(Rectangle(Point(rUL.X(), nMiddleY - RECT_SIZE_PIX / 2), Size(RECT_SIZE_PIX, RECT_SIZE_PIX)));
- rRenderContext.DrawRect(Rectangle(Point(rBR.X(), nMiddleY - RECT_SIZE_PIX / 2), Size(-RECT_SIZE_PIX, RECT_SIZE_PIX)));
+ rRenderContext.DrawRect(tools::Rectangle(rUL, Size(RECT_SIZE_PIX,RECT_SIZE_PIX)));
+ rRenderContext.DrawRect(tools::Rectangle(aBL, Size(RECT_SIZE_PIX, -RECT_SIZE_PIX)));
+ rRenderContext.DrawRect(tools::Rectangle(rBR, Size(-RECT_SIZE_PIX, -RECT_SIZE_PIX)));
+ rRenderContext.DrawRect(tools::Rectangle(aUR, Size(-RECT_SIZE_PIX, RECT_SIZE_PIX )));
+ rRenderContext.DrawRect(tools::Rectangle(Point(nMiddleX - RECT_SIZE_PIX / 2, rUL.Y()), Size(RECT_SIZE_PIX, RECT_SIZE_PIX)));
+ rRenderContext.DrawRect(tools::Rectangle(Point(nMiddleX - RECT_SIZE_PIX / 2, rBR.Y()), Size(RECT_SIZE_PIX, -RECT_SIZE_PIX)));
+ rRenderContext.DrawRect(tools::Rectangle(Point(rUL.X(), nMiddleY - RECT_SIZE_PIX / 2), Size(RECT_SIZE_PIX, RECT_SIZE_PIX)));
+ rRenderContext.DrawRect(tools::Rectangle(Point(rBR.X(), nMiddleY - RECT_SIZE_PIX / 2), Size(-RECT_SIZE_PIX, RECT_SIZE_PIX)));
}
}
@@ -71,7 +71,7 @@ private:
BottomLeft, Left };
Bitmap maPreviewBitmap;
- Rectangle maPreviewRect;
+ tools::Rectangle maPreviewRect;
Point maTopLeft, maBottomRight;
Point maMinTopLeft, maMaxBottomRight;
VclPtr<SaneDlg> mpParentDialog;
@@ -129,7 +129,7 @@ public:
return mbDragEnable;
}
- virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override;
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
virtual void MouseButtonDown(const MouseEvent& rMEvt) override;
virtual void MouseMove(const MouseEvent& rMEvt) override;
virtual void MouseButtonUp(const MouseEvent& rMEvt) override;
@@ -175,7 +175,7 @@ public:
{
maTopLeft = GetPixelPos(rTopLeft);
maBottomRight = GetPixelPos(rBottomRight);
- maPreviewRect = Rectangle(maTopLeft,
+ maPreviewRect = tools::Rectangle(maTopLeft,
Size(maBottomRight.X() - maTopLeft.X(),
maBottomRight.Y() - maTopLeft.Y()));
}
@@ -918,7 +918,7 @@ void ScanPreview::UpdatePreviewBounds()
{
if( mbDragEnable )
{
- maPreviewRect = Rectangle( maTopLeft,
+ maPreviewRect = tools::Rectangle( maTopLeft,
Size( maBottomRight.X() - maTopLeft.X(),
maBottomRight.Y() - maTopLeft.Y() )
);
@@ -929,27 +929,27 @@ void ScanPreview::UpdatePreviewBounds()
if( aBMSize.Width() > aBMSize.Height() && aBMSize.Width() )
{
int nVHeight = (maBottomRight.X() - maTopLeft.X()) * aBMSize.Height() / aBMSize.Width();
- maPreviewRect = Rectangle( Point( maTopLeft.X(), ( maTopLeft.Y() + maBottomRight.Y() )/2 - nVHeight/2 ),
+ maPreviewRect = tools::Rectangle( Point( maTopLeft.X(), ( maTopLeft.Y() + maBottomRight.Y() )/2 - nVHeight/2 ),
Size( maBottomRight.X() - maTopLeft.X(),
nVHeight ) );
}
else if (aBMSize.Height())
{
int nVWidth = (maBottomRight.Y() - maTopLeft.Y()) * aBMSize.Width() / aBMSize.Height();
- maPreviewRect = Rectangle( Point( ( maTopLeft.X() + maBottomRight.X() )/2 - nVWidth/2, maTopLeft.Y() ),
+ maPreviewRect = tools::Rectangle( Point( ( maTopLeft.X() + maBottomRight.X() )/2 - nVWidth/2, maTopLeft.Y() ),
Size( nVWidth,
maBottomRight.Y() - maTopLeft.Y() ) );
}
}
}
-void ScanPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void ScanPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
Window::Paint(rRenderContext, rRect);
rRenderContext.SetMapMode(MapUnit::MapAppFont);
rRenderContext.SetFillColor(Color(COL_WHITE));
rRenderContext.SetLineColor(Color(COL_WHITE));
- rRenderContext.DrawRect(Rectangle(Point(0, 0),
+ rRenderContext.DrawRect(tools::Rectangle(Point(0, 0),
Size(PREVIEW_WIDTH, PREVIEW_HEIGHT)));
rRenderContext.SetMapMode(MapMode(MapUnit::MapPixel));
// check for sane values