[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master a1deb6c: ; * src/image.c: Minor copyedits of native
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master a1deb6c: ; * src/image.c: Minor copyedits of native transform commentary. |
Date: |
Sun, 23 Jun 2019 12:25:32 -0400 (EDT) |
branch: master
commit a1deb6cac305a73e799c63e2fbfe7221790e1e61
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
; * src/image.c: Minor copyedits of native transform commentary.
---
src/image.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/image.c b/src/image.c
index 866323b..7b648c4 100644
--- a/src/image.c
+++ b/src/image.c
@@ -1986,7 +1986,7 @@ compute_image_size (size_t width, size_t height,
Transforms are done by creating a matrix for each action we wish to
take, then multiplying the transformation matrix by each of those
matrices in order (matrix multiplication is not commutative).
- After we’ve done that we can use our modified transformation matrix
+ After we've done that we can use our modified transformation matrix
to transform points. We take the x and y coordinates and convert
them into a 3x1 matrix and multiply that by the transformation
matrix and it gives us a new, transformed, set of coordinates:
@@ -1995,7 +1995,7 @@ compute_image_size (size_t width, size_t height,
[m21 m22 ty] X [y] = [m21*x+m22*y+ty*1] = [y']
[ 0 0 1] [1] [ 0*x+0*y+1*1] [ 1]
- We don’t have to worry about the last step as the graphics toolkit
+ We don't have to worry about the last step as the graphics toolkit
will do it for us.
The three transforms we are concerned with are translation, scaling
@@ -2029,19 +2029,19 @@ compute_image_size (size_t width, size_t height,
[ 0 0 1]
Where r is the angle of rotation required. Rotation occurs around
- the origin, not the centre of the image. Note that this is
+ the origin, not the center of the image. Note that this is
normally considered a counter-clockwise rotation, however because
our y axis is reversed, (0, 0) at the top left, it works as a
clockwise rotation.
The full process of rotating an image is to move the origin to the
- centre of the image (width/2, height/2), perform the rotation, and
+ center of the image (width/2, height/2), perform the rotation, and
finally move the origin back to the top left of the image, which
may now be a different corner.
Cropping is easier as we just move the origin to the top left of
where we want to crop and set the width and height accordingly.
- The matrices don’t know anything about width and height.
+ The matrices don't know anything about width and height.
It's possible to pre-calculate the matrix multiplications and just
generate one transform matrix that will do everything we need in a
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master a1deb6c: ; * src/image.c: Minor copyedits of native transform commentary.,
Eli Zaretskii <=