Skip to content

Scaling svg using animate makes the svg blurry #83

@KarimFikani

Description

@KarimFikani

I'm trying to make the SVG animate from one transform matrix to another. Mainly my transform matrices contain just scaling. When I run the following code and tap the svg becomes blurry when scaling up but at the end of the animation it would look correct. The problem is the in-between that is messed up. Is there a way to solve this problem? Am I doing the animation properly?

Example:

class SVGExampleView: MacawView {
    
    var image: Node!
    
    required init?(coder aDecoder: NSCoder) {
        image = SVGParser.parse(path: "Animals/duck50x50")!
        image.place = .scale(sx: 7, sy: 7)
        
        super.init(node: image, coder: aDecoder)
        
        let gesture = UITapGestureRecognizer(target: self, action:  #selector (self.onTap (_:)))
        self.addGestureRecognizer(gesture)
    }
    
    func onTap(_ sender:UITapGestureRecognizer) {
        let toTransform: Transform = .scale(sx: 10, sy: 10)
        
        image.placeVar.animate(from: image.place, to: toTransform, during: 2, delay: 1)
        
    }  
}

simulator screen shot dec 19 2016 8 44 21 pm

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions