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

57 lines
1.5 KiB
Swift

//
// VectorShape.swift
// lottie-swift
//
// Created by Brandon Withrow on 1/8/19.
//
import Foundation
/// An item that defines an custom shape
final class Shape: ShapeItem {
// MARK: Lifecycle
required init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: Shape.CodingKeys.self)
path = try container.decode(KeyframeGroup<BezierPath>.self, forKey: .path)
direction = try container.decodeIfPresent(PathDirection.self, forKey: .direction)
try super.init(from: decoder)
}
required init(dictionary: [String: Any]) throws {
let pathDictionary: [String: Any] = try dictionary.value(for: CodingKeys.path)
path = try KeyframeGroup<BezierPath>(dictionary: pathDictionary)
if
let directionRawValue = dictionary[CodingKeys.direction.rawValue] as? Int,
let direction = PathDirection(rawValue: directionRawValue)
{
self.direction = direction
} else {
direction = nil
}
try super.init(dictionary: dictionary)
}
// MARK: Internal
/// The Path
let path: KeyframeGroup<BezierPath>
let direction: PathDirection?
override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(path, forKey: .path)
try container.encodeIfPresent(direction, forKey: .direction)
}
// MARK: Private
private enum CodingKeys: String, CodingKey {
case path = "ks"
case direction = "d"
}
}