summaryrefslogtreecommitdiff
path: root/toolkit/source
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2012-06-18 22:32:35 +0300
committerTor Lillqvist <tlillqvist@suse.com>2012-06-18 22:38:41 +0300
commitdaaa550121a97d80e1ab43cbd5c73da6915e4ac4 (patch)
treef4842b51515bfb2c51354adb38f1b6e48839b1e9 /toolkit/source
parent8dd75128a5a7e068ae63f3d1cc6b41410f7d7122 (diff)
Pass also scale and offset to createScreenCompatibleDeviceUsingBuffer()
Pass on to VirtualDevice where used to set the MapMode of the device appropriately. Adapt DocumentLoader, use to scale the page rendering to exactly fit the virtual device. Change-Id: I4b0bc67e12114d3d9d493ff1aca2ef5d2cc78912
Diffstat (limited to 'toolkit/source')
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index c799393daac7..e027b235a21f 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -567,10 +567,10 @@ void SAL_CALL VCLXToolkit::disposing()
::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > VCLXToolkit::createScreenCompatibleDevice( sal_Int32 Width, sal_Int32 Height ) throw(::com::sun::star::uno::RuntimeException)
{
- return createScreenCompatibleDeviceUsingBuffer( Width, Height, 0 );
+ return createScreenCompatibleDeviceUsingBuffer( Width, Height, 1, 1, 0, 0, 0 );
}
-::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > VCLXToolkit::createScreenCompatibleDeviceUsingBuffer( sal_Int32 Width, sal_Int32 Height, sal_Int64 addressOfMemoryBufferForSharedArrayWrapper ) throw(::com::sun::star::uno::RuntimeException)
+::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > VCLXToolkit::createScreenCompatibleDeviceUsingBuffer( sal_Int32 Width, sal_Int32 Height, sal_Int32 ScaleNumerator, sal_Int32 ScaleDenominator, sal_Int32 XOffset, sal_Int32 YOffset, sal_Int64 addressOfMemoryBufferForSharedArrayWrapper ) throw(::com::sun::star::uno::RuntimeException)
{
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
@@ -583,7 +583,8 @@ void SAL_CALL VCLXToolkit::disposing()
if ( addressOfMemoryBufferForSharedArrayWrapper != 0 ) {
#if defined(ANDROID)
ByteBufferWrapper *bbw = (ByteBufferWrapper *) (intptr_t) addressOfMemoryBufferForSharedArrayWrapper;
- pV->SetOutputSizePixelAndBuffer( Size( Width, Height ), basebmp::RawMemorySharedArray( bbw->pointer(), *bbw ));
+ pV->SetOutputSizePixelScaleOffsetAndBuffer( Size( Width, Height ), Fraction(ScaleNumerator, ScaleDenominator), Point( XOffset, YOffset), basebmp::RawMemorySharedArray( bbw->pointer(), *bbw ));
+#else
OSL_FAIL( "rendering to a pre-allocated buffer not done yet for this OS" );
#endif
} else {