Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix documentation about rotation direction. #1062

Merged
merged 1 commit into from
Feb 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/jimp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ image.convolute( kernel ); // applies a convolution kernel matrix to the
/* Flip and rotate */
image.flip( horz, vert ); // flip the image horizontally or vertically
image.mirror( horz, vert ); // an alias for flip
image.rotate( deg[, mode] ); // rotate the image clockwise by a number of degrees. Optionally, a resize mode can be passed. If `false` is passed as the second parameter, the image width and height will not be resized.
image.rotate( deg[, mode] ); // rotate the image counter-clockwise by a number of degrees. Optionally, a resize mode can be passed. If `false` is passed as the second parameter, the image width and height will not be resized.

/* Colour */
image.brightness( val ); // adjust the brighness by a value -1 to +1
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-rotate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<p>Rotate an image.</p>
</div>

Rotates the image clockwise by a number of degrees. By default the width and height of the image will be resized appropriately.
Rotates the image counter-clockwise by a number of degrees. By default the width and height of the image will be resized appropriately.

## Usage

- @param {number} deg the number of degrees to rotate the image by
- @param {number} deg the number of degrees to rotate the image by, counter-clockwise
- @param {string|boolean} mode (optional) resize mode or a boolean, if false then the width and height of the image will not be changed
- @param {function(Error, Jimp)} cb (optional) a callback for when complete

Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-rotate/src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { throwError, isNodePattern } from '@jimp/utils';

/**
* Rotates an image clockwise by an arbitrary number of degrees. NB: 'this' must be a Jimp object.
* Rotates an image counter-clockwise by an arbitrary number of degrees. NB: 'this' must be a Jimp object.
* @param {number} deg the number of degrees to rotate the image by
* @param {string|boolean} mode (optional) resize mode or a boolean, if false then the width and height of the image will not be changed
*/
Expand Down Expand Up @@ -110,7 +110,7 @@ function advancedRotate(deg, mode) {

export default () => ({
/**
* Rotates the image clockwise by a number of degrees. By default the width and height of the image will be resized appropriately.
* Rotates the image counter-clockwise by a number of degrees. By default the width and height of the image will be resized appropriately.
* @param {number} deg the number of degrees to rotate the image by
* @param {string|boolean} mode (optional) resize mode or a boolean, if false then the width and height of the image will not be changed
* @param {function(Error, Jimp)} cb (optional) a callback for when complete
Expand Down