summaryrefslogtreecommitdiff
path: root/vcl/opengl
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/opengl
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/opengl')
-rw-r--r--vcl/opengl/FixedTextureAtlas.cxx2
-rw-r--r--vcl/opengl/PackedTextureAtlas.cxx20
-rw-r--r--vcl/opengl/gdiimpl.cxx24
-rw-r--r--vcl/opengl/texture.cxx4
4 files changed, 25 insertions, 25 deletions
diff --git a/vcl/opengl/FixedTextureAtlas.cxx b/vcl/opengl/FixedTextureAtlas.cxx
index 33a5a1360374..aeece80a7760 100644
--- a/vcl/opengl/FixedTextureAtlas.cxx
+++ b/vcl/opengl/FixedTextureAtlas.cxx
@@ -119,7 +119,7 @@ OpenGLTexture FixedTextureAtlasManager::Reserve(int nWidth, int nHeight)
int nX = (nSlot % mWidthFactor) * mSubTextureSize;
int nY = (nSlot / mWidthFactor) * mSubTextureSize;
- Rectangle aRectangle(Point(nX, nY), Size(nWidth, nHeight));
+ tools::Rectangle aRectangle(Point(nX, nY), Size(nWidth, nHeight));
return OpenGLTexture(pFixedTexture->mpTexture, aRectangle, nSlot);
}
diff --git a/vcl/opengl/PackedTextureAtlas.cxx b/vcl/opengl/PackedTextureAtlas.cxx
index bad17587762d..dc6d0db4c76f 100644
--- a/vcl/opengl/PackedTextureAtlas.cxx
+++ b/vcl/opengl/PackedTextureAtlas.cxx
@@ -19,26 +19,26 @@
struct Node
{
- Rectangle mRectangle;
+ tools::Rectangle mRectangle;
std::unique_ptr<Node> mLeftNode;
std::unique_ptr<Node> mRightNode;
bool mOccupied;
explicit Node(int nWidth, int nHeight);
- explicit Node(Rectangle& aRectangle);
+ explicit Node(tools::Rectangle& aRectangle);
bool isLeaf();
Node* insert(int nWidth, int nHeight, int nPadding);
};
Node::Node(int nWidth, int nHeight)
- : mRectangle(Rectangle(Point(), Size(nWidth, nHeight)))
+ : mRectangle(tools::Rectangle(Point(), Size(nWidth, nHeight)))
, mLeftNode()
, mRightNode()
, mOccupied(false)
{}
-Node::Node(Rectangle& aRectangle)
+Node::Node(tools::Rectangle& aRectangle)
: mRectangle(aRectangle)
, mLeftNode()
, mRightNode()
@@ -83,20 +83,20 @@ Node* Node::insert(int nWidth, int nHeight, int nPadding)
int dw = mRectangle.GetWidth() - nWidth;
int dh = mRectangle.GetHeight() - nHeight;
- Rectangle aLeftRect;
- Rectangle aRightRect;
+ tools::Rectangle aLeftRect;
+ tools::Rectangle aRightRect;
if (dw > dh)
{
- aLeftRect = Rectangle(Point(mRectangle.Left(), mRectangle.Top()),
+ aLeftRect = tools::Rectangle(Point(mRectangle.Left(), mRectangle.Top()),
Size(nWidth, mRectangle.GetHeight()));
- aRightRect = Rectangle(Point(nPadding + mRectangle.Left() + nWidth, mRectangle.Top()),
+ aRightRect = tools::Rectangle(Point(nPadding + mRectangle.Left() + nWidth, mRectangle.Top()),
Size(mRectangle.GetWidth() - nWidth - nPadding, mRectangle.GetHeight()));
}
else
{
- aLeftRect = Rectangle(Point(mRectangle.Left(), mRectangle.Top()),
+ aLeftRect = tools::Rectangle(Point(mRectangle.Left(), mRectangle.Top()),
Size(mRectangle.GetWidth(), nHeight));
- aRightRect = Rectangle(Point(mRectangle.Left(), nPadding + mRectangle.Top() + nHeight),
+ aRightRect = tools::Rectangle(Point(mRectangle.Left(), nPadding + mRectangle.Top() + nHeight),
Size(mRectangle.GetWidth(), mRectangle.GetHeight() - nHeight - nPadding));
}
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index c483fb094f4d..9e1bc471d13f 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -222,7 +222,7 @@ void OpenGLSalGraphicsImpl::InitializePreDrawState(XOROption eOpt)
CheckOffscreenTexture();
CHECK_GL_ERROR();
- mpContext->state().viewport(Rectangle(Point(0, 0), Size(GetWidth(), GetHeight())));
+ mpContext->state().viewport(tools::Rectangle(Point(0, 0), Size(GetWidth(), GetHeight())));
ImplInitClipRegion();
CHECK_GL_ERROR();
@@ -355,7 +355,7 @@ void OpenGLSalGraphicsImpl::ImplInitClipRegion()
if (mbUseScissor)
{
- Rectangle aRect(maClipRegion.GetBoundRect());
+ tools::Rectangle aRect(maClipRegion.GetBoundRect());
mpContext->state().scissor().set(aRect.Left(), GetHeight() - aRect.Bottom() - 1, aRect.GetWidth(), aRect.GetHeight());
mpContext->state().scissor().enable();
}
@@ -867,7 +867,7 @@ void OpenGLSalGraphicsImpl::DrawRect( long nX, long nY, long nWidth, long nHeigh
DrawConvexPolygon( 4, aPoints, true );
}
-void OpenGLSalGraphicsImpl::DrawRect( const Rectangle& rRect )
+void OpenGLSalGraphicsImpl::DrawRect( const tools::Rectangle& rRect )
{
long nX1( rRect.Left() );
long nY1( rRect.Top() );
@@ -927,7 +927,7 @@ void OpenGLSalGraphicsImpl::DrawRegionBand( const RegionBand& rRegion )
aVertices.push_back(GLfloat(pt.X())); \
aVertices.push_back(GLfloat(pt.Y()));
- for(Rectangle & rRect : aRects)
+ for(tools::Rectangle & rRect : aRects)
{
rRect.Bottom() += 1;
rRect.Right() += 1;
@@ -1412,7 +1412,7 @@ void OpenGLSalGraphicsImpl::FlushDeferredDrawing()
VCL_GL_INFO("End FlushDeferredDrawing");
}
-void OpenGLSalGraphicsImpl::DrawLinearGradient( const Gradient& rGradient, const Rectangle& rRect )
+void OpenGLSalGraphicsImpl::DrawLinearGradient( const Gradient& rGradient, const tools::Rectangle& rRect )
{
OpenGLZone aZone;
@@ -1425,7 +1425,7 @@ void OpenGLSalGraphicsImpl::DrawLinearGradient( const Gradient& rGradient, const
nFactor = rGradient.GetEndIntensity();
mpProgram->SetColorWithIntensity( "end_color", aEndCol, nFactor );
- Rectangle aBoundRect;
+ tools::Rectangle aBoundRect;
Point aCenter;
rGradient.GetBoundRect( rRect, aBoundRect, aCenter );
tools::Polygon aPoly( aBoundRect );
@@ -1438,7 +1438,7 @@ void OpenGLSalGraphicsImpl::DrawLinearGradient( const Gradient& rGradient, const
DrawConvexPolygon( aPoly, true );
}
-void OpenGLSalGraphicsImpl::DrawAxialGradient( const Gradient& rGradient, const Rectangle& rRect )
+void OpenGLSalGraphicsImpl::DrawAxialGradient( const Gradient& rGradient, const tools::Rectangle& rRect )
{
OpenGLZone aZone;
@@ -1465,7 +1465,7 @@ void OpenGLSalGraphicsImpl::DrawAxialGradient( const Gradient& rGradient, const
*
*/
- Rectangle aRect;
+ tools::Rectangle aRect;
Point aCenter;
rGradient.GetBoundRect( rRect, aRect, aCenter );
@@ -1490,7 +1490,7 @@ void OpenGLSalGraphicsImpl::DrawAxialGradient( const Gradient& rGradient, const
DrawConvexPolygon( aPoly, true );
}
-void OpenGLSalGraphicsImpl::DrawRadialGradient( const Gradient& rGradient, const Rectangle& rRect )
+void OpenGLSalGraphicsImpl::DrawRadialGradient( const Gradient& rGradient, const tools::Rectangle& rRect )
{
OpenGLZone aZone;
@@ -1503,7 +1503,7 @@ void OpenGLSalGraphicsImpl::DrawRadialGradient( const Gradient& rGradient, const
nFactor = rGradient.GetEndIntensity();
mpProgram->SetColorWithIntensity( "end_color", aEndCol, nFactor );
- Rectangle aRect;
+ tools::Rectangle aRect;
Point aCenter;
rGradient.GetBoundRect( rRect, aRect, aCenter );
@@ -1962,7 +1962,7 @@ bool OpenGLSalGraphicsImpl::drawAlphaRect(
bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly,
const Gradient& rGradient)
{
- Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
+ tools::Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
VCL_GL_INFO("::drawGradient " << rPolyPoly.GetBoundRect());
@@ -2116,7 +2116,7 @@ void OpenGLSalGraphicsImpl::doFlush()
CHECK_GL_ERROR();
mpWindowContext->state().sync();
- mpWindowContext->state().viewport(Rectangle(Point(0, 0), Size(GetWidth(), GetHeight())));
+ mpWindowContext->state().viewport(tools::Rectangle(Point(0, 0), Size(GetWidth(), GetHeight())));
mpWindowContext->state().scissor().disable();
mpWindowContext->state().stencil().disable();
diff --git a/vcl/opengl/texture.cxx b/vcl/opengl/texture.cxx
index 002d03f8bea0..9a3584c4f9cf 100644
--- a/vcl/opengl/texture.cxx
+++ b/vcl/opengl/texture.cxx
@@ -253,7 +253,7 @@ OpenGLTexture::OpenGLTexture() :
{
}
-OpenGLTexture::OpenGLTexture(const std::shared_ptr<ImplOpenGLTexture>& rpImpl, Rectangle aRectangle, int nSlotNumber)
+OpenGLTexture::OpenGLTexture(const std::shared_ptr<ImplOpenGLTexture>& rpImpl, tools::Rectangle aRectangle, int nSlotNumber)
: maRect(aRectangle)
, mpImpl(rpImpl)
, mnSlotNumber(nSlotNumber)
@@ -297,7 +297,7 @@ OpenGLTexture::OpenGLTexture( const OpenGLTexture& rTexture )
OpenGLTexture::OpenGLTexture( const OpenGLTexture& rTexture,
int nX, int nY, int nWidth, int nHeight )
{
- maRect = Rectangle( Point( rTexture.maRect.Left() + nX, rTexture.maRect.Top() + nY ),
+ maRect = tools::Rectangle( Point( rTexture.maRect.Left() + nX, rTexture.maRect.Top() + nY ),
Size( nWidth, nHeight ) );
mpImpl = rTexture.mpImpl;
mnSlotNumber = rTexture.mnSlotNumber;