summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2014-04-28 20:48:31 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2014-04-28 20:48:31 +1000
commit3d91d54c49af4dd0832c27ccb9721724fa98b6b5 (patch)
tree6d717d1490713e5a60fd298076ef440a978653b0 /vcl
parentdb45e761df999c5435bf24fb69f3b0ec7bca16cf (diff)
VCL move DrawCheckered from outdev.cxx to rect.cxx
Change-Id: I55cbab29e4e0d772e593f39ba48a3a2dffbce382
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/outdev/outdev.cxx24
-rw-r--r--vcl/source/outdev/rect.cxx24
2 files changed, 24 insertions, 24 deletions
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 7eb435ec9b82..5af2be34fa2e 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -985,28 +985,4 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize,
return bDrawn;
}
-void OutputDevice::DrawCheckered(const Point& rPos, const Size& rSize, sal_uInt32 nLen, Color aStart, Color aEnd)
-{
- const sal_uInt32 nMaxX(rPos.X() + rSize.Width());
- const sal_uInt32 nMaxY(rPos.Y() + rSize.Height());
-
- Push(PUSH_LINECOLOR|PUSH_FILLCOLOR);
- SetLineColor();
-
- for(sal_uInt32 x(0), nX(rPos.X()); nX < nMaxX; x++, nX += nLen)
- {
- const sal_uInt32 nRight(std::min(nMaxX, nX + nLen));
-
- for(sal_uInt32 y(0), nY(rPos.Y()); nY < nMaxY; y++, nY += nLen)
- {
- const sal_uInt32 nBottom(std::min(nMaxY, nY + nLen));
-
- SetFillColor((x & 0x0001) ^ (y & 0x0001) ? aStart : aEnd);
- DrawRect(Rectangle(nX, nY, nRight, nBottom));
- }
- }
-
- Pop();
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx
index 3701354fc4df..285100c65923 100644
--- a/vcl/source/outdev/rect.cxx
+++ b/vcl/source/outdev/rect.cxx
@@ -121,6 +121,30 @@ void OutputDevice::DrawRect( const Rectangle& rRect,
mpAlphaVDev->DrawRect( rRect, nHorzRound, nVertRound );
}
+void OutputDevice::DrawCheckered(const Point& rPos, const Size& rSize, sal_uInt32 nLen, Color aStart, Color aEnd)
+{
+ const sal_uInt32 nMaxX(rPos.X() + rSize.Width());
+ const sal_uInt32 nMaxY(rPos.Y() + rSize.Height());
+
+ Push(PUSH_LINECOLOR|PUSH_FILLCOLOR);
+ SetLineColor();
+
+ for(sal_uInt32 x(0), nX(rPos.X()); nX < nMaxX; x++, nX += nLen)
+ {
+ const sal_uInt32 nRight(std::min(nMaxX, nX + nLen));
+
+ for(sal_uInt32 y(0), nY(rPos.Y()); nY < nMaxY; y++, nY += nLen)
+ {
+ const sal_uInt32 nBottom(std::min(nMaxY, nY + nLen));
+
+ SetFillColor((x & 0x0001) ^ (y & 0x0001) ? aStart : aEnd);
+ DrawRect(Rectangle(nX, nY, nRight, nBottom));
+ }
+ }
+
+ Pop();
+}
+
void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, sal_uLong nFlags )
{
Rectangle aDstRect( PixelToLogic( Point() ), GetOutputSize() );