Files
Leeksov 4647310322 GLEGram 12.5 — Initial public release
Based on Swiftgram 12.5 (Telegram iOS 12.5).
All GLEGram features ported and organized in GLEGram/ folder.

Features: Ghost Mode, Saved Deleted Messages, Content Protection Bypass,
Font Replacement, Fake Profile, Chat Export, Plugin System, and more.

See CHANGELOG_12.5.md for full details.
2026-04-06 09:48:12 +03:00

43 lines
1.0 KiB
Objective-C

#import "TGNeoImageViewModel.h"
@implementation TGNeoImageViewModel
- (instancetype)initWithImage:(UIImage *)image
{
self = [super init];
if (self != nil)
{
_image = image;
}
return self;
}
- (instancetype)initWithImage:(UIImage *)image tintColor:(UIColor *)tintColor
{
self = [super init];
if (self != nil)
{
_image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
_tintColor = tintColor;
}
return self;
}
- (void)drawInContext:(CGContextRef)context
{
UIGraphicsPushContext(context);
if (_tintColor != nil)
{
CGContextSaveGState(context);
CGContextSetFillColorWithColor(context, _tintColor.CGColor);
}
[self.image drawInRect:CGRectMake((self.frame.size.width - self.image.size.width) / 2, (self.frame.size.height - self.image.size.height) / 2, self.image.size.width, self.image.size.height)];
if (_tintColor)
CGContextRestoreGState(context);
UIGraphicsPopContext();
}
@end