summaryrefslogtreecommitdiff
path: root/vcl/workben
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-03-30 20:27:55 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-03-31 06:27:11 +0000
commita5a571307fb3306b74ab46b085cde6388270a770 (patch)
tree66d4ce12bb5236c50ab6a5d253bc8c6d8b5d292d /vcl/workben
parent17d821af6bb9df93569836a92f6bed975587fc6c (diff)
tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'vcl/workben')
-rw-r--r--vcl/workben/icontest.cxx4
-rw-r--r--vcl/workben/mtfdemo.cxx4
-rw-r--r--vcl/workben/outdevgrind.cxx10
-rw-r--r--vcl/workben/svptest.cxx24
-rw-r--r--vcl/workben/vcldemo.cxx146
5 files changed, 94 insertions, 94 deletions
diff --git a/vcl/workben/icontest.cxx b/vcl/workben/icontest.cxx
index 32d6ae8c05fe..a321d5392dc6 100644
--- a/vcl/workben/icontest.cxx
+++ b/vcl/workben/icontest.cxx
@@ -76,7 +76,7 @@ public:
virtual void dispose() override { mpFixedBitmap.clear(); WorkWindow::dispose(); }
void LoadGraphic( const OUString& sImageFile );
- virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) override;
+ virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect ) override;
virtual void Resize() override;
};
@@ -101,7 +101,7 @@ void MyWorkWindow::LoadGraphic( const OUString& sImageFile )
}
}
-void MyWorkWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void MyWorkWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
std::cout << "==> Paint! " << mnPaintCount++ << " (vcl) " << GetSizePixel() << " " << getTimeNow() - mnStartTime << std::endl;
diff --git a/vcl/workben/mtfdemo.cxx b/vcl/workben/mtfdemo.cxx
index 3c842f9da649..6cc3b440913b 100644
--- a/vcl/workben/mtfdemo.cxx
+++ b/vcl/workben/mtfdemo.cxx
@@ -55,10 +55,10 @@ public:
}
}
- virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override;
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
};
-void DemoMtfWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void DemoMtfWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
maMtf.Play(this, maMtf.GetActionSize());
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index 6c0bf652d70b..c86039c09590 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -71,7 +71,7 @@ class TestWindow : public Dialog
Show();
}
- virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override;
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
};
typedef std::function<void (OutputDevice*)> functor_type;
@@ -95,8 +95,8 @@ void setupMethodStubs( functor_vector_type& res )
const Point aPt3(0,0);
const Point aPt4(450,450);
- const Rectangle aRect(aPt1,aPt2);
- const Rectangle aRect2(aPt3,aPt4);
+ const tools::Rectangle aRect(aPt1,aPt2);
+ const tools::Rectangle aRect2(aPt3,aPt4);
const tools::Polygon aPoly(aRect);
const tools::Polygon aPoly2(aRect2);
tools::PolyPolygon aPolyPoly(aPoly);
@@ -614,7 +614,7 @@ void outDevGrind(vcl::RenderContext& rTarget)
functor_vector_type aMethods;
setupMethodStubs( aMethods );
- const Rectangle aClipRect(10,10,1000,1000);
+ const tools::Rectangle aClipRect(10,10,1000,1000);
const tools::Polygon aPoly1( aClipRect );
tools::Polygon aPoly2( aClipRect );
aPoly2.Rotate(aClipRect.Center(),450);
@@ -665,7 +665,7 @@ void outDevGrind(vcl::RenderContext& rTarget)
}
}
-void TestWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void TestWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
outDevGrind(rRenderContext);
fflush(stdout);
diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx
index 24ff69d988ed..2e679bb7f756 100644
--- a/vcl/workben/svptest.cxx
+++ b/vcl/workben/svptest.cxx
@@ -85,7 +85,7 @@ class MyWin : public WorkWindow
public:
MyWin( vcl::Window* pParent, WinBits nWinStyle );
- virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) override;
+ virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect ) override;
};
void Main()
@@ -194,7 +194,7 @@ static Color approachColor( const Color& rFrom, const Color& rTo )
}
#define DELTA 5.0
-void MyWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void MyWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
WorkWindow::Paint(rRenderContext, rRect);
@@ -209,14 +209,14 @@ void MyWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
Point aP1(aPaperSize.Width() / 48, 0), aP2(aPaperSize.Width() / 40, 0);
Point aPoint;
- rRenderContext.DrawRect(Rectangle(Point(0, 0), aPaperSize));
- rRenderContext.DrawRect(Rectangle(Point(100, 100),
+ rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), aPaperSize));
+ rRenderContext.DrawRect(tools::Rectangle(Point(100, 100),
Size(aPaperSize.Width() - 200,
aPaperSize.Height() - 200)));
- rRenderContext.DrawRect(Rectangle(Point(200, 200),
+ rRenderContext.DrawRect(tools::Rectangle(Point(200, 200),
Size(aPaperSize.Width() - 400,
aPaperSize.Height() - 400)));
- rRenderContext.DrawRect(Rectangle(Point(300, 300),
+ rRenderContext.DrawRect(tools::Rectangle(Point(300, 300),
Size(aPaperSize.Width() - 600,
aPaperSize.Height() - 600)));
@@ -240,14 +240,14 @@ void MyWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
aPrintText.append( "SVP test program" );
- rRenderContext.DrawText(Rectangle(Point((aPaperSize.Width() - 4000) / 2, 2000),
+ rRenderContext.DrawText(tools::Rectangle(Point((aPaperSize.Width() - 4000) / 2, 2000),
Size(aPaperSize.Width() - 2100 - nMaxWidth, aPaperSize.Height() - 4000)),
aPrintText.makeStringAndClear(),
DrawTextFlags::MultiLine);
}
rRenderContext.SetFillColor();
- DrawRect(Rectangle(Point(aPaperSize.Width() - 4000, 1000),
+ DrawRect(tools::Rectangle(Point(aPaperSize.Width() - 4000, 1000),
Size(3000, 3000)));
rRenderContext.DrawBitmap(Point(aPaperSize.Width() - 4000, 1000),
Size( 3000,3000 ),
@@ -264,22 +264,22 @@ void MyWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
Gradient aGradient(GradientStyle::Linear, aBlack, aWhite);
aGradient.SetAngle(900);
- rRenderContext.DrawGradient(Rectangle(Point(1000, 4500),
+ rRenderContext.DrawGradient(tools::Rectangle(Point(1000, 4500),
Size(aPaperSize.Width() - 2000, 500)),
aGradient);
aGradient.SetStartColor(aDarkRed);
aGradient.SetEndColor(aLightBlue);
- rRenderContext.DrawGradient(Rectangle(Point(1000, 5300),
+ rRenderContext.DrawGradient(tools::Rectangle(Point(1000, 5300),
Size(aPaperSize.Width() - 2000, 500)),
aGradient);
aGradient.SetStartColor(aDarkBlue);
aGradient.SetEndColor(aLightGreen);
- rRenderContext.DrawGradient(Rectangle(Point(1000, 6100),
+ rRenderContext.DrawGradient(tools::Rectangle(Point(1000, 6100),
Size(aPaperSize.Width() - 2000, 500)),
aGradient);
aGradient.SetStartColor(aDarkGreen);
aGradient.SetEndColor(aLightRed);
- rRenderContext.DrawGradient(Rectangle(Point(1000, 6900),
+ rRenderContext.DrawGradient(tools::Rectangle(Point(1000, 6900),
Size(aPaperSize.Width() - 2000, 500)),
aGradient);
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 66fd7cff8316..b80ed6c5a2d8 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -107,7 +107,7 @@ class DemoRenderer
virtual ~RegionRenderer() {}
virtual OUString getName() = 0;
virtual sal_uInt16 getAccelerator() = 0;
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) = 0;
// repeating count for profiling (to exceed the poor time resolution on Windows)
virtual sal_uInt16 getTestRepeatCount() = 0;
@@ -179,24 +179,24 @@ public:
bool MouseButtonDown(const MouseEvent& rMEvt);
void KeyInput(const KeyEvent& rKEvt);
- static std::vector<Rectangle> partition(const Rectangle &rRect, int nX, int nY)
+ static std::vector<tools::Rectangle> partition(const tools::Rectangle &rRect, int nX, int nY)
{
- std::vector<Rectangle> aRegions = partition(rRect.GetSize(), nX, nY);
+ std::vector<tools::Rectangle> aRegions = partition(rRect.GetSize(), nX, nY);
for (auto it = aRegions.begin(); it != aRegions.end(); ++it)
it->Move(rRect.Left(), rRect.Top());
return aRegions;
}
- static std::vector<Rectangle> partition(const RenderContext &rCtx, int nX, int nY)
+ static std::vector<tools::Rectangle> partition(const RenderContext &rCtx, int nX, int nY)
{
return partition(rCtx.maSize, nX, nY);
}
- static std::vector<Rectangle> partition(Size aSize, int nX, int nY)
+ static std::vector<tools::Rectangle> partition(Size aSize, int nX, int nY)
{
- Rectangle r;
- std::vector<Rectangle> aRegions;
+ tools::Rectangle r;
+ std::vector<tools::Rectangle> aRegions;
// Make small cleared area for these guys
long nBorderSize = std::min(aSize.Height() / 32, aSize.Width() / 32);
@@ -216,7 +216,7 @@ public:
return aRegions;
}
- static void clearRects(OutputDevice &rDev, std::vector<Rectangle> &rRects)
+ static void clearRects(OutputDevice &rDev, std::vector<tools::Rectangle> &rRects)
{
for (size_t i = 0; i < rRects.size(); i++)
{
@@ -233,7 +233,7 @@ public:
}
}
- static void drawBackground(OutputDevice &rDev, const Rectangle& r)
+ static void drawBackground(OutputDevice &rDev, const tools::Rectangle& r)
{
rDev.Erase();
Gradient aGradient;
@@ -246,7 +246,7 @@ public:
struct DrawLines : public RegionRenderer
{
RENDER_DETAILS(lines,KEY_L,100)
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
if (rCtx.meStyle == RENDER_EXPANDED)
@@ -254,7 +254,7 @@ public:
AntialiasingFlags nOldAA = rDev.GetAntialiasing();
rDev.SetAntialiasing(AntialiasingFlags::EnableB2dDraw);
- std::vector<Rectangle> aRegions(DemoRenderer::partition(rCtx, 4, 4));
+ std::vector<tools::Rectangle> aRegions(DemoRenderer::partition(rCtx, 4, 4));
DemoRenderer::clearRects(rDev, aRegions);
#if 0 // FIXME: get this through to the backend ...
@@ -296,7 +296,7 @@ public:
};
rDev.SetLineColor(Color(COL_BLACK));
basegfx::B2DPolygon aPoly;
- Rectangle aSub(aRegions[i]);
+ tools::Rectangle aSub(aRegions[i]);
for (size_t j = 0; j < SAL_N_ELEMENTS(aPoints); j++)
{
aPoly.append(basegfx::B2DPoint(aSub.Left() + aSub.GetWidth() * aPoints[j].nX,
@@ -334,16 +334,16 @@ public:
{
RENDER_DETAILS(text,KEY_T,1)
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
if (rCtx.meStyle == RENDER_EXPANDED)
{
- std::vector<Rectangle> aToplevelRegions(
+ std::vector<tools::Rectangle> aToplevelRegions(
DemoRenderer::partition(rCtx, 1, 3));
- std::vector<Rectangle> aSubRegions(
+ std::vector<tools::Rectangle> aSubRegions(
DemoRenderer::partition(aToplevelRegions[0], 4, 2));
- Rectangle aBottom(aToplevelRegions[1].TopLeft(),
+ tools::Rectangle aBottom(aToplevelRegions[1].TopLeft(),
aToplevelRegions[2].BottomRight());
DemoRenderer::clearRects(rDev,aSubRegions);
struct {
@@ -381,7 +381,7 @@ public:
}
}
- static void drawText (OutputDevice &rDev, Rectangle r, bool bClip, bool bArabicText, bool bRotate)
+ static void drawText (OutputDevice &rDev, tools::Rectangle r, bool bClip, bool bArabicText, bool bRotate)
{
rDev.SetClipRegion( vcl::Region(r) );
@@ -430,7 +430,7 @@ public:
if (bClip && !bRotate)
{
// only show the first quarter of the text
- Rectangle aRect( r.TopLeft(), Size( r.GetWidth()/2, r.GetHeight()/2 ) );
+ tools::Rectangle aRect( r.TopLeft(), Size( r.GetWidth()/2, r.GetHeight()/2 ) );
rDev.SetClipRegion( vcl::Region( aRect ) );
}
@@ -459,7 +459,7 @@ public:
if (bRotate)
{
- Rectangle aFontRect = r;
+ tools::Rectangle aFontRect = r;
int nHeight = r.GetHeight();
@@ -476,7 +476,7 @@ public:
if (bClip)
{
- Rectangle aClipRect( Point( r.Left(), r.Top() + ( r.GetHeight()/2 ) ) , Size( r.GetWidth()/2, r.GetHeight()/2 ) );
+ tools::Rectangle aClipRect( Point( r.Left(), r.Top() + ( r.GetHeight()/2 ) ) , Size( r.GetWidth()/2, r.GetHeight()/2 ) );
rDev.SetClipRegion( vcl::Region( aClipRect ) );
}
else
@@ -492,7 +492,7 @@ public:
rDev.SetClipRegion();
}
- static void drawComplex (OutputDevice &rDev, Rectangle r)
+ static void drawComplex (OutputDevice &rDev, tools::Rectangle r)
{
const unsigned char pInvalid[] = { 0xfe, 0x1f, 0 };
const unsigned char pDiacritic1[] = { 0x61, 0xcc, 0x8a, 0xcc, 0x8c, 0 };
@@ -558,7 +558,7 @@ public:
// Legend
vcl::Font aIndexFont("sans", Size(0,20));
aIndexFont.SetColor(COL_BLACK);
- Rectangle aTextRect;
+ tools::Rectangle aTextRect;
rDev.SetFont(aIndexFont);
OUString aText = OUString::number(i) + ".";
rDev.DrawText(aPos, aText);
@@ -613,7 +613,7 @@ public:
{
rDev.Push();
{
- Rectangle aTextRect;
+ tools::Rectangle aTextRect;
rDev.DrawText(aPos,aText);
@@ -626,7 +626,7 @@ public:
if (aTextRect.GetHeight() > nMaxTextHeight)
nMaxTextHeight = aTextRect.GetHeight();
// This should intersect with the text
- Rectangle aInnerRect(
+ tools::Rectangle aInnerRect(
aTextRect.Left()+1, aTextRect.Top()+1,
aTextRect.Right()-1, aTextRect.Bottom()-1);
rDev.SetLineColor(COL_WHITE);
@@ -661,17 +661,17 @@ public:
struct DrawCheckered : public RegionRenderer
{
RENDER_DETAILS(checks,KEY_C,20)
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
if (rCtx.meStyle == RENDER_EXPANDED)
{
- std::vector<Rectangle> aRegions(DemoRenderer::partition(rCtx, 2, 2));
+ std::vector<tools::Rectangle> aRegions(DemoRenderer::partition(rCtx, 2, 2));
for (size_t i = 0; i < aRegions.size(); i++)
{
vcl::Region aRegion;
- Rectangle aSub(aRegions[i]);
- Rectangle aSmaller(aSub);
+ tools::Rectangle aSub(aRegions[i]);
+ tools::Rectangle aSmaller(aSub);
aSmaller.Move(10,10);
aSmaller.setWidth(aSmaller.getWidth()-20);
aSmaller.setHeight(aSmaller.getHeight()-24);
@@ -696,7 +696,7 @@ public:
tools::PolyPolygon aPolyPoly;
sal_Int32 nTW = aSub.GetWidth()/6;
sal_Int32 nTH = aSub.GetHeight()/6;
- Rectangle aTiny(Point(4, 4), Size(nTW*2, nTH*2));
+ tools::Rectangle aTiny(Point(4, 4), Size(nTW*2, nTH*2));
aPolyPoly.Insert( tools::Polygon(aTiny));
aTiny.Move(nTW*3, nTH*3);
aPolyPoly.Insert( tools::Polygon(aTiny));
@@ -723,14 +723,14 @@ public:
{
RENDER_DETAILS(poly,KEY_P,20)
DrawCheckered maCheckered;
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
maCheckered.RenderRegion(rDev, r, rCtx);
long nDx = r.GetWidth()/20;
long nDy = r.GetHeight()/20;
- Rectangle aShrunk(r);
+ tools::Rectangle aShrunk(r);
aShrunk.Move(nDx, nDy);
aShrunk.SetSize(Size(r.GetWidth()-nDx*2,
r.GetHeight()-nDy*2));
@@ -746,17 +746,17 @@ public:
struct DrawEllipse : public RegionRenderer
{
RENDER_DETAILS(ellipse,KEY_E,500)
- static void doInvert(OutputDevice &rDev, const Rectangle &r,
+ static void doInvert(OutputDevice &rDev, const tools::Rectangle &r,
InvertFlags nFlags)
{
rDev.Invert(r, nFlags);
if (r.GetWidth() > 10 && r.GetHeight() > 10)
{
- Rectangle aSmall(r.Center()-Point(4,4), Size(8,8));
+ tools::Rectangle aSmall(r.Center()-Point(4,4), Size(8,8));
rDev.Invert(aSmall,nFlags);
}
}
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
rDev.SetLineColor(Color(COL_RED));
@@ -777,12 +777,12 @@ public:
struct DrawGradient : public RegionRenderer
{
RENDER_DETAILS(gradient,KEY_G,50)
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
if (rCtx.meStyle == RENDER_EXPANDED)
{
- std::vector<Rectangle> aRegions(DemoRenderer::partition(rCtx,5, 4));
+ std::vector<tools::Rectangle> aRegions(DemoRenderer::partition(rCtx,5, 4));
sal_uInt32 nStartCols[] = {
COL_RED, COL_RED, COL_RED, COL_GREEN, COL_GREEN,
COL_BLUE, COL_BLUE, COL_BLUE, COL_CYAN, COL_CYAN,
@@ -822,7 +822,7 @@ public:
assert(aRegions.size() <= SAL_N_ELEMENTS(nBorders));
for (size_t i = 0; i < aRegions.size(); i++)
{
- Rectangle aSub = aRegions[i];
+ tools::Rectangle aSub = aRegions[i];
Gradient aGradient;
aGradient.SetStartColor(Color(nStartCols[i]));
aGradient.SetEndColor(Color(nEndCols[i]));
@@ -850,14 +850,14 @@ public:
// Simulate Page Borders rendering - which ultimately should
// be done with a shader / gradient
- static void SimulateBorderStretch(OutputDevice &rDev, const Rectangle& r)
+ static void SimulateBorderStretch(OutputDevice &rDev, const tools::Rectangle& r)
{
BitmapEx aPageShadowMask("sw/res/page-shadow-mask.png");
BitmapEx aRight(aPageShadowMask);
sal_Int32 nSlice = (aPageShadowMask.GetSizePixel().Width() - 3) / 4;
// a width x 1 slice
- aRight.Crop(Rectangle(Point((nSlice * 3) + 3, (nSlice * 2) + 1),
+ aRight.Crop(tools::Rectangle(Point((nSlice * 3) + 3, (nSlice * 2) + 1),
Size(nSlice, 1)));
AlphaMask aAlphaMask(aRight.GetBitmap());
Bitmap aBlockColor = Bitmap(aAlphaMask.GetSizePixel(), 24);
@@ -888,12 +888,12 @@ public:
// An offset background for alpha rendering
rDev.SetFillColor(COL_BLUE);
- Rectangle aSurround(r.Center(), Size(aPageShadowMask.GetSizePixel()));
+ tools::Rectangle aSurround(r.Center(), Size(aPageShadowMask.GetSizePixel()));
rDev.DrawRect(aSurround);
rDev.DrawBitmapEx(aRenderPt, aWhole);
}
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
Bitmap aBitmap(rCtx.mpDemoRenderer->maIntroBW);
@@ -908,7 +908,7 @@ public:
{
RENDER_DETAILS(bitmapex,KEY_X,2)
DrawCheckered maCheckered;
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
maCheckered.RenderRegion(rDev, r, rCtx);
@@ -925,7 +925,7 @@ public:
struct DrawPolyPolygons : public RegionRenderer
{
RENDER_DETAILS(polypoly,KEY_N,100)
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &) override
{
struct {
@@ -946,7 +946,7 @@ public:
{
for (int y = 0; y < 2; y++)
{
- Rectangle aSubRect(r);
+ tools::Rectangle aSubRect(r);
aSubRect.Move(x * r.GetWidth()/3, y * r.GetHeight()/3);
aSubRect.SetSize(Size(r.GetWidth()/2, r.GetHeight()/4));
tools::Polygon aPoly(SAL_N_ELEMENTS(aPoints));
@@ -976,17 +976,17 @@ public:
struct DrawClipped : public RegionRenderer
{
RENDER_DETAILS(clip,KEY_D,10)
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &) override
{
- std::vector<Rectangle> aRegions(DemoRenderer::partition(r, 2, 2));
+ std::vector<tools::Rectangle> aRegions(DemoRenderer::partition(r, 2, 2));
const int nLimits[] = { 4, -100 };
for (int i = 0; i < 2; ++i)
{
sal_uInt16 nHue = 0;
rDev.Push(PushFlags::CLIPREGION);
- Rectangle aOuter = aRegions[i];
- Rectangle aInner = aOuter;
+ tools::Rectangle aOuter = aRegions[i];
+ tools::Rectangle aInner = aOuter;
while (aInner.GetWidth() > nLimits[i] && aInner.GetHeight() > nLimits[i])
{
aInner.expand(-1);
@@ -1000,8 +1000,8 @@ public:
{
sal_uInt16 nHue = 0;
- Rectangle aOuter = aRegions[2];
- std::vector<Rectangle> aPieces(DemoRenderer::partition(aOuter, 2, 2));
+ tools::Rectangle aOuter = aRegions[2];
+ std::vector<tools::Rectangle> aPieces(DemoRenderer::partition(aOuter, 2, 2));
for (int j = 0; j < std::min(aOuter.GetWidth(), aOuter.GetHeight())/5; ++j)
{
rDev.Push(PushFlags::CLIPREGION);
@@ -1025,8 +1025,8 @@ public:
{
sal_uInt16 nHue = 0;
- Rectangle aOuter = aRegions[3];
- std::vector<Rectangle> aPieces(DemoRenderer::partition(aOuter, 2, 2));
+ tools::Rectangle aOuter = aRegions[3];
+ std::vector<tools::Rectangle> aPieces(DemoRenderer::partition(aOuter, 2, 2));
bool bDone = false;
for (int j = 0; !bDone; ++j)
{
@@ -1088,7 +1088,7 @@ public:
RENDER_AS_ALPHA_OUTDEV
};
- static void SizeAndRender(OutputDevice &rDev, const Rectangle& r, RenderType eType,
+ static void SizeAndRender(OutputDevice &rDev, const tools::Rectangle& r, RenderType eType,
const RenderContext &rCtx)
{
ScopedVclPtr<VirtualDevice> pNested;
@@ -1099,7 +1099,7 @@ public:
pNested = VclPtr<VirtualDevice>::Create(rDev,DeviceFormat::DEFAULT,DeviceFormat::DEFAULT).get();
pNested->SetOutputSizePixel(r.GetSize());
- Rectangle aWhole(Point(0,0), r.GetSize());
+ tools::Rectangle aWhole(Point(0,0), r.GetSize());
// mini me
rCtx.mpDemoRenderer->drawToDevice(*pNested, r.GetSize(), true);
@@ -1122,7 +1122,7 @@ public:
*pNested);
}
}
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
// avoid infinite recursion
@@ -1131,7 +1131,7 @@ public:
if (rCtx.meStyle == RENDER_EXPANDED)
{
- std::vector<Rectangle> aRegions(DemoRenderer::partition(rCtx,2, 2));
+ std::vector<tools::Rectangle> aRegions(DemoRenderer::partition(rCtx,2, 2));
DemoRenderer::clearRects(rDev, aRegions);
RenderType eRenderTypes[] = { RENDER_AS_BITMAP, RENDER_AS_OUTDEV,
@@ -1148,7 +1148,7 @@ public:
{
RENDER_DETAILS(xor,KEY_X,1)
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
// avoid infinite recursion
@@ -1228,7 +1228,7 @@ public:
}
}
- void doDrawIcons(OutputDevice &rDev, Rectangle r, bool bExpanded)
+ void doDrawIcons(OutputDevice &rDev, tools::Rectangle r, bool bExpanded)
{
long nMaxH = 0;
Point p(r.LeftCenter());
@@ -1363,7 +1363,7 @@ public:
return BitmapEx(aRecovered, aMask);
}
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
if (rCtx.meStyle == RENDER_EXPANDED)
@@ -1424,7 +1424,7 @@ public:
struct FetchDrawBitmap : public RegionRenderer
{
RENDER_DETAILS(fetchdraw,KEY_F,50)
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &) override
{
Bitmap aBitmap(rDev.GetBitmap(Point(0,0),rDev.GetOutputSizePixel()));
@@ -1433,14 +1433,14 @@ public:
}
};
- void drawThumbs(vcl::RenderContext& rDev, Rectangle aRect, bool bVDev)
+ void drawThumbs(vcl::RenderContext& rDev, tools::Rectangle aRect, bool bVDev)
{
RenderContext aCtx;
aCtx.meStyle = RENDER_THUMB;
aCtx.mbVDev = bVDev;
aCtx.mpDemoRenderer = this;
aCtx.maSize = aRect.GetSize();
- std::vector<Rectangle> aRegions(partition(aRect, mnSegmentsX, mnSegmentsY));
+ std::vector<tools::Rectangle> aRegions(partition(aRect, mnSegmentsX, mnSegmentsY));
DemoRenderer::clearRects(rDev, aRegions);
for (size_t i = 0; i < maRenderers.size(); i++)
{
@@ -1474,7 +1474,7 @@ public:
aCtx.mbVDev = bVDev;
aCtx.mpDemoRenderer = this;
aCtx.maSize = aSize;
- Rectangle aWholeWin(Point(0,0), rDev.GetOutputSizePixel());
+ tools::Rectangle aWholeWin(Point(0,0), rDev.GetOutputSizePixel());
drawBackground(rDev, aWholeWin);
@@ -1578,7 +1578,7 @@ bool DemoRenderer::MouseButtonDown(const MouseEvent& rMEvt)
}
// click on a region to zoom into it
- std::vector<Rectangle> aRegions(partition(GetSizePixel(), mnSegmentsX, mnSegmentsY));
+ std::vector<tools::Rectangle> aRegions(partition(GetSizePixel(), mnSegmentsX, mnSegmentsY));
for (size_t i = 0; i < aRegions.size(); i++)
{
if (aRegions[i].IsInside(rMEvt.GetPosPixel()))
@@ -1782,7 +1782,7 @@ public:
mrRenderer.SetSizePixel(GetSizePixel());
mrRenderer.KeyInput(rKEvt);
}
- virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override
{
mrRenderer.SetSizePixel(GetSizePixel());
fprintf(stderr, "DemoWin::Paint(%ld,%ld,%ld,%ld)\n", rRect.getX(), rRect.getY(), rRect.getWidth(), rRect.getHeight());
@@ -1894,11 +1894,11 @@ public:
mpBar.disposeAndClear();
WorkWindow::dispose();
}
- virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override
{
- Rectangle aWholeSize(Point(0, 0),GetOutputSizePixel());
+ tools::Rectangle aWholeSize(Point(0, 0),GetOutputSizePixel());
vcl::Region aClip(aWholeSize);
- Rectangle aExclude(Rectangle(Point(50,50),Size(100,100)));
+ tools::Rectangle aExclude(tools::Rectangle(Point(50,50),Size(100,100)));
aClip.Exclude(aExclude);
Wallpaper aWallpaper(COL_GREEN);
@@ -1912,7 +1912,7 @@ public:
pDev->EnableRTL(IsRTLEnabled());
pDev->SetOutputSizePixel(aExclude.GetSize());
- Rectangle aSubRect(aWholeSize);
+ tools::Rectangle aSubRect(aWholeSize);
aSubRect.Move(-aExclude.Left(), -aExclude.Top());
pDev->DrawWallpaper(aSubRect, aWallpaper );
@@ -1973,12 +1973,12 @@ class DemoPopup : public FloatingWindow
Update();
}
- virtual void Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle&) override
+ virtual void Paint(vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle&) override
{
// Interestingly in GL mode on Windows, this doesn't render.
Size aSize = GetOutputSizePixel();
- Rectangle aTextRect(Point(6, 6), aSize);
+ tools::Rectangle aTextRect(Point(6, 6), aSize);
SetTextColor(COL_BLACK);
SetTextAlign(ALIGN_TOP);
@@ -1988,12 +1988,12 @@ class DemoPopup : public FloatingWindow
SetLineColor(COL_BLACK);
SetFillColor();
- DrawRect( Rectangle( Point(), aSize ) );
+ DrawRect( tools::Rectangle( Point(), aSize ) );
aSize.Width() -= 2;
aSize.Height() -= 2;
Color aColor( GetLineColor() );
SetLineColor( ( COL_GRAY ) );
- DrawRect( Rectangle( Point( 1, 1 ), aSize ) );
+ DrawRect( tools::Rectangle( Point( 1, 1 ), aSize ) );
SetLineColor( aColor );
}