apexify.js 4.9.28 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/README.md +727 -456
  2. package/dist/cjs/Canvas/ApexPainter.d.ts +96 -145
  3. package/dist/cjs/Canvas/ApexPainter.d.ts.map +1 -1
  4. package/dist/cjs/Canvas/ApexPainter.js +1416 -420
  5. package/dist/cjs/Canvas/ApexPainter.js.map +1 -1
  6. package/dist/cjs/Canvas/utils/Charts/charts.d.ts +7 -2
  7. package/dist/cjs/Canvas/utils/Charts/charts.d.ts.map +1 -1
  8. package/dist/cjs/Canvas/utils/Charts/charts.js +3 -1
  9. package/dist/cjs/Canvas/utils/Charts/charts.js.map +1 -1
  10. package/dist/cjs/Canvas/utils/Custom/advancedLines.d.ts +75 -0
  11. package/dist/cjs/Canvas/utils/Custom/advancedLines.d.ts.map +1 -0
  12. package/dist/cjs/Canvas/utils/Custom/advancedLines.js +263 -0
  13. package/dist/cjs/Canvas/utils/Custom/advancedLines.js.map +1 -0
  14. package/dist/cjs/Canvas/utils/Custom/customLines.d.ts +2 -1
  15. package/dist/cjs/Canvas/utils/Custom/customLines.d.ts.map +1 -1
  16. package/dist/cjs/Canvas/utils/Custom/customLines.js +73 -6
  17. package/dist/cjs/Canvas/utils/Custom/customLines.js.map +1 -1
  18. package/dist/cjs/Canvas/utils/General/batchOperations.d.ts +17 -0
  19. package/dist/cjs/Canvas/utils/General/batchOperations.d.ts.map +1 -0
  20. package/dist/cjs/Canvas/utils/General/batchOperations.js +88 -0
  21. package/dist/cjs/Canvas/utils/General/batchOperations.js.map +1 -0
  22. package/dist/cjs/Canvas/utils/General/general functions.d.ts +25 -3
  23. package/dist/cjs/Canvas/utils/General/general functions.d.ts.map +1 -1
  24. package/dist/cjs/Canvas/utils/General/general functions.js +37 -9
  25. package/dist/cjs/Canvas/utils/General/general functions.js.map +1 -1
  26. package/dist/cjs/Canvas/utils/General/imageCompression.d.ts +19 -0
  27. package/dist/cjs/Canvas/utils/General/imageCompression.d.ts.map +1 -0
  28. package/dist/cjs/Canvas/utils/General/imageCompression.js +262 -0
  29. package/dist/cjs/Canvas/utils/General/imageCompression.js.map +1 -0
  30. package/dist/cjs/Canvas/utils/General/imageStitching.d.ts +20 -0
  31. package/dist/cjs/Canvas/utils/General/imageStitching.d.ts.map +1 -0
  32. package/dist/cjs/Canvas/utils/General/imageStitching.js +227 -0
  33. package/dist/cjs/Canvas/utils/General/imageStitching.js.map +1 -0
  34. package/dist/cjs/Canvas/utils/Image/imageEffects.d.ts +37 -0
  35. package/dist/cjs/Canvas/utils/Image/imageEffects.d.ts.map +1 -0
  36. package/dist/cjs/Canvas/utils/Image/imageEffects.js +128 -0
  37. package/dist/cjs/Canvas/utils/Image/imageEffects.js.map +1 -0
  38. package/dist/cjs/Canvas/utils/Image/imageMasking.d.ts +67 -0
  39. package/dist/cjs/Canvas/utils/Image/imageMasking.d.ts.map +1 -0
  40. package/dist/cjs/Canvas/utils/Image/imageMasking.js +276 -0
  41. package/dist/cjs/Canvas/utils/Image/imageMasking.js.map +1 -0
  42. package/dist/cjs/Canvas/utils/Image/imageProperties.d.ts.map +1 -1
  43. package/dist/cjs/Canvas/utils/Image/imageProperties.js +181 -2
  44. package/dist/cjs/Canvas/utils/Image/imageProperties.js.map +1 -1
  45. package/dist/cjs/Canvas/utils/Patterns/enhancedPatternRenderer.d.ts.map +1 -1
  46. package/dist/cjs/Canvas/utils/Patterns/enhancedPatternRenderer.js +16 -8
  47. package/dist/cjs/Canvas/utils/Patterns/enhancedPatternRenderer.js.map +1 -1
  48. package/dist/cjs/Canvas/utils/Texts/enhancedTextRenderer.d.ts +33 -0
  49. package/dist/cjs/Canvas/utils/Texts/enhancedTextRenderer.d.ts.map +1 -1
  50. package/dist/cjs/Canvas/utils/Texts/enhancedTextRenderer.js +237 -32
  51. package/dist/cjs/Canvas/utils/Texts/enhancedTextRenderer.js.map +1 -1
  52. package/dist/cjs/Canvas/utils/Texts/textPathRenderer.d.ts +17 -0
  53. package/dist/cjs/Canvas/utils/Texts/textPathRenderer.d.ts.map +1 -0
  54. package/dist/cjs/Canvas/utils/Texts/textPathRenderer.js +233 -0
  55. package/dist/cjs/Canvas/utils/Texts/textPathRenderer.js.map +1 -0
  56. package/dist/cjs/Canvas/utils/types.d.ts +171 -10
  57. package/dist/cjs/Canvas/utils/types.d.ts.map +1 -1
  58. package/dist/cjs/Canvas/utils/types.js.map +1 -1
  59. package/dist/cjs/Canvas/utils/utils.d.ts +9 -2
  60. package/dist/cjs/Canvas/utils/utils.d.ts.map +1 -1
  61. package/dist/cjs/Canvas/utils/utils.js +32 -1
  62. package/dist/cjs/Canvas/utils/utils.js.map +1 -1
  63. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  64. package/dist/esm/Canvas/ApexPainter.d.ts +96 -145
  65. package/dist/esm/Canvas/ApexPainter.d.ts.map +1 -1
  66. package/dist/esm/Canvas/ApexPainter.js +1416 -420
  67. package/dist/esm/Canvas/ApexPainter.js.map +1 -1
  68. package/dist/esm/Canvas/utils/Charts/charts.d.ts +7 -2
  69. package/dist/esm/Canvas/utils/Charts/charts.d.ts.map +1 -1
  70. package/dist/esm/Canvas/utils/Charts/charts.js +3 -1
  71. package/dist/esm/Canvas/utils/Charts/charts.js.map +1 -1
  72. package/dist/esm/Canvas/utils/Custom/advancedLines.d.ts +75 -0
  73. package/dist/esm/Canvas/utils/Custom/advancedLines.d.ts.map +1 -0
  74. package/dist/esm/Canvas/utils/Custom/advancedLines.js +263 -0
  75. package/dist/esm/Canvas/utils/Custom/advancedLines.js.map +1 -0
  76. package/dist/esm/Canvas/utils/Custom/customLines.d.ts +2 -1
  77. package/dist/esm/Canvas/utils/Custom/customLines.d.ts.map +1 -1
  78. package/dist/esm/Canvas/utils/Custom/customLines.js +73 -6
  79. package/dist/esm/Canvas/utils/Custom/customLines.js.map +1 -1
  80. package/dist/esm/Canvas/utils/General/batchOperations.d.ts +17 -0
  81. package/dist/esm/Canvas/utils/General/batchOperations.d.ts.map +1 -0
  82. package/dist/esm/Canvas/utils/General/batchOperations.js +88 -0
  83. package/dist/esm/Canvas/utils/General/batchOperations.js.map +1 -0
  84. package/dist/esm/Canvas/utils/General/general functions.d.ts +25 -3
  85. package/dist/esm/Canvas/utils/General/general functions.d.ts.map +1 -1
  86. package/dist/esm/Canvas/utils/General/general functions.js +37 -9
  87. package/dist/esm/Canvas/utils/General/general functions.js.map +1 -1
  88. package/dist/esm/Canvas/utils/General/imageCompression.d.ts +19 -0
  89. package/dist/esm/Canvas/utils/General/imageCompression.d.ts.map +1 -0
  90. package/dist/esm/Canvas/utils/General/imageCompression.js +262 -0
  91. package/dist/esm/Canvas/utils/General/imageCompression.js.map +1 -0
  92. package/dist/esm/Canvas/utils/General/imageStitching.d.ts +20 -0
  93. package/dist/esm/Canvas/utils/General/imageStitching.d.ts.map +1 -0
  94. package/dist/esm/Canvas/utils/General/imageStitching.js +227 -0
  95. package/dist/esm/Canvas/utils/General/imageStitching.js.map +1 -0
  96. package/dist/esm/Canvas/utils/Image/imageEffects.d.ts +37 -0
  97. package/dist/esm/Canvas/utils/Image/imageEffects.d.ts.map +1 -0
  98. package/dist/esm/Canvas/utils/Image/imageEffects.js +128 -0
  99. package/dist/esm/Canvas/utils/Image/imageEffects.js.map +1 -0
  100. package/dist/esm/Canvas/utils/Image/imageMasking.d.ts +67 -0
  101. package/dist/esm/Canvas/utils/Image/imageMasking.d.ts.map +1 -0
  102. package/dist/esm/Canvas/utils/Image/imageMasking.js +276 -0
  103. package/dist/esm/Canvas/utils/Image/imageMasking.js.map +1 -0
  104. package/dist/esm/Canvas/utils/Image/imageProperties.d.ts.map +1 -1
  105. package/dist/esm/Canvas/utils/Image/imageProperties.js +181 -2
  106. package/dist/esm/Canvas/utils/Image/imageProperties.js.map +1 -1
  107. package/dist/esm/Canvas/utils/Patterns/enhancedPatternRenderer.d.ts.map +1 -1
  108. package/dist/esm/Canvas/utils/Patterns/enhancedPatternRenderer.js +16 -8
  109. package/dist/esm/Canvas/utils/Patterns/enhancedPatternRenderer.js.map +1 -1
  110. package/dist/esm/Canvas/utils/Texts/enhancedTextRenderer.d.ts +33 -0
  111. package/dist/esm/Canvas/utils/Texts/enhancedTextRenderer.d.ts.map +1 -1
  112. package/dist/esm/Canvas/utils/Texts/enhancedTextRenderer.js +237 -32
  113. package/dist/esm/Canvas/utils/Texts/enhancedTextRenderer.js.map +1 -1
  114. package/dist/esm/Canvas/utils/Texts/textPathRenderer.d.ts +17 -0
  115. package/dist/esm/Canvas/utils/Texts/textPathRenderer.d.ts.map +1 -0
  116. package/dist/esm/Canvas/utils/Texts/textPathRenderer.js +233 -0
  117. package/dist/esm/Canvas/utils/Texts/textPathRenderer.js.map +1 -0
  118. package/dist/esm/Canvas/utils/types.d.ts +171 -10
  119. package/dist/esm/Canvas/utils/types.d.ts.map +1 -1
  120. package/dist/esm/Canvas/utils/types.js.map +1 -1
  121. package/dist/esm/Canvas/utils/utils.d.ts +9 -2
  122. package/dist/esm/Canvas/utils/utils.d.ts.map +1 -1
  123. package/dist/esm/Canvas/utils/utils.js +32 -1
  124. package/dist/esm/Canvas/utils/utils.js.map +1 -1
  125. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  126. package/lib/Canvas/ApexPainter.ts +1309 -267
  127. package/lib/Canvas/utils/Charts/charts.ts +16 -7
  128. package/lib/Canvas/utils/Custom/advancedLines.ts +335 -0
  129. package/lib/Canvas/utils/Custom/customLines.ts +84 -9
  130. package/lib/Canvas/utils/General/batchOperations.ts +103 -0
  131. package/lib/Canvas/utils/General/general functions.ts +85 -41
  132. package/lib/Canvas/utils/General/imageCompression.ts +316 -0
  133. package/lib/Canvas/utils/General/imageStitching.ts +252 -0
  134. package/lib/Canvas/utils/Image/imageEffects.ts +175 -0
  135. package/lib/Canvas/utils/Image/imageMasking.ts +335 -0
  136. package/lib/Canvas/utils/Image/imageProperties.ts +207 -2
  137. package/lib/Canvas/utils/Patterns/enhancedPatternRenderer.ts +455 -444
  138. package/lib/Canvas/utils/Texts/enhancedTextRenderer.ts +274 -36
  139. package/lib/Canvas/utils/Texts/textPathRenderer.ts +320 -0
  140. package/lib/Canvas/utils/types.ts +173 -10
  141. package/lib/Canvas/utils/utils.ts +49 -2
  142. package/package.json +69 -34
