summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.m12
-rw-r--r--sw/source/core/view/viewsh.cxx8
2 files changed, 10 insertions, 10 deletions
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 be2e144b992f..acd00c179929 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 eea74f3e3740..5c2263bae620 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1790,15 +1790,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))));