AffineTransform
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[[["\u003cp\u003eAffine transform uses a 2x3 matrix to define how pixel locations in an image correspond to real-world coordinates in a Coordinate Reference System (CRS).\u003c/p\u003e\n"],["\u003cp\u003ePixel coordinates start at (0, 0) in the top-left corner and use the "PixelIsArea" raster space.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003etranslateX\u003c/code\u003e and \u003ccode\u003etranslateY\u003c/code\u003e values represent the real-world coordinates of the top-left pixel.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003escaleX\u003c/code\u003e and \u003ccode\u003escaleY\u003c/code\u003e represent the pixel size when there is no rotation or shear, with \u003ccode\u003escaleY\u003c/code\u003e often negative to align the image's orientation with north-west.\u003c/p\u003e\n"]]],[],null,["# AffineTransform\n\nThe affine transform. The six values form a 2x3 matrix: \n\n ( ( scaleX, shearX, translateX )\n ( shearY, scaleY, translateY ) )\n\nspecifying a transformation such that given a pixel location `(u, v)`, the corresponding location in the CRS is this matrix times the column vector `(u, v, 1)`. Pixel coordinates use the \"PixelIsArea\" raster space, i.e. `(0, 0)` is the top-left corner of the top-left pixel, and `(width, height)` is the bottom-right corner of the image. `(translateX, translateY)` is the origin (in the CRS) of the pixel grid. If there is no shear or rotation, then `(scaleX, scaleY)` is the pixel size. `scaleY` is often negative so that the `(0, 0)` pixel corner can represent the north-westernmost corner of the image.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"scaleX\": number, \"shearX\": number, \"translateX\": number, \"shearY\": number, \"scaleY\": number, \"translateY\": number } ``` |\n\n| Fields ||\n|--------------|---------------------------------------------------------------------------------|\n| `scaleX` | `number` The horizontal scale factor. |\n| `shearX` | `number` The horizontal shear factor for some, though not all, transformations. |\n| `translateX` | `number` The horizontal offset. |\n| `shearY` | `number` The vertical shear factor for some, though not all, transformations. |\n| `scaleY` | `number` The vertical scale factor. |\n| `translateY` | `number` The vertical offset. |"]]