Skip to content

Commit

Permalink
Merge pull request #4120 from vishalduggal/timob-13447
Browse files Browse the repository at this point in the history
[TIMOB-13447] Conditional setting of magnificationFilter
  • Loading branch information
Max Stepanov committed Apr 8, 2013
2 parents 007de79 + 6a8b1ae commit bf769ad
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions iphone/Classes/TiUIView.m
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,11 @@ -(void)setBackgroundImage_:(id)image
if (bgImage != nil) {
[self backgroundImageLayer].contentsScale = [bgImage scale];
[self backgroundImageLayer].contentsCenter = TiDimensionLayerContentCenter(topCap, leftCap, topCap, leftCap, [bgImage size]);
[self backgroundImageLayer].magnificationFilter = @"nearest";
[self backgroundImageLayer].minificationFilter = @"nearest";
if (!CGPointEqualToPoint([self backgroundImageLayer].contentsCenter.origin,CGPointZero)) {
[self backgroundImageLayer].magnificationFilter = @"nearest";
} else {
[self backgroundImageLayer].magnificationFilter = @"linear";
}
}
}

Expand Down

0 comments on commit bf769ad

Please sign in to comment.