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

now iOS draws something (upside down)

Change-Id: Ibf04322d34605fce30b2fa477de98a3e2ff9c2d1
üst f2c3fcc3
...@@ -39,12 +39,12 @@ static const CGFloat RENDER_BUTTON_HEIGHT = 50.0f; ...@@ -39,12 +39,12 @@ static const CGFloat RENDER_BUTTON_HEIGHT = 50.0f;
} }
-(void)initParams{ -(void)initParams{
self.params = @[[self createParam:@"contextWidth" extractor:^(CGFloat value){self.contextWidth = 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:100], [self createParam:@"contextHeight" extractor:^(CGFloat value){self.contextHeight = value;} value:300],
[self createParam:@"tilePosX" extractor:^(CGFloat value){self.tilePosX = value;} value:0], [self createParam:@"tilePosX" extractor:^(CGFloat value){self.tilePosX = value;} value:0],
[self createParam:@"tilePosY" extractor:^(CGFloat value){self.tilePosY = 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:@"tileWidth" extractor:^(CGFloat value){self.tileWidth = value;} value:300],
[self createParam:@"tileHeight" extractor:^(CGFloat value){self.tileHeight = value;} value:100] [self createParam:@"tileHeight" extractor:^(CGFloat value){self.tileHeight = value;} value:300]
]; ];
} }
......
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
#include <vcl/bitmapex.hxx> #include <vcl/bitmapex.hxx>
#include <svtools/colorcfg.hxx> #include <svtools/colorcfg.hxx>
#include <vcl/bmpacc.hxx> #include <vcl/bmpacc.hxx>
#include <vcl/alpha.hxx>
#include <svtools/accessibilityoptions.hxx> #include <svtools/accessibilityoptions.hxx>
#include <accessibilityoptions.hxx> #include <accessibilityoptions.hxx>
#include <statstr.hrc> #include <statstr.hrc>
...@@ -1788,12 +1789,10 @@ void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int ...@@ -1788,12 +1789,10 @@ void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int
// SystemGraphicsData aData; // SystemGraphicsData aData;
// [setup the aData] // [setup the aData]
// VirtualDevice aDevice(&aData, [color depth]); // VirtualDevice aDevice(&aData, [color depth]);
VirtualDevice aDevice; //VirtualDevice aDevice;
aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight)); //aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight));
pViewShell->PaintTile(pViewShell->GetOut(), Rectangle(tilePosX, tilePosY, tileWidth, tileHeight));
pViewShell->PaintTile(&aDevice, Rectangle(tilePosX, tilePosY, tileWidth, tileHeight)); Bitmap aBitmap(pViewShell->GetOut()->GetBitmap(Point(0,0), pViewShell->GetOut()->PixelToLogic(Size(contextWidth, contextHeight))));
BitmapEx aBitmapEx(aDevice.GetBitmapEx(Point(0,0), aDevice.GetOutputSizePixel()));
Bitmap aBitmap = aBitmapEx.GetBitmap();
BitmapReadAccess * readAccess = aBitmap.AcquireReadAccess(); BitmapReadAccess * readAccess = aBitmap.AcquireReadAccess();
touch_lo_copy_buffer((void *) readAccess->GetBuffer(), touch_lo_copy_buffer((void *) readAccess->GetBuffer(),
tileWidth, tileWidth,
......
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