ios - How to get CGAffineTransform from two CGSizes? -


मान लीजिए, मेरे पास दो CGSize नाम हैं जो ए और बी।

कहां

  B = CGSizeApplyAffineTransform (ए, CGAffineTransformMakeScale (x, y));   

अब अगर मुझे ए और बी पता है तो एक्स और वाई की गणना कैसे करें?

एक आकार को दूसरे में बदलने के लिए स्केल कारक वर्तमान आयाम के साथ लक्ष्य आयाम को विभाजित करना है। इसका अर्थ यह है कि x = B.width / A.width ऊँचाई के लिए।

हालांकि यह सवाल से स्पष्ट नहीं है कि अगर यह वही है जो आप चाहते थे, तो समाधान भी हो सकता है हो x = y = 42

Comments

Popular posts from this blog

php - how to change mysql_result($res, 0, "url"); to mysqli -

Delphi: missing interface declarations for UI Automation methods -

android - How to attach an image from an app to gmail -