apexify.js 4.9.26 → 4.9.28

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 (108) hide show
  1. package/README.md +437 -47
  2. package/dist/cjs/Canvas/ApexPainter.d.ts +122 -78
  3. package/dist/cjs/Canvas/ApexPainter.d.ts.map +1 -1
  4. package/dist/cjs/Canvas/ApexPainter.js +461 -352
  5. package/dist/cjs/Canvas/ApexPainter.js.map +1 -1
  6. package/dist/cjs/Canvas/utils/Background/bg.d.ts +23 -11
  7. package/dist/cjs/Canvas/utils/Background/bg.d.ts.map +1 -1
  8. package/dist/cjs/Canvas/utils/Background/bg.js +174 -107
  9. package/dist/cjs/Canvas/utils/Background/bg.js.map +1 -1
  10. package/dist/cjs/Canvas/utils/Custom/customLines.js +2 -2
  11. package/dist/cjs/Canvas/utils/Custom/customLines.js.map +1 -1
  12. package/dist/cjs/Canvas/utils/Image/imageFilters.d.ts +11 -0
  13. package/dist/cjs/Canvas/utils/Image/imageFilters.d.ts.map +1 -0
  14. package/dist/cjs/Canvas/utils/Image/imageFilters.js +307 -0
  15. package/dist/cjs/Canvas/utils/Image/imageFilters.js.map +1 -0
  16. package/dist/cjs/Canvas/utils/Image/imageProperties.d.ts +47 -112
  17. package/dist/cjs/Canvas/utils/Image/imageProperties.d.ts.map +1 -1
  18. package/dist/cjs/Canvas/utils/Image/imageProperties.js +229 -560
  19. package/dist/cjs/Canvas/utils/Image/imageProperties.js.map +1 -1
  20. package/dist/cjs/Canvas/utils/Image/professionalImageFilters.d.ts +11 -0
  21. package/dist/cjs/Canvas/utils/Image/professionalImageFilters.d.ts.map +1 -0
  22. package/dist/cjs/Canvas/utils/Image/professionalImageFilters.js +351 -0
  23. package/dist/cjs/Canvas/utils/Image/professionalImageFilters.js.map +1 -0
  24. package/dist/cjs/Canvas/utils/Image/simpleProfessionalFilters.d.ts +11 -0
  25. package/dist/cjs/Canvas/utils/Image/simpleProfessionalFilters.d.ts.map +1 -0
  26. package/dist/cjs/Canvas/utils/Image/simpleProfessionalFilters.js +215 -0
  27. package/dist/cjs/Canvas/utils/Image/simpleProfessionalFilters.js.map +1 -0
  28. package/dist/cjs/Canvas/utils/Patterns/enhancedPatternRenderer.d.ts +71 -0
  29. package/dist/cjs/Canvas/utils/Patterns/enhancedPatternRenderer.d.ts.map +1 -0
  30. package/dist/cjs/Canvas/utils/Patterns/enhancedPatternRenderer.js +392 -0
  31. package/dist/cjs/Canvas/utils/Patterns/enhancedPatternRenderer.js.map +1 -0
  32. package/dist/cjs/Canvas/utils/Shapes/shapes.d.ts +29 -0
  33. package/dist/cjs/Canvas/utils/Shapes/shapes.d.ts.map +1 -0
  34. package/dist/cjs/Canvas/utils/Shapes/shapes.js +334 -0
  35. package/dist/cjs/Canvas/utils/Shapes/shapes.js.map +1 -0
  36. package/dist/cjs/Canvas/utils/Texts/enhancedTextRenderer.d.ts +127 -0
  37. package/dist/cjs/Canvas/utils/Texts/enhancedTextRenderer.d.ts.map +1 -0
  38. package/dist/cjs/Canvas/utils/Texts/enhancedTextRenderer.js +365 -0
  39. package/dist/cjs/Canvas/utils/Texts/enhancedTextRenderer.js.map +1 -0
  40. package/dist/cjs/Canvas/utils/types.d.ts +227 -131
  41. package/dist/cjs/Canvas/utils/types.d.ts.map +1 -1
  42. package/dist/cjs/Canvas/utils/types.js +0 -1
  43. package/dist/cjs/Canvas/utils/types.js.map +1 -1
  44. package/dist/cjs/Canvas/utils/utils.d.ts +7 -4
  45. package/dist/cjs/Canvas/utils/utils.d.ts.map +1 -1
  46. package/dist/cjs/Canvas/utils/utils.js +17 -7
  47. package/dist/cjs/Canvas/utils/utils.js.map +1 -1
  48. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  49. package/dist/esm/Canvas/ApexPainter.d.ts +122 -78
  50. package/dist/esm/Canvas/ApexPainter.d.ts.map +1 -1
  51. package/dist/esm/Canvas/ApexPainter.js +461 -352
  52. package/dist/esm/Canvas/ApexPainter.js.map +1 -1
  53. package/dist/esm/Canvas/utils/Background/bg.d.ts +23 -11
  54. package/dist/esm/Canvas/utils/Background/bg.d.ts.map +1 -1
  55. package/dist/esm/Canvas/utils/Background/bg.js +174 -107
  56. package/dist/esm/Canvas/utils/Background/bg.js.map +1 -1
  57. package/dist/esm/Canvas/utils/Custom/customLines.js +2 -2
  58. package/dist/esm/Canvas/utils/Custom/customLines.js.map +1 -1
  59. package/dist/esm/Canvas/utils/Image/imageFilters.d.ts +11 -0
  60. package/dist/esm/Canvas/utils/Image/imageFilters.d.ts.map +1 -0
  61. package/dist/esm/Canvas/utils/Image/imageFilters.js +307 -0
  62. package/dist/esm/Canvas/utils/Image/imageFilters.js.map +1 -0
  63. package/dist/esm/Canvas/utils/Image/imageProperties.d.ts +47 -112
  64. package/dist/esm/Canvas/utils/Image/imageProperties.d.ts.map +1 -1
  65. package/dist/esm/Canvas/utils/Image/imageProperties.js +229 -560
  66. package/dist/esm/Canvas/utils/Image/imageProperties.js.map +1 -1
  67. package/dist/esm/Canvas/utils/Image/professionalImageFilters.d.ts +11 -0
  68. package/dist/esm/Canvas/utils/Image/professionalImageFilters.d.ts.map +1 -0
  69. package/dist/esm/Canvas/utils/Image/professionalImageFilters.js +351 -0
  70. package/dist/esm/Canvas/utils/Image/professionalImageFilters.js.map +1 -0
  71. package/dist/esm/Canvas/utils/Image/simpleProfessionalFilters.d.ts +11 -0
  72. package/dist/esm/Canvas/utils/Image/simpleProfessionalFilters.d.ts.map +1 -0
  73. package/dist/esm/Canvas/utils/Image/simpleProfessionalFilters.js +215 -0
  74. package/dist/esm/Canvas/utils/Image/simpleProfessionalFilters.js.map +1 -0
  75. package/dist/esm/Canvas/utils/Patterns/enhancedPatternRenderer.d.ts +71 -0
  76. package/dist/esm/Canvas/utils/Patterns/enhancedPatternRenderer.d.ts.map +1 -0
  77. package/dist/esm/Canvas/utils/Patterns/enhancedPatternRenderer.js +392 -0
  78. package/dist/esm/Canvas/utils/Patterns/enhancedPatternRenderer.js.map +1 -0
  79. package/dist/esm/Canvas/utils/Shapes/shapes.d.ts +29 -0
  80. package/dist/esm/Canvas/utils/Shapes/shapes.d.ts.map +1 -0
  81. package/dist/esm/Canvas/utils/Shapes/shapes.js +334 -0
  82. package/dist/esm/Canvas/utils/Shapes/shapes.js.map +1 -0
  83. package/dist/esm/Canvas/utils/Texts/enhancedTextRenderer.d.ts +127 -0
  84. package/dist/esm/Canvas/utils/Texts/enhancedTextRenderer.d.ts.map +1 -0
  85. package/dist/esm/Canvas/utils/Texts/enhancedTextRenderer.js +365 -0
  86. package/dist/esm/Canvas/utils/Texts/enhancedTextRenderer.js.map +1 -0
  87. package/dist/esm/Canvas/utils/types.d.ts +227 -131
  88. package/dist/esm/Canvas/utils/types.d.ts.map +1 -1
  89. package/dist/esm/Canvas/utils/types.js +0 -1
  90. package/dist/esm/Canvas/utils/types.js.map +1 -1
  91. package/dist/esm/Canvas/utils/utils.d.ts +7 -4
  92. package/dist/esm/Canvas/utils/utils.d.ts.map +1 -1
  93. package/dist/esm/Canvas/utils/utils.js +17 -7
  94. package/dist/esm/Canvas/utils/utils.js.map +1 -1
  95. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  96. package/lib/Canvas/ApexPainter.ts +1325 -1218
  97. package/lib/Canvas/utils/Background/bg.ts +247 -173
  98. package/lib/Canvas/utils/Custom/customLines.ts +3 -3
  99. package/lib/Canvas/utils/Image/imageFilters.ts +356 -0
  100. package/lib/Canvas/utils/Image/imageProperties.ts +322 -775
  101. package/lib/Canvas/utils/Image/professionalImageFilters.ts +391 -0
  102. package/lib/Canvas/utils/Image/simpleProfessionalFilters.ts +229 -0
  103. package/lib/Canvas/utils/Patterns/enhancedPatternRenderer.ts +444 -0
  104. package/lib/Canvas/utils/Shapes/shapes.ts +528 -0
  105. package/lib/Canvas/utils/Texts/enhancedTextRenderer.ts +478 -0
  106. package/lib/Canvas/utils/types.ts +301 -117
  107. package/lib/Canvas/utils/utils.ts +85 -72
  108. package/package.json +106 -188
