summaryrefslogtreecommitdiff
path: root/vcl/quartz
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-10-30 23:48:15 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-11-30 05:16:11 +0100
commit7514dc3424e703a58b0ae7b3b5fc0ee36ad52f9f (patch)
tree4e3fa00e17f4e66609b5fa906e72a06d333ca2d4 /vcl/quartz
parentd59b971a4c8600208215a547a2de128de34b3299 (diff)
move the iOS SalGraphics code back into the OSX one
Conflicts: vcl/inc/headless/svpgdi.hxx Change-Id: I4cd9163bcbb8cdee21e5bce3303894923c4238d6
Diffstat (limited to 'vcl/quartz')
-rw-r--r--vcl/quartz/salgdi.cxx74
-rw-r--r--vcl/quartz/salgdicommon.cxx1
-rw-r--r--vcl/quartz/salgdiutils.cxx20
3 files changed, 45 insertions, 50 deletions
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index 0b1ffefa1944..2cb8271c570c 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -227,10 +227,11 @@ void CoreTextFontData::ReadMacCmapEncoding( void ) const
return;
}
-AquaSalGraphics::AquaSalGraphics()
+AquaSalGraphics::AquaSalGraphics():
#ifdef MACOSX
- : mpFrame( NULL )
- , mxLayer( NULL )
+ mpFrame( NULL ),
+#endif
+ mxLayer( NULL )
, mrContext( NULL )
#if OSL_DEBUG_LEVEL > 0
, mnContextStackDepth( 0 )
@@ -251,28 +252,10 @@ AquaSalGraphics::AquaSalGraphics()
, mbNonAntialiasedText( false )
, mbPrinter( false )
, mbVirDev( false )
+#ifdef MACOSX
, mbWindow( false )
#else
- : mxLayer( NULL )
, mbForeignContext( false )
- , mrContext( NULL )
-#if OSL_DEBUG_LEVEL > 0
- , mnContextStackDepth( 0 )
-#endif
- , mpXorEmulation( NULL )
- , mnXorMode( 0 )
- , mnWidth( 0 )
- , mnHeight( 0 )
- , mnBitmapDepth( 0 )
- , mxClipPath( NULL )
- , maLineColor( COL_WHITE )
- , maFillColor( COL_BLACK )
- , mpFontData( NULL )
- , mpTextStyle( NULL )
- , maTextColor( COL_BLACK )
- , mbNonAntialiasedText( false )
- , mbPrinter( false )
- , mbVirDev( false )
#endif
{
SAL_INFO( "vcl.quartz", "AquaSalGraphics::AquaSalGraphics() this=" << this );
@@ -315,15 +298,11 @@ AquaSalGraphics::~AquaSalGraphics()
}
}
-#ifndef IOS
-
SalGraphicsImpl* AquaSalGraphics::GetImpl() const
{
return NULL;
}
-#endif
-
void AquaSalGraphics::SetTextColor( SalColor nSalColor )
{
maTextColor = RGBAColor( nSalColor );
@@ -783,11 +762,46 @@ SystemFontData AquaSalGraphics::GetSysFontData( int /* nFallbacklevel */ ) const
return aSysFontData;
}
-#ifdef IOS
+bool AquaSalGraphics::IsFlipped() const
+{
+#ifdef MACOSX
+ return mbWindow;
+#else
+ return false;
+#endif
+}
+
+void AquaSalGraphics::RefreshRect(float lX, float lY, float lWidth, float lHeight)
+{
+#ifdef MACOSX
+ if( ! mbWindow ) // view only on Window graphics
+ return;
+
+ if( mpFrame )
+ {
+ // update a little more around the designated rectangle
+ // this helps with antialiased rendering
+ // Rounding down x and width can accumulate a rounding error of up to 2
+ // The decrementing of x, the rounding error and the antialiasing border
+ // require that the width and the height need to be increased by four
+ const Rectangle aVclRect(Point(static_cast<long int>(lX-1),
+ static_cast<long int>(lY-1) ),
+ Size( static_cast<long int>(lWidth+4),
+ static_cast<long int>(lHeight+4) ) );
+ mpFrame->maInvalidRect.Union( aVclRect );
+ }
+#else
+ (void) lX;
+ (void) lY;
+ (void) lWidth;
+ (void) lHeight;
+ return;
+#endif
+}
-// Note that "SvpSalGraphics" is actually called AquaSalGraphics for iOS
+#ifdef IOS
-bool SvpSalGraphics::CheckContext()
+bool AquaSalGraphics::CheckContext()
{
if (mbForeignContext)
{
@@ -799,7 +813,7 @@ bool SvpSalGraphics::CheckContext()
return false;
}
-CGContextRef SvpSalGraphics::GetContext()
+CGContextRef AquaSalGraphics::GetContext()
{
if ( !mrContext )
CheckContext();
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index 21c8d2a1ea5d..1c119ab7f45e 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -36,6 +36,7 @@
#ifdef IOS
#include "saldatabasic.hxx"
+#include <vcl/sysdata.hxx>
#endif
#if defined(IOS) && defined(DBG_UTIL)
diff --git a/vcl/quartz/salgdiutils.cxx b/vcl/quartz/salgdiutils.cxx
index 704fef56f9ce..403651b39116 100644
--- a/vcl/quartz/salgdiutils.cxx
+++ b/vcl/quartz/salgdiutils.cxx
@@ -173,26 +173,6 @@ CGContextRef AquaSalGraphics::GetContext()
return mrContext;
}
-void AquaSalGraphics::RefreshRect(float lX, float lY, float lWidth, float lHeight)
-{
- if( ! mbWindow ) // view only on Window graphics
- return;
-
- if( mpFrame )
- {
- // update a little more around the designated rectangle
- // this helps with antialiased rendering
- // Rounding down x and width can accumulate a rounding error of up to 2
- // The decrementing of x, the rounding error and the antialiasing border
- // require that the width and the height need to be increased by four
- const Rectangle aVclRect(Point(static_cast<long int>(lX-1),
- static_cast<long int>(lY-1) ),
- Size( static_cast<long int>(lWidth+4),
- static_cast<long int>(lHeight+4) ) );
- mpFrame->maInvalidRect.Union( aVclRect );
- }
-}
-
void AquaSalGraphics::UpdateWindow( NSRect& )
{
if( !mpFrame )