{"id":1427,"date":"2013-04-13T11:35:16","date_gmt":"2013-04-13T06:05:16","guid":{"rendered":"http:\/\/judepereira.com\/blog\/?p=1427"},"modified":"2013-04-13T11:35:16","modified_gmt":"2013-04-13T06:05:16","slug":"calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix","status":"publish","type":"post","link":"https:\/\/judepereira.com\/blog\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\/","title":{"rendered":"Calculate the REAL scale factor and the angle of rotation from an Android Matrix"},"content":{"rendered":"<p>After performing transformations such as rotation of a bitmap about an arbitrary point, the scale is lost. Of course, this makes sense because the bitmap is rotated inside the same bounds.<\/p>\n<p>To get the real scale now, along with the most reliable degree of rotation, I had to follow this method. Hope it saves the rest of you a night or two.<\/p>\n<p>[code lang=&#8221;java&#8221;]<br \/>\nfloat[] v = new float[9];<br \/>\nmatrix.getValues(v);<br \/>\n\/\/ translation is simple<br \/>\nfloat tx = v[Matrix.MTRANS_X];<br \/>\nfloat ty = v[Matrix.MTRANS_Y];<\/p>\n<p>\/\/ calculate real scale<br \/>\nfloat scalex = values[Matrix.MSCALE_X];<br \/>\nfloat skewy = values[Matrix.MSKEW_Y];<br \/>\nfloat rScale = (float) Math.sqrt(scalex * scalex + skewy * skewy);<\/p>\n<p>\/\/ calculate the degree of rotation<br \/>\nfloat rAngle = Math.round(Math.atan2(v[Matrix.MSKEW_X], v[Matrix.MSCALE_X]) * (180 \/ Math.PI));<br \/>\n[\/code]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After performing transformations such as rotation of a bitmap about an arbitrary point, the scale is lost. Of course, this makes sense because the bitmap is rotated inside the same bounds. To get the real scale now, along with the most reliable degree of rotation, I had to follow this method. Hope it saves the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[401,52],"tags":[556,454,448,455,451,444,450,440,449,438,452,453],"class_list":["post-1427","post","type-post","status-publish","format-standard","hentry","category-android","category-code","tag-android","tag-angle-of-rotation","tag-degree","tag-degree-of-rotation","tag-factor","tag-matrix","tag-real","tag-rotate","tag-rotation","tag-scale","tag-skew","tag-transformation"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"After performing transformations such as rotation of a bitmap about an arbitrary point, the scale is lost. Of course, this makes sense because the bitmap is rotated inside the same bounds. To get the real scale now, along with the most reliable degree of rotation, I had to follow this method. Hope it saves the rest of you a night or two.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Jude Pereira\"\/>\n\t<meta name=\"keywords\" content=\"android,matrix,rotate,degree,rotation,scale,real,factor,skew,transformation,angle of rotation,degree of rotation,another snippet | code\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/judepereira.com\/blog\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"@judepereira | Fleeting Thoughts\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Calculate the REAL scale factor and the angle of rotation from an Android Matrix | @judepereira\" \/>\n\t\t<meta property=\"og:description\" content=\"After performing transformations such as rotation of a bitmap about an arbitrary point, the scale is lost. Of course, this makes sense because the bitmap is rotated inside the same bounds. To get the real scale now, along with the most reliable degree of rotation, I had to follow this method. Hope it saves the rest of you a night or two.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/judepereira.com\/blog\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/judepereira.com\/blog\/wp-content\/uploads\/cropped-foo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/judepereira.com\/blog\/wp-content\/uploads\/cropped-foo.png\" \/>\n\t\t<meta property=\"og:image:width\" content=\"512\" \/>\n\t\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2013-04-13T06:05:16+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2013-04-13T06:05:16+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@judebpereira\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Calculate the REAL scale factor and the angle of rotation from an Android Matrix | @judepereira\" \/>\n\t\t<meta name=\"twitter:description\" content=\"After performing transformations such as rotation of a bitmap about an arbitrary point, the scale is lost. Of course, this makes sense because the bitmap is rotated inside the same bounds. To get the real scale now, along with the most reliable degree of rotation, I had to follow this method. Hope it saves the rest of you a night or two.\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@judebpereira\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/judepereira.com\/blog\/wp-content\/uploads\/cropped-foo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\\\/#article\",\"name\":\"Calculate the REAL scale factor and the angle of rotation from an Android Matrix | @judepereira\",\"headline\":\"Calculate the REAL scale factor and the angle of rotation from an Android Matrix\",\"author\":{\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\\\/#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0a1089f1857938099c95297539cf443242d71c86831e7fa280fdb2a8ff57c360?s=96&r=g\",\"width\":96,\"height\":96,\"caption\":\"Jude Pereira\"},\"datePublished\":\"2013-04-13T11:35:16+05:30\",\"dateModified\":\"2013-04-13T11:35:16+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":4,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\\\/#webpage\"},\"articleSection\":\"android, another snippet | code, android, angle of rotation, degree, degree of rotation, factor, matrix, real, rotate, rotation, scale, skew, transformation\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/category\\\/code\\\/#listItem\",\"name\":\"another snippet | code\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/category\\\/code\\\/#listItem\",\"position\":2,\"name\":\"another snippet | code\",\"item\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/category\\\/code\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/category\\\/code\\\/android\\\/#listItem\",\"name\":\"android\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/category\\\/code\\\/android\\\/#listItem\",\"position\":3,\"name\":\"android\",\"item\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/category\\\/code\\\/android\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\\\/#listItem\",\"name\":\"Calculate the REAL scale factor and the angle of rotation from an Android Matrix\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/category\\\/code\\\/#listItem\",\"name\":\"another snippet | code\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\\\/#listItem\",\"position\":4,\"name\":\"Calculate the REAL scale factor and the angle of rotation from an Android Matrix\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/category\\\/code\\\/android\\\/#listItem\",\"name\":\"android\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/#person\",\"name\":\"Jude Pereira\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\\\/#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0a1089f1857938099c95297539cf443242d71c86831e7fa280fdb2a8ff57c360?s=96&r=g\",\"width\":96,\"height\":96,\"caption\":\"Jude Pereira\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/author\\\/admin\\\/\",\"name\":\"Jude Pereira\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0a1089f1857938099c95297539cf443242d71c86831e7fa280fdb2a8ff57c360?s=96&r=g\",\"width\":96,\"height\":96,\"caption\":\"Jude Pereira\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\\\/#webpage\",\"url\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\\\/\",\"name\":\"Calculate the REAL scale factor and the angle of rotation from an Android Matrix | @judepereira\",\"description\":\"After performing transformations such as rotation of a bitmap about an arbitrary point, the scale is lost. Of course, this makes sense because the bitmap is rotated inside the same bounds. To get the real scale now, along with the most reliable degree of rotation, I had to follow this method. Hope it saves the rest of you a night or two.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"datePublished\":\"2013-04-13T11:35:16+05:30\",\"dateModified\":\"2013-04-13T11:35:16+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/\",\"name\":\"@judepereira\",\"description\":\"Fleeting Thoughts\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/judepereira.com\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Calculate the REAL scale factor and the angle of rotation from an Android Matrix | @judepereira","description":"After performing transformations such as rotation of a bitmap about an arbitrary point, the scale is lost. Of course, this makes sense because the bitmap is rotated inside the same bounds. To get the real scale now, along with the most reliable degree of rotation, I had to follow this method. Hope it saves the rest of you a night or two.","canonical_url":"https:\/\/judepereira.com\/blog\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\/","robots":"max-image-preview:large","keywords":"android,matrix,rotate,degree,rotation,scale,real,factor,skew,transformation,angle of rotation,degree of rotation,another snippet | code","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/judepereira.com\/blog\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\/#article","name":"Calculate the REAL scale factor and the angle of rotation from an Android Matrix | @judepereira","headline":"Calculate the REAL scale factor and the angle of rotation from an Android Matrix","author":{"@id":"https:\/\/judepereira.com\/blog\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/judepereira.com\/blog\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/judepereira.com\/blog\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\/#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/0a1089f1857938099c95297539cf443242d71c86831e7fa280fdb2a8ff57c360?s=96&r=g","width":96,"height":96,"caption":"Jude Pereira"},"datePublished":"2013-04-13T11:35:16+05:30","dateModified":"2013-04-13T11:35:16+05:30","inLanguage":"en-US","commentCount":4,"mainEntityOfPage":{"@id":"https:\/\/judepereira.com\/blog\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\/#webpage"},"isPartOf":{"@id":"https:\/\/judepereira.com\/blog\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\/#webpage"},"articleSection":"android, another snippet | code, android, angle of rotation, degree, degree of rotation, factor, matrix, real, rotate, rotation, scale, skew, transformation"},{"@type":"BreadcrumbList","@id":"https:\/\/judepereira.com\/blog\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/judepereira.com\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/judepereira.com\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/judepereira.com\/blog\/category\/code\/#listItem","name":"another snippet | code"}},{"@type":"ListItem","@id":"https:\/\/judepereira.com\/blog\/category\/code\/#listItem","position":2,"name":"another snippet | code","item":"https:\/\/judepereira.com\/blog\/category\/code\/","nextItem":{"@type":"ListItem","@id":"https:\/\/judepereira.com\/blog\/category\/code\/android\/#listItem","name":"android"},"previousItem":{"@type":"ListItem","@id":"https:\/\/judepereira.com\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/judepereira.com\/blog\/category\/code\/android\/#listItem","position":3,"name":"android","item":"https:\/\/judepereira.com\/blog\/category\/code\/android\/","nextItem":{"@type":"ListItem","@id":"https:\/\/judepereira.com\/blog\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\/#listItem","name":"Calculate the REAL scale factor and the angle of rotation from an Android Matrix"},"previousItem":{"@type":"ListItem","@id":"https:\/\/judepereira.com\/blog\/category\/code\/#listItem","name":"another snippet | code"}},{"@type":"ListItem","@id":"https:\/\/judepereira.com\/blog\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\/#listItem","position":4,"name":"Calculate the REAL scale factor and the angle of rotation from an Android Matrix","previousItem":{"@type":"ListItem","@id":"https:\/\/judepereira.com\/blog\/category\/code\/android\/#listItem","name":"android"}}]},{"@type":"Person","@id":"https:\/\/judepereira.com\/blog\/#person","name":"Jude Pereira","image":{"@type":"ImageObject","@id":"https:\/\/judepereira.com\/blog\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\/#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/0a1089f1857938099c95297539cf443242d71c86831e7fa280fdb2a8ff57c360?s=96&r=g","width":96,"height":96,"caption":"Jude Pereira"}},{"@type":"Person","@id":"https:\/\/judepereira.com\/blog\/author\/admin\/#author","url":"https:\/\/judepereira.com\/blog\/author\/admin\/","name":"Jude Pereira","image":{"@type":"ImageObject","@id":"https:\/\/judepereira.com\/blog\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/0a1089f1857938099c95297539cf443242d71c86831e7fa280fdb2a8ff57c360?s=96&r=g","width":96,"height":96,"caption":"Jude Pereira"}},{"@type":"WebPage","@id":"https:\/\/judepereira.com\/blog\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\/#webpage","url":"https:\/\/judepereira.com\/blog\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\/","name":"Calculate the REAL scale factor and the angle of rotation from an Android Matrix | @judepereira","description":"After performing transformations such as rotation of a bitmap about an arbitrary point, the scale is lost. Of course, this makes sense because the bitmap is rotated inside the same bounds. To get the real scale now, along with the most reliable degree of rotation, I had to follow this method. Hope it saves the rest of you a night or two.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/judepereira.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/judepereira.com\/blog\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\/#breadcrumblist"},"author":{"@id":"https:\/\/judepereira.com\/blog\/author\/admin\/#author"},"creator":{"@id":"https:\/\/judepereira.com\/blog\/author\/admin\/#author"},"datePublished":"2013-04-13T11:35:16+05:30","dateModified":"2013-04-13T11:35:16+05:30"},{"@type":"WebSite","@id":"https:\/\/judepereira.com\/blog\/#website","url":"https:\/\/judepereira.com\/blog\/","name":"@judepereira","description":"Fleeting Thoughts","inLanguage":"en-US","publisher":{"@id":"https:\/\/judepereira.com\/blog\/#person"}}]},"og:locale":"en_US","og:site_name":"@judepereira | Fleeting Thoughts","og:type":"article","og:title":"Calculate the REAL scale factor and the angle of rotation from an Android Matrix | @judepereira","og:description":"After performing transformations such as rotation of a bitmap about an arbitrary point, the scale is lost. Of course, this makes sense because the bitmap is rotated inside the same bounds. To get the real scale now, along with the most reliable degree of rotation, I had to follow this method. Hope it saves the rest of you a night or two.","og:url":"https:\/\/judepereira.com\/blog\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\/","og:image":"https:\/\/judepereira.com\/blog\/wp-content\/uploads\/cropped-foo.png","og:image:secure_url":"https:\/\/judepereira.com\/blog\/wp-content\/uploads\/cropped-foo.png","og:image:width":512,"og:image:height":512,"article:published_time":"2013-04-13T06:05:16+00:00","article:modified_time":"2013-04-13T06:05:16+00:00","twitter:card":"summary","twitter:site":"@judebpereira","twitter:title":"Calculate the REAL scale factor and the angle of rotation from an Android Matrix | @judepereira","twitter:description":"After performing transformations such as rotation of a bitmap about an arbitrary point, the scale is lost. Of course, this makes sense because the bitmap is rotated inside the same bounds. To get the real scale now, along with the most reliable degree of rotation, I had to follow this method. Hope it saves the rest of you a night or two.","twitter:creator":"@judebpereira","twitter:image":"https:\/\/judepereira.com\/blog\/wp-content\/uploads\/cropped-foo.png"},"aioseo_meta_data":{"post_id":"1427","title":"Calculate the REAL scale factor and the angle of rotation from an Android Matrix | #site_title","description":"After performing transformations such as rotation of a bitmap about an arbitrary point, the scale is lost. Of course, this makes sense because the bitmap is rotated inside the same bounds.\r\n\r\nTo get the real scale now, along with the most reliable degree of rotation, I had to follow this method. Hope it saves the rest of you a night or two.","keywords":[{"label":"android","value":"android"},{"label":"matrix","value":"matrix"},{"label":"rotate","value":"rotate"},{"label":"degree","value":"degree"},{"label":"rotation","value":"rotation"},{"label":"scale","value":"scale"},{"label":"real","value":"real"},{"label":"factor","value":"factor"},{"label":"skew","value":"skew"},{"label":"transformation","value":"transformation"},{"label":"angle of rotation","value":"angle of rotation"},{"label":"degree of rotation","value":"degree of rotation"}],"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-25 19:05:22","updated":"2025-06-03 20:09:11","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/judepereira.com\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/judepereira.com\/blog\/category\/code\/\" title=\"another snippet | code\">another snippet | code<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/judepereira.com\/blog\/category\/code\/android\/\" title=\"android\">android<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tCalculate the REAL scale factor and the angle of rotation from an Android Matrix\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/judepereira.com\/blog\/"},{"label":"another snippet | code","link":"https:\/\/judepereira.com\/blog\/category\/code\/"},{"label":"android","link":"https:\/\/judepereira.com\/blog\/category\/code\/android\/"},{"label":"Calculate the REAL scale factor and the angle of rotation from an Android Matrix","link":"https:\/\/judepereira.com\/blog\/calculate-the-real-scale-factor-and-the-angle-of-rotation-from-an-android-matrix\/"}],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/pqtyx-n1","jetpack-related-posts":[{"id":1713,"url":"https:\/\/judepereira.com\/blog\/a-letter-to-tim-cook-regarding-ios-10-with-love-for-apple\/","url_meta":{"origin":1427,"position":0},"title":"A letter to Tim Cook regarding iOS 10, with love for Apple","author":"Jude Pereira","date":"June 17, 2016","format":false,"excerpt":"Tim, iOS has always been known for it's user interface, until recently. Your new take on notifications have not only made them very loud, and unsettling, but do not flow with the entire look and feel of Apple: No Mr. Tim, no. My notifications aren't waiting for me. They're crying\u2026","rel":"","context":"In &quot;life!&quot;","block_context":{"text":"life!","link":"https:\/\/judepereira.com\/blog\/category\/living-a-wonder\/"},"img":{"alt_text":"No Mr. Tim, no. My notifications will not be waiting for me. They're crying out for my attention.","src":"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/Screen-Shot-2016-06-17-at-08.49.59-614x1024.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/Screen-Shot-2016-06-17-at-08.49.59-614x1024.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/Screen-Shot-2016-06-17-at-08.49.59-614x1024.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1778,"url":"https:\/\/judepereira.com\/blog\/letstuneup-a-music-chart-with-arjit-singh-in-the-lead\/","url_meta":{"origin":1427,"position":1},"title":"LetsTuneup: A music chart with Arjit Singh in the lead","author":"Jude Pereira","date":"April 28, 2017","format":false,"excerpt":"LetsTuneup has grown tremendously, and with it, we've introduced new features too. We identified that a few of our users couldn't use the app to it's full extent because they didn't have music on their devices. We've solved that. Users can now pick their favourite artists, powered by a location\u2026","rel":"","context":"In &quot;android&quot;","block_context":{"text":"android","link":"https:\/\/judepereira.com\/blog\/category\/code\/android\/"},"img":{"alt_text":"Arjit Singh in the lead, with Eminem, Linking Park, Coldplay and Pink Floyd following close","src":"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/artists.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1734,"url":"https:\/\/judepereira.com\/blog\/why-matchbox-and-how-it-connects-people-through-music\/","url_meta":{"origin":1427,"position":2},"title":"Why Matchbox, and how it connects people through music","author":"Jude Pereira","date":"January 21, 2017","format":false,"excerpt":"There's no doubt that music defines us. It influences our moods, for example, making us happy by releasing a chemical named dopamine. It can affect what we wear, what we eat, and perhaps even who we enjoy being together with. It affects\u00a0our thought process too (it's well known that ambient\u2026","rel":"","context":"In &quot;android&quot;","block_context":{"text":"android","link":"https:\/\/judepereira.com\/blog\/category\/code\/android\/"},"img":{"alt_text":"Matchbox showing the top 10 artists","src":"https:\/\/i0.wp.com\/judepereira.com\/blog\/wp-content\/uploads\/IMG_7195-300x210.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/posts\/1427","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/comments?post=1427"}],"version-history":[{"count":5,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/posts\/1427\/revisions"}],"predecessor-version":[{"id":1432,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/posts\/1427\/revisions\/1432"}],"wp:attachment":[{"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/media?parent=1427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/categories?post=1427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/judepereira.com\/blog\/wp-json\/wp\/v2\/tags?post=1427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}