package/README.md CHANGED
@@ -1,66 +1,456 @@
1
- ![Example Image](https://media.discordapp.net/attachments/1134572786262736996/1225196690634575922/Picsart_24-04-04_00-34-02-123.png?ex=66204056&is=660dcb56&hm=b88fefc90afda1db45b18e65ee2e3cfe8ce6eb8b6807ea4a6bc84137aa3c3034&=&format=webp&quality=lossless&width=662&height=662)
1
+ # 🎨 ApexPainter - Advanced Canvas Rendering Library
2
2
 
3
- ### Jedi-Studio Introduce
3
+ <div align="center">
4
4
 
5
- Greetings everyone! 🌟 If you encounter any issues or need assistance, feel free to reach out. Direct message me on Discord at `elioo.79` (ID: 1130583393176920095).
5
+ ![ApexPainter Banner](apex-banner.png)
6
6
 
7
- ## 🚀 Usage Guidelines
7
+ **The Ultimate TypeScript Canvas Library for Node.js**
8
8
 
9
- ### 🤖 AI Chat & Imagine
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)
10
13
 
11
- **Features:**
14
+ *Create stunning visuals with professional-grade canvas rendering, image processing, and text effects*
12
15
 
13
- - **Chat Bot:** Engage in conversations with an AI-powered chatbot.
14
- - **AI Chat Bot:** Experience advanced conversational capabilities with our state-of-the-art AI chatbot.
15
- - **Image Generator:** Generate images using cutting-edge AI algorithms.
16
- - **Image Analysis:** Analyze images with AI for insights and understanding.
17
- - **PDF & Text Reader:** Effortlessly extract text from PDF files or other documents.
18
- - **Text to Speech:** Convert text into natural-sounding speech with high-quality synthesis.
19
- - **Speech to Text:** Transcribe spoken words into text with high accuracy.
20
- - **Text Extractor:** Extract and process text from various sources and formats.
21
- - **Custom Role Plays:** Create and engage in custom role-playing scenarios with tailored AI responses.
22
- - **AI Personality:** Personalize your interactions with the AI chatbot by defining its personality traits and characteristics.
23
- - **Chat Memory:** Enable the AI chatbot to remember past interactions and maintain context across conversations, providing a more personalized and coherent experience.
16
+ </div>
24
17
 
25
- ### 📸 Canvas Image Manipulation Toolkit 🎨
18
+ ## Features Overview
26
19
 
27
- **Features:**
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
28
26
 
29
- - **Background Configuration:** Customize canvas background settings.
30
- - **Image/Shapes/Custom Drawing:** Configure images, shapes, and custom drawings on the canvas.
31
- - **Text Addition:** Add text to backgrounds or images with configurable settings.
32
- - **Custom Drawing:** Freely draw on the canvas using lines and coordinates.
33
- - **Filters:** Apply color and effects filters to images.
34
- - **GIF Creation:** Generate GIFs from a series of images.
35
- - **Resizing and Format Conversion:** Resize images and convert between different file formats.
36
- - **Charts Generation:** Create pie charts, bar charts, and line charts using provided data.
37
- - **Background Removal:** Effortlessly remove backgrounds from images.
38
- - **Color Detection:** Detect colors within images.
39
- - **Color Removal:** Remove specific colors from images using RGB values.
40
- - **Image Cropping:** Crop images with flexibility and customization options.
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
41
33
 
42
- ## For Further Usage Of ApexPainter
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
43
41
 
44
- - Further Usages: Creating charts, custom drawings, custom cropping, and GIF creation using ApexPainter.
45
- - Please refer to our documentation website for further details and explanations.
46
- - Check the example folder for information and usage on charts.
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
47
48
 
