MCPcopy
hub / github.com/jimp-dev/jimp / createTranslationFunction

Function createTranslationFunction

plugins/plugin-rotate/src/index.ts:105–112  ·  view source on GitHub ↗
(deltaX: number, deltaY: number)

Source from the content-addressed store, hash-verified

103}
104
105function createTranslationFunction(deltaX: number, deltaY: number) {
106 return function (x: number, y: number) {
107 return {
108 x: x + deltaX,
109 y: y + deltaY,
110 };
111 };
112}
113
114/**
115 * Rotates an image counter-clockwise by an arbitrary number of degrees. NB: 'this' must be a Jimp object.

Callers 1

advancedRotateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…