Skip to content

Commit

Permalink
Fixed borders in WeCustomImageView's "natural fit" mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesmchen committed Mar 4, 2012
1 parent e845796 commit cd64ea1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions WeViews/WeCustomImageView.m
Expand Up @@ -305,6 +305,7 @@ - (void) drawRect :(CGRect) rect {
// If image is smaller than view frame, don't stretch it larger than
// its natural size.
imageRect = alignSizeWithinRect(imageSize, viewFrame, hAlign, vAlign);
borderRect = CGRectInset(imageRect, -self.borderWidth, -self.borderWidth);
break;
}
// Otherwise, fall through to "FIT" mode.
Expand Down
Binary file not shown.

0 comments on commit cd64ea1

Please sign in to comment.