Files
GLEGram-iOS/submodules/LegacyComponents/Sources/TGStaticBackdropAreaData.m
T
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

28 lines
881 B
Objective-C

#import <LegacyComponents/TGStaticBackdropAreaData.h>
@implementation TGStaticBackdropAreaData
- (instancetype)initWithBackground:(UIImage *)background
{
return [self initWithBackground:background mappedRect:CGRectMake(0.0f, 0.0f, 1.0f, 1.0f)];
}
- (instancetype)initWithBackground:(UIImage *)background mappedRect:(CGRect)mappedRect
{
self = [super init];
if (self != nil)
{
_background = background;
_mappedRect = mappedRect;
}
return self;
}
- (void)drawRelativeToImageRect:(CGRect)imageRect
{
CGRect rect = CGRectMake(imageRect.origin.x + imageRect.size.width * _mappedRect.origin.x, imageRect.origin.y + imageRect.size.height * _mappedRect.origin.y, imageRect.size.width * _mappedRect.size.width, imageRect.size.height * _mappedRect.size.height);
[_background drawInRect:rect blendMode:kCGBlendModeCopy alpha:1.0f];
}
@end