summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2014-12-15 20:00:45 +0100
committerLuboš Luňák <l.lunak@collabora.com>2014-12-15 22:15:01 +0100
commit5e7709c5e9c1a5f444b1bff4096b0d3d3a541235 (patch)
tree8c37a448b1790fddfe5e7215450f89c1227a424f /vcl/inc
parent8286e92417794e68f6a53f887a426d5708fef0f6 (diff)
use AA for lines only when AA is active
Change-Id: I9965f58b8f06f1cec2c419dcf16d8aebf9cd97b8
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/openglgdiimpl.hxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx
index a8ffe4db7b2f..2c911eeb50d7 100644
--- a/vcl/inc/openglgdiimpl.hxx
+++ b/vcl/inc/openglgdiimpl.hxx
@@ -40,8 +40,9 @@ class VCL_PLUGIN_PUBLIC OpenGLSalGraphicsImpl : public SalGraphicsImpl
protected:
OpenGLContext* mpContext;
+ SalGraphics& mrParent;
/// Pointer to the SalFrame or SalVirtualDevice
- SalGeometryProvider* mpParent;
+ SalGeometryProvider* mpProvider;
OpenGLFramebuffer* mpFramebuffer;
OpenGLProgram* mpProgram;
@@ -66,11 +67,14 @@ public:
bool UseSolid( SalColor nColor, sal_uInt8 nTransparency );
bool UseSolid( SalColor nColor, double fTransparency );
bool UseSolid( SalColor nColor );
+ bool UseSolidAA( SalColor nColor );
bool UseInvert();
void DrawPoint( long nX, long nY );
void DrawLine( long nX1, long nY1, long nX2, long nY2 );
void DrawLines( sal_uInt32 nPoints, const SalPoint* pPtAry, bool bClose );
+ void DrawLineAA( long nX1, long nY1, long nX2, long nY2 );
+ void DrawLinesAA( sal_uInt32 nPoints, const SalPoint* pPtAry, bool bClose );
void DrawConvexPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry );
void DrawConvexPolygon( const Polygon& rPolygon );
void DrawRect( long nX, long nY, long nWidth, long nHeight );
@@ -92,13 +96,13 @@ public:
public:
// get the width of the device
- GLfloat GetWidth() const { return mpParent ? mpParent->GetWidth() : 1; }
+ GLfloat GetWidth() const { return mpProvider ? mpProvider->GetWidth() : 1; }
// get the height of the device
- GLfloat GetHeight() const { return mpParent ? mpParent->GetHeight() : 1; }
+ GLfloat GetHeight() const { return mpProvider ? mpProvider->GetHeight() : 1; }
// check whether this instance is used for offscreen rendering
- bool IsOffscreen() const { return mpParent ? mpParent->IsOffScreen() : true; }
+ bool IsOffscreen() const { return mpProvider ? mpProvider->IsOffScreen() : true; }
// operations to do before painting
virtual void PreDraw();
@@ -120,7 +124,7 @@ protected:
virtual bool UseContext( OpenGLContext* pContext ) = 0;
public:
- OpenGLSalGraphicsImpl(SalGeometryProvider* pParent);
+ OpenGLSalGraphicsImpl(SalGraphics& pParent, SalGeometryProvider *pProvider);
virtual ~OpenGLSalGraphicsImpl ();
OpenGLContext* GetOpenGLContext();