[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - ios/shared sw/source

Ptyl Dragon ptyl at cloudon.com
Thu Oct 24 06:49:13 PDT 2013


 ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m |    8 +++----
 sw/source/core/view/viewsh.cxx                                                                              |   11 ++++------
 2 files changed, 9 insertions(+), 10 deletions(-)

New commits:
commit 8ff597b589f49a27ee75b7a8bd7301a90e7b4770
Author: Ptyl Dragon <ptyl at cloudon.com>
Date:   Thu Oct 24 16:48:28 2013 +0200

    now iOS draws something (upside down)
    
    Change-Id: Ibf04322d34605fce30b2fa477de98a3e2ff9c2d1

diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
index 2381df9..be2e144 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
@@ -39,12 +39,12 @@ static const CGFloat RENDER_BUTTON_HEIGHT = 50.0f;
 }
 
 -(void)initParams{
-    self.params = @[[self createParam:@"contextWidth"   extractor:^(CGFloat value){self.contextWidth = value;} value:100],
-                    [self createParam:@"contextHeight"  extractor:^(CGFloat value){self.contextHeight = value;} value:100],
+    self.params = @[[self createParam:@"contextWidth"   extractor:^(CGFloat value){self.contextWidth = value;} value:300],
+                    [self createParam:@"contextHeight"  extractor:^(CGFloat value){self.contextHeight = value;} value:300],
                     [self createParam:@"tilePosX"       extractor:^(CGFloat value){self.tilePosX = value;} value:0],
                     [self createParam:@"tilePosY"       extractor:^(CGFloat value){self.tilePosY = value;} value:0],
-                    [self createParam:@"tileWidth"      extractor:^(CGFloat value){self.tileWidth = value;} value:100],
-                    [self createParam:@"tileHeight"     extractor:^(CGFloat value){self.tileHeight = value;} value:100]
+                    [self createParam:@"tileWidth"      extractor:^(CGFloat value){self.tileWidth = value;} value:300],
+                    [self createParam:@"tileHeight"     extractor:^(CGFloat value){self.tileHeight = value;} value:300]
                     ];
 }
 
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index af6b8af..3a978d4 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -58,6 +58,7 @@
 #include <vcl/bitmapex.hxx>
 #include <svtools/colorcfg.hxx>
 #include <vcl/bmpacc.hxx>
+#include <vcl/alpha.hxx>
 #include <svtools/accessibilityoptions.hxx>
 #include <accessibilityoptions.hxx>
 #include <statstr.hrc>
@@ -1790,12 +1791,10 @@ void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int
         // SystemGraphicsData aData;
         // [setup the aData]
         // VirtualDevice aDevice(&aData, [color depth]);
-        VirtualDevice aDevice;
-        aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight));
-
-        pViewShell->PaintTile(&aDevice, Rectangle(tilePosX, tilePosY, tileWidth, tileHeight));
-        BitmapEx aBitmapEx(aDevice.GetBitmapEx(Point(0,0), aDevice.GetOutputSizePixel()));
-        Bitmap aBitmap = aBitmapEx.GetBitmap();
+        //VirtualDevice aDevice;
+        //aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight));
+        pViewShell->PaintTile(pViewShell->GetOut(), Rectangle(tilePosX, tilePosY, tileWidth, tileHeight));
+        Bitmap aBitmap(pViewShell->GetOut()->GetBitmap(Point(0,0), pViewShell->GetOut()->PixelToLogic(Size(contextWidth, contextHeight))));
         BitmapReadAccess * readAccess = aBitmap.AcquireReadAccess();
         touch_lo_copy_buffer((void *) readAccess->GetBuffer(),
                              tileWidth,


More information about the Libreoffice-commits mailing list