1st implementation of touch_lo_get_content_size

Change-Id: I8b72c4366b502a71f2ed3bf917296c9553364d83
This commit is contained in:
Ptyl Dragon
2013-10-30 13:33:13 +02:00
committed by Jan Holesovsky
parent 8d56ce8927
commit 6b6088fa9c
2 changed files with 8 additions and 0 deletions

View File

@@ -59,6 +59,9 @@
self.tester.params.tileHeight);
CGContextRestoreGState(context);
MLOContentSize size = touch_lo_get_content_size();
NSLog(@"MLOContentSize: width=%lld, height=%lld",size.width, size.height);
}
@end

View File

@@ -1821,6 +1821,11 @@ MLOContentSize touch_lo_get_content_size()
SwWrtShell *pViewShell = GetActiveWrtShell();
if (pViewShell)
{
static const long WIDTH_ADDITION = 6L * DOCUMENTBORDER;
static const long HEIGHT_ADDITION = 2L * DOCUMENTBORDER;
Size documentSize =pViewShell->GetView().GetDocSz();
return MLOContentSizeMake(documentSize.Width() + WIDTH_ADDITION,
documentSize.Height() + HEIGHT_ADDITION);
}
return MLOContentSizeMake(0,0);
}