mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Phone numbers improvements
This commit is contained in:
@@ -1327,8 +1327,6 @@ private extension UIBezierPath {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
extension UIImageView {
|
||||
func setDrawingAnimatedImage(data: Data) {
|
||||
DispatchQueue.global().async {
|
||||
@@ -1354,48 +1352,3 @@ extension UIImageView {
|
||||
self.animationRepeatCount = 0
|
||||
}
|
||||
}
|
||||
|
||||
//private func prerenderEntityTransformations(entity: DrawingEntity, image: UIImage, colorSpace: CGColorSpace) -> UIImage {
|
||||
// let imageSize = image.size
|
||||
//
|
||||
// let angle: CGFloat
|
||||
// var scale: CGFloat
|
||||
// let position: CGPoint
|
||||
//
|
||||
// if let entity = entity as? DrawingStickerEntity {
|
||||
// angle = -entity.rotation
|
||||
// scale = entity.scale
|
||||
// position = entity.position
|
||||
// } else {
|
||||
// fatalError()
|
||||
// }
|
||||
//
|
||||
// let rotatedSize = CGSize(
|
||||
// width: abs(imageSize.width * cos(angle)) + abs(imageSize.height * sin(angle)),
|
||||
// height: abs(imageSize.width * sin(angle)) + abs(imageSize.height * cos(angle))
|
||||
// )
|
||||
// let newSize = CGSize(width: rotatedSize.width * scale, height: rotatedSize.height * scale)
|
||||
//
|
||||
// let newImage = generateImage(newSize, contextGenerator: { size, context in
|
||||
// context.setAllowsAntialiasing(true)
|
||||
// context.setShouldAntialias(true)
|
||||
// context.interpolationQuality = .high
|
||||
// context.clear(CGRect(origin: .zero, size: size))
|
||||
// context.translateBy(x: newSize.width * 0.5, y: newSize.height * 0.5)
|
||||
// context.rotate(by: angle)
|
||||
// context.scaleBy(x: scale, y: scale)
|
||||
// let drawRect = CGRect(
|
||||
// x: -imageSize.width * 0.5,
|
||||
// y: -imageSize.height * 0.5,
|
||||
// width: imageSize.width,
|
||||
// height: imageSize.height
|
||||
// )
|
||||
// if let cgImage = image.cgImage {
|
||||
// context.draw(cgImage, in: drawRect)
|
||||
// }
|
||||
// }, scale: 1.0)!
|
||||
//
|
||||
// let _ = position
|
||||
//
|
||||
// return newImage
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user