Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
CaiJingLong committed Sep 22, 2020
2 parents 103b44b + 45e8ce9 commit 24d21a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ios/Classes/FIUIImageHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ - (void)scale:(FIScaleOption *)option {
return;
}

UIGraphicsBeginImageContext(outImage.size);
UIGraphicsBeginImageContext(CGSizeMake(option.width, option.height));

CGContextRef ctx = UIGraphicsGetCurrentContext();
if (!ctx) {
Expand Down Expand Up @@ -292,14 +292,14 @@ - (void)addText:(FIAddTextOption *)option {
UIColor *color = [UIColor colorWithRed:(text.r / 255.0) green:(text.g / 255.0) blue:(text.b / 255.0) alpha:(text.a / 255.0)];

UIFont *font;

if ([@"" isEqualToString: text.fontName ]){
font = [UIFont systemFontOfSize:text.fontSizePx];
}else{
font = [UIFont fontWithName:text.fontName size:text.fontSizePx];
}


NSDictionary *attr = @{
NSFontAttributeName: font,
NSForegroundColorAttributeName: color,
Expand Down

0 comments on commit 24d21a4

Please sign in to comment.