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

2013-10-28 Thread Ptyl Dragon
 
ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m
 |   12 +-
 sw/source/core/view/viewsh.cxx 
 |8 +++---
 2 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit deaee517c69ee7026a70b71867d7ca476e582987
Author: Ptyl Dragon p...@cloudon.com
Date:   Mon Oct 28 16:54:21 2013 +0200

for tor

Change-Id: I1565450c763e4f0bf1a724978b5550163d627482

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 be2e144..acd00c1 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: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:300],
-[self createParam:@tileHeight extractor:^(CGFloat 
value){self.tileHeight = value;} value:300]
+self.params = @[[self createParam:@contextWidth   extractor:^(CGFloat 
value){self.contextWidth = value;} value:600],
+[self createParam:@contextHeight  extractor:^(CGFloat 
value){self.contextHeight = value;} value:600],
+[self createParam:@tilePosX   extractor:^(CGFloat 
value){self.tilePosX = value;} value:600],
+[self createParam:@tilePosY   extractor:^(CGFloat 
value){self.tilePosY = value;} value:600],
+[self createParam:@tileWidth  extractor:^(CGFloat 
value){self.tileWidth = value;} value:1000],
+[self createParam:@tileHeight extractor:^(CGFloat 
value){self.tileHeight = value;} value:1000]
 ];
 }
 
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index fdf7577..d64e1fa 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1792,15 +1792,15 @@ void touch_lo_draw_tile(void * context, int 
contextWidth, int contextHeight, int
 MapMode aMapMode(aDevice.GetMapMode());
 aMapMode.SetMapUnit(MAP_TWIP);
 aMapMode.SetOrigin(Point(-tilePosX, -tilePosY));
-// scaling
-Fraction scaleX(contextWidth,tileWidth);
-Fraction scaleY(contextHeight,tileHeight);
+// scaling
+Fraction scaleX(tileWidth,contextWidth);
+Fraction scaleY(tileHeight,contextHeight);
 aMapMode.SetScaleX(scaleX);
 aMapMode.SetScaleY(scaleY);
 aDevice.SetMapMode(aMapMode);
 // resizes the virtual device so to contain the entrie context
 aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight));
-// draw
+// draw - works in logic coordinates
 pViewShell-PaintTile(aDevice, Rectangle(Point(tilePosX, tilePosY), 
Size(tileWidth, tileHeight)));
 // copy the aDevice content to mpImage
 Bitmap aBitmap(aDevice.GetBitmap(aDevice.PixelToLogic(Point(0,0)), 
aDevice.PixelToLogic(Size(contextWidth, contextHeight;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-10-24 Thread Ptyl Dragon
 
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 p...@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,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits