catransform3d - How do I get the right perspective for the used pattern? iOS Project with Swift3 -
the following image house garage; garage door pattern:
the garage door overlaid pattern, how can transform pattern perspectively correct?
this ios/swift3 project i'm working on, using following code
let layer:calayer = self.rectimageview.layer var rotationandperspectivetransform:catransform3d = catransform3didentity rotationandperspectivetransform.m34 = 1.0 / -250 rotationandperspectivetransform = catransform3drotate(rotationandperspectivetransform, self.calculateangleofperspective(), 0.0, 1.0, 0.0) layer.transform = rotationandperspectivetransform
i'm getting following view garage door wrong perspective:
can please guide me right direction, how can achieve, seen in upper half of image, instead of lower part? in advance!
Comments
Post a Comment