Kaydet (Commit) 48610630 authored tarafından Ptyl Dragon's avatar Ptyl Dragon Kaydeden (comit) Jan Holesovsky

for tor

Change-Id: I1565450c763e4f0bf1a724978b5550163d627482
üst 3ea4d268
......@@ -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]
];
}
......
......@@ -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))));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment