mirror of https://github.com/axmolengine/axmol.git
Fix variable type mismatch.
This commit is contained in:
parent
dea99211fb
commit
728682d68e
|
@ -63,15 +63,15 @@ typedef struct
|
||||||
unsigned char* data;
|
unsigned char* data;
|
||||||
} tImageInfo;
|
} tImageInfo;
|
||||||
|
|
||||||
static CGSize _calculateStringSize(NSString *str, id font, CGSize *constrainSize)
|
static NSSize _calculateStringSize(NSString *str, id font, CGSize *constrainSize)
|
||||||
{
|
{
|
||||||
CGSize textRect = CGSizeZero;
|
NSSize textRect = NSZeroSize;
|
||||||
textRect.width = constrainSize->width > 0 ? constrainSize->width
|
textRect.width = constrainSize->width > 0 ? constrainSize->width
|
||||||
: 0x7fffffff;
|
: 0x7fffffff;
|
||||||
textRect.height = constrainSize->height > 0 ? constrainSize->height
|
textRect.height = constrainSize->height > 0 ? constrainSize->height
|
||||||
: 0x7fffffff;
|
: 0x7fffffff;
|
||||||
|
|
||||||
CGSize dim;
|
NSSize dim;
|
||||||
NSDictionary *attibutes = @{NSFontAttributeName:font};
|
NSDictionary *attibutes = @{NSFontAttributeName:font};
|
||||||
dim = [str boundingRectWithSize:textRect options:(NSStringDrawingOptions)(NSStringDrawingUsesLineFragmentOrigin) attributes:attibutes context:nil].size;
|
dim = [str boundingRectWithSize:textRect options:(NSStringDrawingOptions)(NSStringDrawingUsesLineFragmentOrigin) attributes:attibutes context:nil].size;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue