@jimp/plugin-print
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -0,1 +1,21 @@ | ||
# v1.4.0 (Sat Sep 07 2024) | ||
#### 🐛 Bug Fix | ||
- Bind callback to image instance [#1335](https://github.com/jimp-dev/jimp/pull/1335) ([@hipstersmoothie](https://github.com/hipstersmoothie)) | ||
#### ⚠️ Pushed to `main` | ||
- fix docs build ([@hipstersmoothie](https://github.com/hipstersmoothie)) | ||
#### 📝 Documentation | ||
- Misc doc updates [#1334](https://github.com/jimp-dev/jimp/pull/1334) ([@hipstersmoothie](https://github.com/hipstersmoothie)) | ||
#### Authors: 1 | ||
- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie)) | ||
--- | ||
# v1.2.0 (Tue Sep 03 2024) | ||
@@ -2,0 +22,0 @@ |
@@ -85,3 +85,3 @@ import { HorizontalAlign, VerticalAlign } from "@jimp/core"; | ||
* | ||
* image.print(font, 10, 10, "Hello world!"); | ||
* image.print({ font, x: 10, y: 10, text: "Hello world!" }); | ||
* ``` | ||
@@ -88,0 +88,0 @@ */ |
@@ -114,3 +114,3 @@ "use strict"; | ||
* | ||
* image.print(font, 10, 10, "Hello world!"); | ||
* image.print({ font, x: 10, y: 10, text: "Hello world!" }); | ||
* ``` | ||
@@ -162,3 +162,3 @@ */ | ||
}); | ||
cb({ x: x + longestLine, y }); | ||
cb.bind(image)({ x: x + longestLine, y }); | ||
return image; | ||
@@ -165,0 +165,0 @@ }, |
@@ -85,3 +85,3 @@ import { HorizontalAlign, VerticalAlign } from "@jimp/core"; | ||
* | ||
* image.print(font, 10, 10, "Hello world!"); | ||
* image.print({ font, x: 10, y: 10, text: "Hello world!" }); | ||
* ``` | ||
@@ -88,0 +88,0 @@ */ |
@@ -95,3 +95,3 @@ import { HorizontalAlign, VerticalAlign } from "@jimp/core"; | ||
* | ||
* image.print(font, 10, 10, "Hello world!"); | ||
* image.print({ font, x: 10, y: 10, text: "Hello world!" }); | ||
* ``` | ||
@@ -143,3 +143,3 @@ */ | ||
}); | ||
cb({ x: x + longestLine, y }); | ||
cb.bind(image)({ x: x + longestLine, y }); | ||
return image; | ||
@@ -146,0 +146,0 @@ }, |
{ | ||
"name": "@jimp/plugin-print", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"repository": "jimp-dev/jimp", | ||
@@ -19,6 +19,6 @@ "engines": { | ||
"devDependencies": { | ||
"@jimp/config-eslint": "1.3.0", | ||
"@jimp/config-typescript": "1.3.0", | ||
"@jimp/config-eslint": "1.4.0", | ||
"@jimp/config-typescript": "1.4.0", | ||
"@jimp/js-png": "workspace:*", | ||
"@jimp/test-utils": "1.3.0", | ||
"@jimp/test-utils": "1.4.0", | ||
"@types/node": "^18.19.48", | ||
@@ -28,2 +28,3 @@ "eslint": "^9.9.1", | ||
"typescript": "^5.5.4", | ||
"vite-plugin-node-polyfills": "^0.22.0", | ||
"vitest": "^2.0.5" | ||
@@ -79,7 +80,7 @@ }, | ||
"dependencies": { | ||
"@jimp/core": "1.3.0", | ||
"@jimp/js-jpeg": "1.3.0", | ||
"@jimp/js-png": "1.3.0", | ||
"@jimp/plugin-blit": "1.3.0", | ||
"@jimp/types": "1.3.0", | ||
"@jimp/core": "1.4.0", | ||
"@jimp/js-jpeg": "1.4.0", | ||
"@jimp/js-png": "1.4.0", | ||
"@jimp/plugin-blit": "1.4.0", | ||
"@jimp/types": "1.4.0", | ||
"parse-bmfont-ascii": "^1.0.6", | ||
@@ -95,3 +96,3 @@ "parse-bmfont-binary": "^1.0.6", | ||
"module": "./dist/esm/index.js", | ||
"gitHead": "fb52a357ac774d6314a319fe43f8d0d022ac214c" | ||
"gitHead": "c1b91e9007f17d0702894bd9bfab8215cff764f9" | ||
} |
@@ -42,3 +42,3 @@ import { HorizontalAlign, VerticalAlign } from "@jimp/core"; | ||
maxWidth: number, | ||
alignment: HorizontalAlign, | ||
alignment: HorizontalAlign | ||
) { | ||
@@ -61,3 +61,3 @@ if (alignment === HorizontalAlign.LEFT) { | ||
y: number, | ||
char: BmCharacter, | ||
char: BmCharacter | ||
) { | ||
@@ -89,3 +89,3 @@ if (char.width > 0 && char.height > 0) { | ||
text: string, | ||
defaultCharWidth: number, | ||
defaultCharWidth: number | ||
) { | ||
@@ -136,3 +136,3 @@ for (let i = 0; i < text.length; i++) { | ||
* | ||
* image.print(font, 10, 10, "Hello world!"); | ||
* image.print({ font, x: 10, y: 10, text: "Hello world!" }); | ||
* ``` | ||
@@ -148,3 +148,3 @@ */ | ||
font: BmFont<I>; | ||
}, | ||
} | ||
) { | ||
@@ -192,3 +192,3 @@ let { | ||
const defaultCharWidth = Object.entries(font.chars).find( | ||
(c) => c[1].xadvance, | ||
(c) => c[1].xadvance | ||
)?.[1].xadvance; | ||
@@ -208,3 +208,3 @@ | ||
maxWidth, | ||
alignmentX, | ||
alignmentX | ||
); | ||
@@ -218,3 +218,3 @@ | ||
lineString, | ||
defaultCharWidth, | ||
defaultCharWidth | ||
); | ||
@@ -224,3 +224,3 @@ y += font.common.lineHeight; | ||
cb({ x: x + longestLine, y }); | ||
cb.bind(image)({ x: x + longestLine, y }); | ||
@@ -227,0 +227,0 @@ return image; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2142442
10
+ Added@jimp/core@1.4.0(transitive)
+ Added@jimp/file-ops@1.4.0(transitive)
+ Added@jimp/js-jpeg@1.4.0(transitive)
+ Added@jimp/js-png@1.4.0(transitive)
+ Added@jimp/plugin-blit@1.4.0(transitive)
+ Added@jimp/types@1.4.0(transitive)
+ Added@jimp/utils@1.4.0(transitive)
- Removed@jimp/core@1.3.0(transitive)
- Removed@jimp/file-ops@1.3.0(transitive)
- Removed@jimp/js-jpeg@1.3.0(transitive)
- Removed@jimp/js-png@1.3.0(transitive)
- Removed@jimp/plugin-blit@1.3.0(transitive)
- Removed@jimp/types@1.3.0(transitive)
- Removed@jimp/utils@1.3.0(transitive)
Updated@jimp/core@1.4.0
Updated@jimp/js-jpeg@1.4.0
Updated@jimp/js-png@1.4.0
Updated@jimp/plugin-blit@1.4.0
Updated@jimp/types@1.4.0