48
- ## 📚 More Info & Documentation 📖
49
+ ---
49
50
 
50
- - Explore a detailed list of Apexify.js and their usage at our [Support Server](https://discord.gg/mDyXV9hzXw) or at [Apexify.js Docs](http://apexifyjs.jedi-studio.com).
51
+ ## 🚀 Quick Start
51
52
 
52
- Keep experimenting, and feel free to contact me for assistance! Suggestions and adjustments are welcome 🌟.
53
+ ### Installation
53
54
 
54
- ## 🤝 Contributions
55
+ ```bash
56
+ npm install apexify
57
+ ```
55
58
 
56
- **We welcome contributions! If you have any suggestions, bug reports, or feature requests, please contact us on Discord at `Jedi Studio`.**
59
+ ### Basic Usage
57
60
 
58
- - Regarding ApiKeys: The servers below as FresedGPT & ElectronHub are the servers where you can purchase/get apiKeys, we would like to see you there.
61
+ ```typescript
62
+ import { ApexPainter } from 'apexify';
59
63
 
60
- ### Join Us on Discord
64
+ const painter = new ApexPainter();
61
65
 
62
- [![Jedi Studio](https://api.weblutions.com/discord/invite/CS2NRSPyze/)](https://discord.gg/CS2NRSPyze)
63
- [![FresedGPT](https://api.weblutions.com/discord/invite/94qUZWhwFE/)](https://discord.gg/94qUZWhwFE)
64
- [![ElectronHub](https://api.weblutions.com/discord/invite/83XcjD8vgW/)](https://discord.gg/83XcjD8vgW)
65
- [![Ethical Programming](https://api.weblutions.com/discord/invite/ethical-programmer-s-1188398653530984539/)](https://discord.gg/ethical-programmer-s-1188398653530984539)
66
- [![ExtraCodes](https://api.weblutions.com/discord/invite/extracodes/)](https://discord.gg/extracodes)
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>