mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
[ASTextKitComponents] Remove unused, somewhat dangerous functions (#2007)
[ASTextKitComponents] Remove Unused Scale Conversion Functions
This commit is contained in:
@@ -10,24 +10,9 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <AsyncDisplayKit/ASBaseDefines.h>
|
||||
#import <tgmath.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
ASDISPLAYNODE_INLINE CGFloat ceilPixelValueForScale(CGFloat f, CGFloat scale)
|
||||
{
|
||||
// Round up to device pixel (.5 on retina)
|
||||
return ceil(f * scale) / scale;
|
||||
}
|
||||
|
||||
ASDISPLAYNODE_INLINE CGSize ceilSizeValue(CGSize s)
|
||||
{
|
||||
CGFloat screenScale = [UIScreen mainScreen].scale;
|
||||
s.width = ceilPixelValueForScale(s.width, screenScale);
|
||||
s.height = ceilPixelValueForScale(s.height, screenScale);
|
||||
return s;
|
||||
}
|
||||
|
||||
@interface ASTextKitComponents : NSObject
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user