please correct me if I am wrong: if we have x=10, y=20, when we apply a transform on these coordinates (Lets say scaling x and y by 10), the new coordinates will be x=100 and y=200. So, if we apply scaling of x by -1 we get x= -10, y =20. But why this action causes the view to be mirrored? shouldn't the view just be re-drawn at it's new coordinates? What am I missing here ?
transformations in iOS and particullary Scaling
58 Views Asked by Daniel Rahamim At
1
There are 1 best solutions below
Related Questions in IOS
- URLSession requesting JSON array from server not working
- Incorrect display of LinearGradientBrush in IOS
- Module not found when building flutter app for IOS
- How to share metadata of an audio url file to a WhatsApp conversation with friends
- Occasional crash at NSURLSessionDataTask dataTaskWithRequest:completionHandler:
- Expo Deep linking on iOS is not working (because of Google sign-in?)
- On iOS, the keyboard does not offer a 6-character SMS code
- Hi, there is an error happened when I build my flutter app, after I'm installing firebase packages occurs that error
- The copy/paste functionalities don't work only on iOS in the Flutter app
- Hide LiveActivityIntent Button from Shortcuts App
- While Running Github Actions Pipeline: No Signing Certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID
- Actionable notification api call not working in background
- Accessibility : Full keyboard access with scroll view in swiftui
- There is a problem with the request entity - You are not allowed to create 'iOS' profile with App ID 'XXXX'
- I am getting "binding has not yet been initialized" error when trying to connect firebase with flutter
Related Questions in TRANSFORMATION
- Can't use panel with transformation as source panel
- How can I get the inverse Transformation of in 2D
- Camera rotation to direction vector
- Transform a JSON array by Jolt into a new JSON object and keep objects separate
- Power Bi, colums to rows
- Jolt Transformation - keep JSON structure even if object is empty
- How can I apply image registration to images and their annotations with opencv?
- How to reshape this database in Excel or R
- Can you create custom VS Code snippets variables?
- how to do Transformation in vtklinewidget
- ADF Flatten transformation - can't select unroll by
- Reverse function to obtain original input values
- Delay observed between two moving sublayers
- transform data set in R from stacked months and years for multiple sites to sites with columns of year-month
- Jolt transform from a Map<Person, list<Property>, List<Feature>> to Map<Property, Map<Feature, List<Person>>>
Related Questions in CGAFFINETRANSFORM
- How to correctly position graphic after flipping it
- Prevent CALayer drawing from being scaled by superlayer transform
- scaling buttons grid with CGAffineTransform goes wrong
- Convert UIBezierPath in similar way to CGRect, CGPoint, etc
- Infinite rotation around point without of rotating view around itself?
- How to achieve "preview mode" of a child view - iOS, Swift, UIKit
- How do I make the lineWidth of UIBezierPath always be 1 under transform change
- Converting SCNMatrix4 from swift to Objective-c
- Merging video with original orientation
- how to plot forward/backward tilt on y axis?
- UIKit rotate view 90 degrees while keeping the bounds to edge
- Transform collection view cell container after Swipe to right and left
- How to trigger UIImageView animation in a UITableViewHeaderFooterView when pressing on a tableView section?
- How to improve magnification and rotation gesture recogniser methods in Objective-C?
- Resizing UIView using CGAffineTransform scale doesn't update frame
Related Questions in CGAFFINETRANSFORMSCALE
- How to improve magnification and rotation gesture recogniser methods in Objective-C?
- Resizing UIView using CGAffineTransform scale doesn't update frame
- CGAffineTransform not scaling origin correctly
- CGAffineTransform.identity doesn't reset transform correctly after device rotation
- Rotate image in bounds
- IOS/Objective-C:Animation of Multiple CGAffineTransformations
- How to prevent 2 Animation on Object at the same time in Objective-C?
- Multiple CGAffineTranform statements dont give smooth results
- Image control point skewing
- Why does a CGAffineTransform applied in steps behave differently than applied at once?
- Zoom UICollectionView via pinch gesture
- Scale down UITextView with Transform
- Prevent CGAffineTransfromScale from scaling outside of self.view
- Animate a UILabel size doesn't resize the StackView that contains it
- ios - UIPinchGestureRecognizer scale UIImageView like snapchat app
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Don't think about a single coordinate, think about a range of coordinates.
If you take the coords (x-value only here) of... 0, 1, 2, 3, 4 and scale them by 10 then they will map to 0, 10, 20, 30, 40 respectively. This will stretch out the x axis and so the view will look 10 times bigger than it did originally.
If you take those same x coords and scale them by -1 then they will map to 0, -1, -2, -3, -4 respectively.
That is, the pixel that is furthest away from the origin (4) is still furthest away from the origin but now at -4.
Each pixel is mirrored through the origin.
That's how scaling works in iOS, Android and general mathematics.
If you just want to slide the view around without changing the size of it at all then you can use a
translationinstead.