package/README.md CHANGED
@@ -1,456 +1,727 @@
1
- # 🎨 ApexPainter - Advanced Canvas Rendering Library
2
-
3
- <div align="center">
4
-
5
- ![ApexPainter Banner](apex-banner.png)
6
-
7
- **The Ultimate TypeScript Canvas Library for Node.js**
8
-
9
- [![npm version](https://badge.fury.io/js/apexify.svg)](https://badge.fury.io/js/apexify)
10
- [![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)
11
- [![Node.js](https://img.shields.io/badge/Node.js-16%2B-green.svg)](https://nodejs.org/)
12
- [![License](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
13
-
14
- *Create stunning visuals with professional-grade canvas rendering, image processing, and text effects*
15
-
16
- </div>
17
-
18
- ## ✨ Features Overview
19
-
20
- ### 🖼️ **Advanced Image Processing**
21
- - **Professional Filters**: 22+ filters including blur, sharpen, vintage, cinematic effects
22
- - **Shape Drawing**: 8+ shapes (rectangle, circle, heart, star, polygon, etc.)
23
- - **Gradient Support**: Linear and radial gradients for fills and strokes
24
- - **Shadow & Stroke Effects**: Customizable shadows and strokes for all shapes
25
- - **Rotation & Positioning**: Full control over image placement and rotation
26
-
27
- ### 🎨 **Rich Background System**
28
- - **Multiple Background Types**: Solid colors, gradients, custom images
29
- - **Pattern Overlays**: 12+ built-in patterns (grid, dots, stripes, hexagons, etc.)
30
- - **Custom Patterns**: Use your own images as repeating patterns
31
- - **Blend Modes**: 11+ blend modes for professional compositing
32
- - **Noise Effects**: Add texture with customizable noise intensity
33
-
34
- ### 📝 **Enhanced Text Rendering**
35
- - **Font Management**: Custom fonts, sizes, families, and styles
36
- - **Text Decorations**: Bold, italic, underline, overline, strikethrough, highlight
37
- - **Advanced Effects**: Glow, shadow, stroke with gradient support
38
- - **Spacing Control**: Letter spacing, word spacing, line height
39
- - **Text Wrapping**: Automatic text wrapping with size constraints
40
- - **Rotation**: Full 360° text rotation support
41
-
42
- ### 🔧 **Professional Tools**
43
- - **Chart Generation**: Bar charts, pie charts, line charts
44
- - **GIF Creation**: Animated GIFs from image sequences
45
- - **Format Conversion**: Convert between PNG, JPEG, WebP, and more
46
- - **Image Manipulation**: Crop, resize, background removal
47
- - **Color Detection**: Extract and analyze colors from images
48
-
49
- ---
50
-
51
- ## 🚀 Quick Start
52
-
53
- ### Installation
54
-
55
- ```bash
56
- npm install apexify
57
- ```
58
-
59
- ### Basic Usage
60
-
61
- ```typescript
62
- import { ApexPainter } from 'apexify';
63
-
64
- const painter = new ApexPainter();
65
-
66
- // Create a canvas with gradient background
67
- const canvas = await painter.createCanvas({
68
- width: 800,
69
- height: 600,
70
- gradientBg: {
71
- type: 'linear',
72
- colors: [
73
- { color: '#FF6B6B', position: 0 },
74
- { color: '#4ECDC4', position: 0.5 },
75
- { color: '#45B7D1', position: 1 }
76
- ],
77
- direction: { x1: 0, y1: 0, x2: 800, y2: 600 }
78
- },
79
- shadow: {
80
- color: '#000',
81
- offsetX: 10,
82
- offsetY: 10,
83
- blur: 20
84
- },
85
- borderRadius: 20
86
- });
87
-
88
- // Add a beautiful heart shape (single object)
89
- const heartImage = await painter.createImage({
90
- source: 'heart',
91
- x: 300,
92
- y: 200,
93
- width: 200,
94
- height: 200,
95
- shape: {
96
- fill: true,
97
- gradient: {
98
- type: 'radial',
99
- colors: [
100
- { color: '#FF6B6B', position: 0 },
101
- { color: '#FF1744', position: 1 }
102
- ],
103
- center: { x: 100, y: 100 },
104
- radius: 100
105
- }
106
- },
107
- shadow: {
108
- color: '#000',
109
- offsetX: 15,
110
- offsetY: 15,
111
- blur: 25
112
- },
113
- stroke: {
114
- color: '#FFF',
115
- width: 5
116
- }
117
- }, canvas.buffer);
118
-
119
- // Add stunning text (single object)
120
- const textImage = await painter.createText({
121
- text: 'ApexPainter',
122
- x: 400,
123
- y: 450,
124
- fontSize: 48,
125
- fontFamily: 'Arial',
126
- bold: true,
127
- gradient: {
128
- type: 'linear',
129
- colors: [
130
- { color: '#FFD700', position: 0 },
131
- { color: '#FF6B6B', position: 1 }
132
- ],
133
- direction: { x1: 0, y1: 0, x2: 300, y2: 0 }
134
- },
135
- glow: {
136
- color: '#FFD700',
137
- intensity: 0.8,
138
- opacity: 0.9
139
- },
140
- shadow: {
141
- color: '#000',
142
- offsetX: 8,
143
- offsetY: 8,
144
- blur: 15
145
- },
146
- stroke: {
147
- color: '#FFF',
148
- width: 3
149
- }
150
- }, heartImage);
151
-
152
- // Save the result
153
- fs.writeFileSync('beautiful-artwork.png', textImage);
154
- ```
155
-
156
- ### 📝 **Flexible Array Support**
157
-
158
- Both `createImage()` and `createText()` methods accept **single objects** OR **arrays of objects**:
159
-
160
- ```typescript
161
- // ✅ Single Object
162
- await painter.createImage({
163
- source: 'heart',
164
- x: 100, y: 100,
165
- width: 200, height: 200,
166
- shape: { fill: true, color: '#ff6b6b' }
167
- }, canvasBuffer);
168
-
169
- // ✅ Array of Objects
170
- await painter.createImage([
171
- {
172
- source: 'rectangle',
173
- x: 50, y: 50,
174
- width: 100, height: 80,
175
- shape: { fill: true, color: '#ff6b6b' }
176
- },
177
- {
178
- source: 'circle',
179
- x: 200, y: 50,
180
- width: 80, height: 80,
181
- shape: { fill: true, color: '#4ecdc4' }
182
- },
183
- {
184
- source: 'star',
185
- x: 350, y: 50,
186
- width: 80, height: 80,
187
- shape: { fill: true, color: '#45b7d1' }
188
- }
189
- ], canvasBuffer);
190
-
191
- // ✅ Single Text Object
192
- await painter.createText({
193
- text: 'Hello World',
194
- x: 100, y: 100,
195
- fontSize: 24,
196
- color: '#ff6b6b'
197
- }, canvasBuffer);
198
-
199
- // Array of Text Objects
200
- await painter.createText([
201
- {
202
- text: 'Title',
203
- x: 100, y: 50,
204
- fontSize: 32,
205
- bold: true,
206
- color: '#2c3e50'
207
- },
208
- {
209
- text: 'Subtitle',
210
- x: 100, y: 100,
211
- fontSize: 18,
212
- color: '#666'
213
- },
214
- {
215
- text: 'Body text with effects',
216
- x: 100, y: 150,
217
- fontSize: 14,
218
- color: '#333',
219
- glow: { color: '#ffd700', intensity: 0.5 },
220
- shadow: { color: '#000', offsetX: 2, offsetY: 2, blur: 4 }
221
- }
222
- ], canvasBuffer);
223
- ```
224
-
225
- ---
226
-
227
- ## 🎯 Real-World Examples
228
-
229
- ### 🏢 **Business Cards & Marketing Materials**
230
-
231
- ```typescript
232
- // Create a professional business card
233
- const businessCard = await painter.createCanvas({
234
- width: 400,
235
- height: 250,
236
- gradientBg: {
237
- type: 'linear',
238
- colors: [
239
- { color: '#2C3E50', position: 0 },
240
- { color: '#34495E', position: 1 }
241
- ],
242
- direction: { x1: 0, y1: 0, x2: 400, y2: 250 }
243
- },
244
- patternBg: {
245
- type: 'dots',
246
- color: '#FFF',
247
- opacity: 0.1,
248
- size: 5,
249
- spacing: 20
250
- }
251
- });
252
-
253
- // Add company logo (star shape)
254
- const logo = await painter.createImage({
255
- source: 'star',
256
- x: 50,
257
- y: 50,
258
- width: 60,
259
- height: 60,
260
- fill: true,
261
- color: '#FFD700',
262
- shadow: { color: '#000', offsetX: 3, offsetY: 3, blur: 8 }
263
- }, businessCard.buffer);
264
-
265
- // Add company name
266
- const companyText = await painter.createText({
267
- text: 'ACME Corp',
268
- x: 130,
269
- y: 80,
270
- fontSize: 24,
271
- fontFamily: 'Arial',
272
- bold: true,
273
- color: '#FFF',
274
- shadow: { color: '#000', offsetX: 2, offsetY: 2, blur: 4 }
275
- }, logo);
276
-
277
- // Add contact info
278
- const contactText = await painter.createText({
279
- text: 'john@acme.com\n+1 (555) 123-4567',
280
- x: 50,
281
- y: 150,
282
- fontSize: 14,
283
- fontFamily: 'Arial',
284
- color: '#BDC3C7',
285
- lineHeight: 1.5
286
- }, companyText);
287
- ```
288
-
289
- ### 🎮 **Game UI Elements**
290
-
291
- ```typescript
292
- // Create a game button
293
- const gameButton = await painter.createCanvas({
294
- width: 200,
295
- height: 60,
296
- gradientBg: {
297
- type: 'linear',
298
- colors: [
299
- { color: '#FF6B6B', position: 0 },
300
- { color: '#FF1744', position: 1 }
301
- ],
302
- direction: { x1: 0, y1: 0, x2: 200, y2: 60 }
303
- },
304
- shadow: {
305
- color: '#000',
306
- offsetX: 5,
307
- offsetY: 5,
308
- blur: 15
309
- },
310
- borderRadius: 30
311
- });
312
-
313
- // Add button text with glow effect
314
- const buttonText = await painter.createText({
315
- text: 'PLAY NOW',
316
- x: 100,
317
- y: 35,
318
- fontSize: 20,
319
- fontFamily: 'Arial',
320
- bold: true,
321
- color: '#FFF',
322
- textAlign: 'center',
323
- textBaseline: 'middle',
324
- glow: {
325
- color: '#FFD700',
326
- intensity: 0.6,
327
- opacity: 0.8
328
- },
329
- shadow: {
330
- color: '#000',
331
- offsetX: 2,
332
- offsetY: 2,
333
- blur: 4
334
- }
335
- }, gameButton.buffer);
336
- ```
337
-
338
- ---
339
-
340
- ## 📚 API Reference
341
-
342
- ### Core Methods
343
-
344
- | Method | Description | Parameters |
345
- |--------|-------------|------------|
346
- | `createCanvas()` | Create a new canvas with background | `CanvasConfig` |
347
- | `createImage()` | Add shapes/images to canvas | `ImageProperties \| ImageProperties[]` |
348
- | `createText()` | Add text to canvas | `TextProperties \| TextProperties[]` |
349
- | `createChart()` | Generate charts | `ChartConfig` |
350
- | `createGIF()` | Create animated GIFs | `GIFConfig` |
351
-
352
- ### 🔄 **Flexible Parameters**
353
-
354
- Both `createImage()` and `createText()` methods accept:
355
- - **Single Object**: `ImageProperties` or `TextProperties`
356
- - **Array of Objects**: `ImageProperties[]` or `TextProperties[]`
357
-
358
- This allows you to add multiple elements in one call for better performance and cleaner code.
359
-
360
- ### Shape Types
361
-
362
- - `rectangle` - Standard rectangle
363
- - `square` - Perfect square
364
- - `circle` - Perfect circle
365
- - `triangle` - Equilateral triangle
366
- - `trapezium` - Trapezoid shape
367
- - `star` - 5-pointed star
368
- - `heart` - Heart shape with bezier curves
369
- - `polygon` - Custom polygon
370
-
371
- ### Pattern Types
372
-
373
- - `grid` - Grid pattern
374
- - `dots` - Dot pattern
375
- - `diagonal` - Diagonal lines
376
- - `stripes` - Horizontal/vertical stripes
377
- - `waves` - Wave pattern
378
- - `crosses` - Cross pattern
379
- - `hexagons` - Hexagonal pattern
380
- - `checkerboard` - Checkerboard pattern
381
- - `diamonds` - Diamond pattern
382
- - `triangles` - Triangle pattern
383
- - `stars` - Star pattern
384
- - `polka` - Polka dot pattern
385
- - `custom` - Custom image pattern
386
-
387
- ---
388
-
389
- ## 🤝 Contributing
390
-
391
- We welcome contributions! Here's how you can help:
392
-
393
- 1. **Report Bugs**: Found a bug? Open an issue with detailed information
394
- 2. **Feature Requests**: Have an idea? We'd love to hear it!
395
- 3. **Code Contributions**: Submit pull requests for improvements
396
- 4. **Documentation**: Help improve our docs and examples
397
-
398
- ### Development Setup
399
-
400
- ```bash
401
- # Clone the repository
402
- git clone https://github.com/your-username/apexify.git
403
-
404
- # Install dependencies
405
- npm install
406
-
407
- # Run tests
408
- npm test
409
-
410
- # Build the project
411
- npm run build
412
- ```
413
-
414
- ---
415
-
416
- ## 📞 Support & Community
417
-
418
- <div align="center">
419
-
420
- ### Join Our Discord Community
421
-
422
- [![Jedi Studio](https://img.shields.io/badge/Discord-Jedi%20Studio-7289DA?style=for-the-badge&logo=discord)](https://discord.gg/CS2NRSPyze)
423
- [![FresedGPT](https://img.shields.io/badge/Discord-FresedGPT-7289DA?style=for-the-badge&logo=discord)](https://discord.gg/94qUZWhwFE)
424
- [![ElectronHub](https://img.shields.io/badge/Discord-ElectronHub-7289DA?style=for-the-badge&logo=discord)](https://discord.gg/83XcjD8vgW)
425
-
426
- ### Documentation & Resources
427
-
428
- [![Documentation](https://img.shields.io/badge/Docs-Apexify.js-blue?style=for-the-badge)](http://apexifyjs.jedi-studio.com)
429
- [![Support Server](https://img.shields.io/badge/Support-Discord-7289DA?style=for-the-badge&logo=discord)](https://discord.gg/mDyXV9hzXw)
430
-
431
- </div>
432
-
433
- ---
434
-
435
- ## 📄 License
436
-
437
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
438
-
439
- ---
440
-
441
- ## 🙏 Acknowledgments
442
-
443
- - **@napi-rs/canvas** - High-performance canvas rendering
444
- - **Sharp** - Professional image processing
445
- - **Jimp** - JavaScript image manipulation
446
- - **TypeScript** - Type-safe development
447
-
448
- ---
449
-
450
- <div align="center">
451
-
452
- **Made with ❤️ by [Jedi Studio](https://discord.gg/CS2NRSPyze)**
453
-
454
- *Create stunning visuals with ApexPainter - The ultimate canvas library for Node.js*
455
-
456
- </div>
1
+ # 🎨 ApexPainter - Advanced Canvas Rendering Library
2
+
3
+ <div align="center">
4
+
5
+ ![ApexPainter Banner](./apex-banner.png)
6
+
7
+ **The Ultimate TypeScript Canvas Library for Node.js**
8
+
9
+ [![npm version](https://badge.fury.io/js/apexify.svg)](https://badge.fury.io/js/apexify)
10
+ [![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)
11
+ [![Node.js](https://img.shields.io/badge/Node.js-16%2B-green.svg)](https://nodejs.org/)
12
+ [![License](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
13
+
14
+ *Create stunning visuals with professional-grade canvas rendering, image processing, and text effects*
15
+
16
+ </div>
17
+
18
+ ## ✨ Features Overview
19
+
20
+ ### 🖼️ **Advanced Image Processing**
21
+ - **Professional Filters**: 22+ filters including blur, sharpen, vintage, cinematic effects
22
+ - **Image Masking**: Apply masks with alpha, luminance, or inverse modes
23
+ - **Image Distortion**: Perspective, bulge, pinch, and mesh warping effects
24
+ - **Effects Stack**: Vignette, lens flare, chromatic aberration, film grain
25
+ - **Shape Drawing**: 8+ shapes (rectangle, circle, heart, star, polygon, etc.)
26
+ - **Gradient Support**: Linear and radial gradients for fills and strokes
27
+ - **Shadow & Stroke Effects**: Customizable shadows and strokes for all shapes
28
+ - **Rotation & Positioning**: Full control over image placement and rotation
29
+ - **Image Stitching**: Combine multiple images into panoramas or grids
30
+ - **Collage Maker**: Create beautiful collages with multiple layout options
31
+ - **Image Compression**: Optimize images with quality control (JPEG, WebP, AVIF)
32
+ - **Color Palette Extraction**: Extract color palettes using multiple algorithms
33
+
34
+ ### 🎨 **Rich Background System**
35
+ - **Multiple Background Types**: Solid colors, gradients, custom images
36
+ - **Video Backgrounds**: Extract frames from videos for dynamic backgrounds
37
+ - **Background Filters**: Apply filters directly to background images
38
+ - **Pattern Overlays**: 12+ built-in patterns (grid, dots, stripes, hexagons, etc.)
39
+ - **Custom Patterns**: Use your own images as repeating patterns
40
+ - **Blend Modes**: 11+ blend modes for professional compositing
41
+ - **Noise Effects**: Add texture with customizable noise intensity
42
+
43
+ ### 📝 **Enhanced Text Rendering**
44
+ - **Font Management**: Custom fonts, sizes, families, and styles
45
+ - **Text on Paths**: Render text along curves (line, arc, bezier, quadratic)
46
+ - **Text Decorations**: Bold, italic, underline, overline, strikethrough, highlight
47
+ - **Advanced Effects**: Glow, shadow, stroke with gradient support
48
+ - **Spacing Control**: Letter spacing, word spacing, line height
49
+ - **Text Wrapping**: Automatic text wrapping with size constraints
50
+ - **Rotation**: Full 360° text rotation support
51
+
52
+ ### 🎯 **Advanced Custom Lines**
53
+ - **Smooth Paths**: Bezier, Catmull-Rom, and smooth interpolation
54
+ - **Arrow Markers**: Customizable start/end arrows with multiple styles
55
+ - **Path Markers**: Add markers at any position along paths
56
+ - **Line Patterns**: Dots, dashes, and custom pattern segments
57
+ - **Line Textures**: Apply texture images to lines
58
+
59
+ ### 🔧 **Professional Tools**
60
+ - **Chart Generation**: Bar charts, pie charts, line charts
61
+ - **GIF Creation**: Animated GIFs from image sequences
62
+ - **Format Conversion**: Convert between PNG, JPEG, WebP, AVIF, and more
63
+ - **Image Manipulation**: Crop, resize, background removal
64
+ - **Color Detection**: Extract and analyze colors from images
65
+ - **Batch Operations**: Process multiple operations in parallel
66
+ - **Chain Operations**: Chain operations sequentially for complex workflows
67
+
68
+ ---
69
+
70
+ ## 🚀 Quick Start
71
+
72
+ ### Installation
73
+
74
+ ```bash
75
+ npm install apexify
76
+ ```
77
+
78
+ ### Basic Usage
79
+
80
+ ```typescript
81
+ import { ApexPainter } from 'apexify';
82
+
83
+ const painter = new ApexPainter();
84
+
85
+ // Create a canvas with gradient background
86
+ const canvas = await painter.createCanvas({
87
+ width: 800,
88
+ height: 600,
89
+ gradientBg: {
90
+ type: 'linear',
91
+ colors: [
92
+ { color: '#FF6B6B', position: 0 },
93
+ { color: '#4ECDC4', position: 0.5 },
94
+ { color: '#45B7D1', position: 1 }
95
+ ],
96
+ direction: { x1: 0, y1: 0, x2: 800, y2: 600 }
97
+ },
98
+ shadow: {
99
+ color: '#000',
100
+ offsetX: 10,
101
+ offsetY: 10,
102
+ blur: 20
103
+ },
104
+ borderRadius: 20
105
+ });
106
+
107
+ // Add a beautiful heart shape (single object)
108
+ const heartImage = await painter.createImage({
109
+ source: 'heart',
110
+ x: 300,
111
+ y: 200,
112
+ width: 200,
113
+ height: 200,
114
+ shape: {
115
+ fill: true,
116
+ gradient: {
117
+ type: 'radial',
118
+ colors: [
119
+ { color: '#FF6B6B', position: 0 },
120
+ { color: '#FF1744', position: 1 }
121
+ ],
122
+ center: { x: 100, y: 100 },
123
+ radius: 100
124
+ }
125
+ },
126
+ shadow: {
127
+ color: '#000',
128
+ offsetX: 15,
129
+ offsetY: 15,
130
+ blur: 25
131
+ },
132
+ stroke: {
133
+ color: '#FFF',
134
+ width: 5
135
+ }
136
+ }, canvas.buffer);
137
+
138
+ // Add stunning text (single object)
139
+ const textImage = await painter.createText({
140
+ text: 'ApexPainter',
141
+ x: 400,
142
+ y: 450,
143
+ fontSize: 48,
144
+ fontFamily: 'Arial',
145
+ bold: true,
146
+ gradient: {
147
+ type: 'linear',
148
+ colors: [
149
+ { color: '#FFD700', position: 0 },
150
+ { color: '#FF6B6B', position: 1 }
151
+ ],
152
+ direction: { x1: 0, y1: 0, x2: 300, y2: 0 }
153
+ },
154
+ glow: {
155
+ color: '#FFD700',
156
+ intensity: 0.8,
157
+ opacity: 0.9
158
+ },
159
+ shadow: {
160
+ color: '#000',
161
+ offsetX: 8,
162
+ offsetY: 8,
163
+ blur: 15
164
+ },
165
+ stroke: {
166
+ color: '#FFF',
167
+ width: 3
168
+ }
169
+ }, heartImage);
170
+
171
+ // Save the result
172
+ fs.writeFileSync('beautiful-artwork.png', textImage);
173
+ ```
174
+
175
+ ### 📝 **Flexible Array Support**
176
+
177
+ Both `createImage()` and `createText()` methods accept **single objects** OR **arrays of objects**:
178
+
179
+ ```typescript
180
+ // Single Object
181
+ await painter.createImage({
182
+ source: 'heart',
183
+ x: 100, y: 100,
184
+ width: 200, height: 200,
185
+ shape: { fill: true, color: '#ff6b6b' }
186
+ }, canvasBuffer);
187
+
188
+ // ✅ Array of Objects
189
+ await painter.createImage([
190
+ {
191
+ source: 'rectangle',
192
+ x: 50, y: 50,
193
+ width: 100, height: 80,
194
+ shape: { fill: true, color: '#ff6b6b' }
195
+ },
196
+ {
197
+ source: 'circle',
198
+ x: 200, y: 50,
199
+ width: 80, height: 80,
200
+ shape: { fill: true, color: '#4ecdc4' }
201
+ },
202
+ {
203
+ source: 'star',
204
+ x: 350, y: 50,
205
+ width: 80, height: 80,
206
+ shape: { fill: true, color: '#45b7d1' }
207
+ }
208
+ ], canvasBuffer);
209
+
210
+ // Single Text Object
211
+ await painter.createText({
212
+ text: 'Hello World',
213
+ x: 100, y: 100,
214
+ fontSize: 24,
215
+ color: '#ff6b6b'
216
+ }, canvasBuffer);
217
+
218
+ // ✅ Array of Text Objects
219
+ await painter.createText([
220
+ {
221
+ text: 'Title',
222
+ x: 100, y: 50,
223
+ fontSize: 32,
224
+ bold: true,
225
+ color: '#2c3e50'
226
+ },
227
+ {
228
+ text: 'Subtitle',
229
+ x: 100, y: 100,
230
+ fontSize: 18,
231
+ color: '#666'
232
+ },
233
+ {
234
+ text: 'Body text with effects',
235
+ x: 100, y: 150,
236
+ fontSize: 14,
237
+ color: '#333',
238
+ glow: { color: '#ffd700', intensity: 0.5 },
239
+ shadow: { color: '#000', offsetX: 2, offsetY: 2, blur: 4 }
240
+ }
241
+ ], canvasBuffer);
242
+ ```
243
+
244
+ ### 🎨 **Advanced Stroke Styles**
245
+
246
+ All stroke properties now support **6 different stroke styles**:
247
+
248
+ ```typescript
249
+ // ✅ Basic Stroke Styles
250
+ await painter.createImage({
251
+ source: 'rectangle',
252
+ x: 100, y: 100,
253
+ width: 200, height: 150,
254
+ shape: { fill: true, color: '#ffffff' },
255
+ stroke: {
256
+ color: '#ff6b6b',
257
+ width: 8,
258
+ style: 'dashed' // solid, dashed, dotted, groove, ridge, double
259
+ }
260
+ }, canvasBuffer);
261
+
262
+ // Gradient Strokes with Styles
263
+ await painter.createImage({
264
+ source: 'circle',
265
+ x: 200, y: 200,
266
+ width: 150, height: 150,
267
+ shape: { fill: true, color: '#ffffff' },
268
+ stroke: {
269
+ gradient: {
270
+ type: 'linear',
271
+ colors: [
272
+ { stop: 0, color: '#ff6b6b' },
273
+ { stop: 1, color: '#4ecdc4' }
274
+ ]
275
+ },
276
+ width: 6,
277
+ style: 'ridge' // Works with all styles!
278
+ }
279
+ }, canvasBuffer);
280
+
281
+ // ✅ Text Strokes with Styles
282
+ await painter.createText({
283
+ text: 'Styled Text',
284
+ x: 100, y: 100,
285
+ fontSize: 32,
286
+ color: '#ffffff',
287
+ stroke: {
288
+ color: '#ff6b6b',
289
+ width: 4,
290
+ style: 'double' // All 6 styles supported!
291
+ }
292
+ }, canvasBuffer);
293
+ ```
294
+
295
+ **Available Stroke Styles:**
296
+ - `solid` - Clean solid line (default)
297
+ - `dashed` - Dashed line pattern
298
+ - `dotted` - Dotted line pattern
299
+ - `groove` - 3D grooved effect (dark outer, light inner)
300
+ - `ridge` - 3D ridged effect (light outer, dark inner)
301
+ - `double` - Double parallel lines
302
+
303
+ ### 🔤 **Organized Font Management**
304
+
305
+ Text fonts are now organized in a clean `font` object structure:
306
+
307
+ ```typescript
308
+ // ✅ New Font Object Structure
309
+ await painter.createText({
310
+ text: 'Organized Font',
311
+ x: 100, y: 100,
312
+ font: {
313
+ size: 24, // Font size in pixels
314
+ family: 'Arial', // Font family name
315
+ name: 'customFont', // Custom font name (for registration)
316
+ path: './fonts/custom.ttf' // Path to custom font file
317
+ },
318
+ color: '#333333',
319
+ bold: true,
320
+ italic: true
321
+ }, canvasBuffer);
322
+
323
+ // ✅ Backward Compatibility (Legacy Properties)
324
+ await painter.createText({
325
+ text: 'Legacy Font Properties',
326
+ x: 100, y: 150,
327
+ fontSize: 24, // Still works!
328
+ fontFamily: 'Arial', // Still works!
329
+ fontName: 'customFont', // Still works!
330
+ fontPath: './fonts/custom.ttf', // Still works!
331
+ color: '#333333'
332
+ }, canvasBuffer);
333
+
334
+ // ✅ Mixed Usage (New Object Takes Priority)
335
+ await painter.createText({
336
+ text: 'Mixed Usage',
337
+ x: 100, y: 200,
338
+ font: {
339
+ size: 28,
340
+ family: 'Georgia'
341
+ },
342
+ fontSize: 24, // Ignored (font.size takes priority)
343
+ fontFamily: 'Arial', // Ignored (font.family takes priority)
344
+ color: '#333333'
345
+ }, canvasBuffer);
346
+ ```
347
+
348
+ **Font Object Properties:**
349
+ - `size` - Font size in pixels (replaces `fontSize`)
350
+ - `family` - Font family name (replaces `fontFamily`)
351
+ - `name` - Custom font name for registration (replaces `fontName`)
352
+ - `path` - Path to custom font file (replaces `fontPath`)
353
+
354
+ **Benefits:**
355
+ - **Cleaner Structure**: All font properties in one organized object
356
+ - **Better IntelliSense**: IDE autocomplete for font properties
357
+ - **Backward Compatible**: Legacy properties still work
358
+ - **Priority System**: New `font` object overrides legacy properties
359
+
360
+ ### 🌈 **Advanced Text Gradient Features**
361
+
362
+ Text effects now support **gradients** for enhanced visual appeal:
363
+
364
+ ```typescript
365
+ // Gradient Glow
366
+ await painter.createText({
367
+ text: 'Gradient Glow Text',
368
+ x: 100, y: 100,
369
+ fontSize: 32,
370
+ color: '#ffffff',
371
+ glow: {
372
+ gradient: {
373
+ type: 'linear',
374
+ colors: [
375
+ { stop: 0, color: '#ff6b6b' },
376
+ { stop: 1, color: '#4ecdc4' }
377
+ ]
378
+ },
379
+ intensity: 15,
380
+ opacity: 0.9
381
+ }
382
+ }, canvasBuffer);
383
+
384
+ // Gradient Highlight
385
+ await painter.createText({
386
+ text: 'Gradient Highlight',
387
+ x: 100, y: 150,
388
+ fontSize: 24,
389
+ color: '#000000',
390
+ highlight: {
391
+ gradient: {
392
+ type: 'radial',
393
+ colors: [
394
+ { stop: 0, color: '#ffd700' },
395
+ { stop: 1, color: '#ff6b6b' }
396
+ ]
397
+ },
398
+ opacity: 0.6
399
+ }
400
+ }, canvasBuffer);
401
+
402
+ // Gradient Text Decorations
403
+ await painter.createText({
404
+ text: 'Styled Decorations',
405
+ x: 100, y: 200,
406
+ fontSize: 28,
407
+ color: '#ffffff',
408
+ underline: {
409
+ gradient: {
410
+ type: 'linear',
411
+ colors: [
412
+ { stop: 0, color: '#ff6b6b' },
413
+ { stop: 1, color: '#4ecdc4' }
414
+ ]
415
+ },
416
+ width: 4
417
+ },
418
+ overline: {
419
+ gradient: {
420
+ type: 'linear',
421
+ colors: [
422
+ { stop: 0, color: '#feca57' },
423
+ { stop: 1, color: '#ff9ff3' }
424
+ ]
425
+ },
426
+ width: 3
427
+ },
428
+ strikethrough: {
429
+ gradient: {
430
+ type: 'linear',
431
+ colors: [
432
+ { stop: 0, color: '#96ceb4' },
433
+ { stop: 1, color: '#45b7d1' }
434
+ ]
435
+ },
436
+ width: 5
437
+ }
438
+ }, canvasBuffer);
439
+
440
+ // ✅ Backward Compatibility (Simple Boolean)
441
+ await painter.createText({
442
+ text: 'Simple Decorations',
443
+ x: 100, y: 250,
444
+ fontSize: 24,
445
+ color: '#ffffff',
446
+ underline: true, // Uses default color
447
+ overline: true, // Uses default color
448
+ strikethrough: true // Uses default color
449
+ }, canvasBuffer);
450
+ ```
451
+
452
+ **Gradient Support:**
453
+ - **Glow**: Gradient glow effects with intensity and opacity
454
+ - **Highlight**: Gradient background highlights
455
+ - **Underline**: Custom gradient underlines with width control
456
+ - **Overline**: Custom gradient overlines with width control
457
+ - **Strikethrough**: Custom gradient strikethrough with width control
458
+ - **Backward Compatible**: Simple `boolean` values still work
459
+
460
+ ---
461
+
462
+ ## 🎯 Real-World Examples
463
+
464
+ ### 🏢 **Business Cards & Marketing Materials**
465
+
466
+ ```typescript
467
+ // Create a professional business card
468
+ const businessCard = await painter.createCanvas({
469
+ width: 400,
470
+ height: 250,
471
+ gradientBg: {
472
+ type: 'linear',
473
+ colors: [
474
+ { color: '#2C3E50', position: 0 },
475
+ { color: '#34495E', position: 1 }
476
+ ],
477
+ direction: { x1: 0, y1: 0, x2: 400, y2: 250 }
478
+ },
479
+ patternBg: {
480
+ type: 'dots',
481
+ color: '#FFF',
482
+ opacity: 0.1,
483
+ size: 5,
484
+ spacing: 20
485
+ }
486
+ });
487
+
488
+ // Add company logo (star shape)
489
+ const logo = await painter.createImage({
490
+ source: 'star',
491
+ x: 50,
492
+ y: 50,
493
+ width: 60,
494
+ height: 60,
495
+ fill: true,
496
+ color: '#FFD700',
497
+ shadow: { color: '#000', offsetX: 3, offsetY: 3, blur: 8 }
498
+ }, businessCard.buffer);
499
+
500
+ // Add company name
501
+ const companyText = await painter.createText({
502
+ text: 'ACME Corp',
503
+ x: 130,
504
+ y: 80,
505
+ fontSize: 24,
506
+ fontFamily: 'Arial',
507
+ bold: true,
508
+ color: '#FFF',
509
+ shadow: { color: '#000', offsetX: 2, offsetY: 2, blur: 4 }
510
+ }, logo);
511
+
512
+ // Add contact info
513
+ const contactText = await painter.createText({
514
+ text: 'john@acme.com\n+1 (555) 123-4567',
515
+ x: 50,
516
+ y: 150,
517
+ fontSize: 14,
518
+ fontFamily: 'Arial',
519
+ color: '#BDC3C7',
520
+ lineHeight: 1.5
521
+ }, companyText);
522
+ ```
523
+
524
+ ### 🎮 **Game UI Elements**
525
+
526
+ ```typescript
527
+ // Create a game button
528
+ const gameButton = await painter.createCanvas({
529
+ width: 200,
530
+ height: 60,
531
+ gradientBg: {
532
+ type: 'linear',
533
+ colors: [
534
+ { color: '#FF6B6B', position: 0 },
535
+ { color: '#FF1744', position: 1 }
536
+ ],
537
+ direction: { x1: 0, y1: 0, x2: 200, y2: 60 }
538
+ },
539
+ shadow: {
540
+ color: '#000',
541
+ offsetX: 5,
542
+ offsetY: 5,
543
+ blur: 15
544
+ },
545
+ borderRadius: 30
546
+ });
547
+
548
+ // Add button text with glow effect
549
+ const buttonText = await painter.createText({
550
+ text: 'PLAY NOW',
551
+ x: 100,
552
+ y: 35,
553
+ fontSize: 20,
554
+ fontFamily: 'Arial',
555
+ bold: true,
556
+ color: '#FFF',
557
+ textAlign: 'center',
558
+ textBaseline: 'middle',
559
+ glow: {
560
+ color: '#FFD700',
561
+ intensity: 0.6,
562
+ opacity: 0.8
563
+ },
564
+ shadow: {
565
+ color: '#000',
566
+ offsetX: 2,
567
+ offsetY: 2,
568
+ blur: 4
569
+ }
570
+ }, gameButton.buffer);
571
+ ```
572
+
573
+ ---
574
+
575
+ ## 📚 API Reference
576
+
577
+ ### Core Methods
578
+
579
+ | Method | Description | Parameters |
580
+ |--------|-------------|------------|
581
+ | `createCanvas()` | Create a new canvas with background | `CanvasConfig` |
582
+ | `createImage()` | Add shapes/images to canvas | `ImageProperties \| ImageProperties[]` |
583
+ | `createText()` | Add text to canvas | `TextProperties \| TextProperties[]` |
584
+ | `createChart()` | Generate charts | `ChartConfig` |
585
+ | `createGIF()` | Create animated GIFs | `GIFConfig` |
586
+
587
+ ### 🔄 **Flexible Parameters**
588
+
589
+ Both `createImage()` and `createText()` methods accept:
590
+ - **Single Object**: `ImageProperties` or `TextProperties`
591
+ - **Array of Objects**: `ImageProperties[]` or `TextProperties[]`
592
+
593
+ This allows you to add multiple elements in one call for better performance and cleaner code.
594
+
595
+ ### Shape Types
596
+
597
+ - `rectangle` - Standard rectangle
598
+ - `square` - Perfect square
599
+ - `circle` - Perfect circle
600
+ - `triangle` - Equilateral triangle
601
+ - `trapezium` - Trapezoid shape
602
+ - `star` - 5-pointed star
603
+ - `heart` - Heart shape with bezier curves
604
+ - `polygon` - Custom polygon
605
+
606
+ ### Pattern Types
607
+
608
+ - `grid` - Grid pattern
609
+ - `dots` - Dot pattern
610
+ - `diagonal` - Diagonal lines
611
+ - `stripes` - Horizontal/vertical stripes
612
+ - `waves` - Wave pattern
613
+ - `crosses` - Cross pattern
614
+ - `hexagons` - Hexagonal pattern
615
+ - `checkerboard` - Checkerboard pattern
616
+ - `diamonds` - Diamond pattern
617
+ - `triangles` - Triangle pattern
618
+ - `stars` - Star pattern
619
+ - `polka` - Polka dot pattern
620
+ - `custom` - Custom image pattern
621
+
622
+ ---
623
+
624
+ ## 🆕 What's New in v4.9.30
625
+
626
+ ### 🎉 Major Feature Release
627
+
628
+ #### Background Enhancements
629
+ - ✨ **Video Backgrounds**: Use video frames as dynamic backgrounds
630
+ - 🎨 **Background Filters**: Apply filters directly to background images
631
+ - 🔧 **Background Opacity**: Control transparency of background images
632
+
633
+ #### Image Processing
634
+ - 🎭 **Image Masking**: Apply masks with multiple modes (alpha, luminance, inverse)
635
+ - 🔄 **Image Distortion**: Perspective, bulge, pinch, and mesh warping
636
+ - ✨ **Effects Stack**: Vignette, lens flare, chromatic aberration, film grain
637
+ - 🎛️ **Enhanced Filters**: Filter intensity and order control
638
+
639
+ #### Text Features
640
+ - 📐 **Text on Paths**: Render text along curves and custom paths
641
+
642
+ #### Custom Lines
643
+ - ➡️ **Arrow Markers**: Start/end arrows with customizable styles
644
+ - 📍 **Path Markers**: Add markers at any position along paths
645
+ - 🎨 **Line Patterns**: Dots, dashes, and custom patterns
646
+ - 🖼️ **Line Textures**: Apply texture images to lines
647
+
648
+ #### New Utilities
649
+ - ⚡ **Batch Operations**: Process multiple operations in parallel
650
+ - 🔗 **Chain Operations**: Chain operations sequentially
651
+ - 🖼️ **Image Stitching**: Combine images into panoramas
652
+ - 🎨 **Collage Maker**: Create beautiful image collages
653
+ - 📦 **Image Compression**: Optimize images with quality control
654
+ - 🎨 **Color Palette Extraction**: Extract color palettes from images
655
+
656
+ See [CHANGELOG.md](CHANGELOG.md) for complete details.
657
+
658
+ ---
659
+
660
+ ## 🤝 Contributing
661
+
662
+ We welcome contributions! Here's how you can help:
663
+
664
+ 1. **Report Bugs**: Found a bug? Open an issue with detailed information
665
+ 2. **Feature Requests**: Have an idea? We'd love to hear it!
666
+ 3. **Code Contributions**: Submit pull requests for improvements
667
+ 4. **Documentation**: Help improve our docs and examples
668
+
669
+ ### Development Setup
670
+
671
+ ```bash
672
+ # Clone the repository
673
+ git clone https://github.com/your-username/apexify.git
674
+
675
+ # Install dependencies
676
+ npm install
677
+
678
+ # Run tests
679
+ npm test
680
+
681
+ # Build the project
682
+ npm run build
683
+ ```
684
+
685
+ ---
686
+
687
+ ## 📞 Support & Community
688
+
689
+ <div align="center">
690
+
691
+ ### Join Our Discord Community
692
+
693
+ [![Jedi Studio](https://img.shields.io/badge/Discord-Jedi%20Studio-7289DA?style=for-the-badge&logo=discord)](https://discord.gg/CS2NRSPyze)
694
+ [![FresedGPT](https://img.shields.io/badge/Discord-FresedGPT-7289DA?style=for-the-badge&logo=discord)](https://discord.gg/94qUZWhwFE)
695
+ [![ElectronHub](https://img.shields.io/badge/Discord-ElectronHub-7289DA?style=for-the-badge&logo=discord)](https://discord.gg/83XcjD8vgW)
696
+
697
+ ### Documentation & Resources
698
+
699
+ [![Documentation](https://img.shields.io/badge/Docs-Apexify.js-blue?style=for-the-badge)](http://apexifyjs.jedi-studio.com)
700
+ [![Support Server](https://img.shields.io/badge/Support-Discord-7289DA?style=for-the-badge&logo=discord)](https://discord.gg/mDyXV9hzXw)
701
+
702
+ </div>
703
+
704
+ ---
705
+
706
+ ## 📄 License
707
+
708
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
709
+
710
+ ---
711
+
712
+ ## 🙏 Acknowledgments
713
+
714
+ - **@napi-rs/canvas** - High-performance canvas rendering
715
+ - **Sharp** - Professional image processing
716
+ - **Jimp** - JavaScript image manipulation
717
+ - **TypeScript** - Type-safe development
718
+
719
+ ---
720
+
721
+ <div align="center">
722
+
723
+ **Made with ❤️ by [Jedi Studio](https://discord.gg/CS2NRSPyze)**
724
+
725
+ *Create stunning visuals with ApexPainter - The ultimate canvas library for Node.js*
726
+
727
+ </div>