ArifiIslam commited on
Commit
b516e00
·
verified ·
1 Parent(s): 3390b30

Release NaraMotion v0.26.0: Structure of Arrays (SoA), Path Arena Allocator, Uniform Grid Indexing, Dual-Buffer Rendering & Centroid Spring Pop-in

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. - +73 -0
  2. .gitattributes +49 -0
  3. AI_RULES.md +189 -0
  4. DOCUMENTATION.md +889 -0
  5. README.md +128 -0
  6. blend2d/__init__.py +343 -0
  7. blend2d/__pycache__/__init__.cpython-310.pyc +0 -0
  8. blend2d/__pycache__/color.cpython-310.pyc +0 -0
  9. blend2d/__pycache__/context.cpython-310.pyc +0 -0
  10. blend2d/__pycache__/diagnostics.cpython-310.pyc +0 -0
  11. blend2d/__pycache__/enums.cpython-310.pyc +0 -0
  12. blend2d/__pycache__/ffi.cpython-310.pyc +0 -0
  13. blend2d/__pycache__/font.cpython-310.pyc +0 -0
  14. blend2d/__pycache__/geometry.cpython-310.pyc +0 -0
  15. blend2d/__pycache__/image.cpython-310.pyc +0 -0
  16. blend2d/__pycache__/license.cpython-310.pyc +0 -0
  17. blend2d/__pycache__/matrix.cpython-310.pyc +0 -0
  18. blend2d/__pycache__/path.cpython-310.pyc +0 -0
  19. blend2d/__pycache__/shapgeo.cpython-310.pyc +0 -0
  20. blend2d/__pycache__/shapgeo_downloader.cpython-310.pyc +0 -0
  21. blend2d/__pycache__/shapgeo_io.cpython-310.pyc +0 -0
  22. blend2d/__pycache__/shapgeo_proj.cpython-310.pyc +0 -0
  23. blend2d/__pycache__/style.cpython-310.pyc +0 -0
  24. blend2d/__pycache__/svg.cpython-310.pyc +0 -0
  25. blend2d/__pycache__/video.cpython-310.pyc +0 -0
  26. blend2d/_bin/blend2d_fx.lib +0 -0
  27. blend2d/_bin/blend2d_geo.lib +0 -0
  28. blend2d/_bin/blend2d_license.lib +0 -0
  29. blend2d/_bin/blend2d_motion.lib +0 -0
  30. blend2d/_bin/blend2d_perspective.lib +0 -0
  31. blend2d/_bin/blend2d_video.lib +0 -0
  32. blend2d/_bin/libblend2d.dll +3 -0
  33. blend2d/_bin/libblend2d.so +3 -0
  34. blend2d/_bin/libblend2d_fx.dll +3 -0
  35. blend2d/_bin/libblend2d_fx.pdb +3 -0
  36. blend2d/_bin/libblend2d_fx.so +3 -0
  37. blend2d/_bin/libblend2d_geo.dll +3 -0
  38. blend2d/_bin/libblend2d_geo.pdb +3 -0
  39. blend2d/_bin/libblend2d_geo.so +3 -0
  40. blend2d/_bin/libblend2d_license.dll +0 -0
  41. blend2d/_bin/libblend2d_license.so +0 -0
  42. blend2d/_bin/libblend2d_motion.dll +3 -0
  43. blend2d/_bin/libblend2d_motion.pdb +3 -0
  44. blend2d/_bin/libblend2d_motion.so +3 -0
  45. blend2d/_bin/libblend2d_perspective.dll +0 -0
  46. blend2d/_bin/libblend2d_perspective.pdb +3 -0
  47. blend2d/_bin/libblend2d_perspective.so +0 -0
  48. blend2d/_bin/libblend2d_video.dll +3 -0
  49. blend2d/_bin/libblend2d_video.pdb +3 -0
  50. blend2d/_bin/libblend2d_video.so +3 -0
- ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 1 "C:/Users/islam/OneDrive/Desktop/PyBlend/cmake-bin/cmake-3.31.5-windows-x86_64/share/cmake-3.31/Modules/CXX-DetectStdlib.h"
2
+ # 1 "<built-in>" 1
3
+ # 1 "<built-in>" 3
4
+ # 452 "<built-in>" 3
5
+ # 1 "<command line>" 1
6
+ # 1 "<built-in>" 2
7
+ # 1 "C:/Users/islam/OneDrive/Desktop/PyBlend/cmake-bin/cmake-3.31.5-windows-x86_64/share/cmake-3.31/Modules/CXX-DetectStdlib.h" 2
8
+ # 1 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/version" 1 3
9
+ # 247 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/version" 3
10
+ # 1 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/__assert" 1 3
11
+ # 13 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/__assert" 3
12
+ # 1 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/__assertion_handler" 1 3
13
+ # 13 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/__assertion_handler" 3
14
+ # 1 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/__config" 1 3
15
+ # 17 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/__config" 3
16
+ # 517 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/__config" 3
17
+ # 1 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\generic-glibc/features.h" 1 3
18
+ # 407 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\generic-glibc/features.h" 3
19
+ # 1 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\generic-glibc/features-time64.h" 1 3
20
+ # 20 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\generic-glibc/features-time64.h" 3
21
+ # 1 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\x86_64-linux-gnu/bits/wordsize.h" 1 3
22
+ # 21 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\generic-glibc/features-time64.h" 2 3
23
+ # 1 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\x86_64-linux-gnu/bits/timesize.h" 1 3
24
+ # 19 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\x86_64-linux-gnu/bits/timesize.h" 3
25
+ # 1 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\x86_64-linux-gnu/bits/wordsize.h" 1 3
26
+ # 20 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\x86_64-linux-gnu/bits/timesize.h" 2 3
27
+ # 22 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\generic-glibc/features-time64.h" 2 3
28
+ # 408 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\generic-glibc/features.h" 2 3
29
+ # 505 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\generic-glibc/features.h" 3
30
+ # 1 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\generic-glibc/stdc-predef.h" 1 3
31
+ # 506 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\generic-glibc/features.h" 2 3
32
+ # 519 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\generic-glibc/features.h" 3
33
+ # 1 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\generic-glibc/sys/cdefs.h" 1 3
34
+ # 576 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\generic-glibc/sys/cdefs.h" 3
35
+ # 1 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\x86_64-linux-gnu/bits/wordsize.h" 1 3
36
+ # 577 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\generic-glibc/sys/cdefs.h" 2 3
37
+ # 1 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\x86_64-linux-gnu/bits/long-double.h" 1 3
38
+ # 578 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\generic-glibc/sys/cdefs.h" 2 3
39
+ # 520 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\generic-glibc/features.h" 2 3
40
+ # 543 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\generic-glibc/features.h" 3
41
+ # 1 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\x86_64-linux-gnu/gnu/stubs.h" 1 3
42
+ # 10 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\x86_64-linux-gnu/gnu/stubs.h" 3
43
+ # 1 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\x86_64-linux-gnu/gnu/stubs-64.h" 1 3
44
+ # 11 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\x86_64-linux-gnu/gnu/stubs.h" 2 3
45
+ # 544 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libc\\include\\generic-glibc/features.h" 2 3
46
+ # 518 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/__config" 2 3
47
+ # 14 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/__assertion_handler" 2 3
48
+ # 1 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/__verbose_abort" 1 3
49
+ # 13 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/__verbose_abort" 3
50
+ # 1 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/__availability" 1 3
51
+ # 17 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/__availability" 3
52
+ # 14 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/__verbose_abort" 2 3
53
+ # 18 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/__verbose_abort" 3
54
+
55
+
56
+ namespace std { inline namespace __1 {
57
+
58
+
59
+
60
+ [[noreturn]]
61
+ __attribute__((__format__(__printf__, 1, 2))) void __libcpp_verbose_abort(const char* __format, ...);
62
+ # 51 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/__verbose_abort" 3
63
+ }}
64
+ # 15 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/__assertion_handler" 2 3
65
+ # 18 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/__assertion_handler" 3
66
+ # 14 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/__assert" 2 3
67
+ # 18 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/__assert" 3
68
+ # 248 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/version" 2 3
69
+ # 253 "zig-bin\\zig-windows-x86_64-0.13.0\\lib\\libcxx\\include/version" 3
70
+ # 2 "C:/Users/islam/OneDrive/Desktop/PyBlend/cmake-bin/cmake-3.31.5-windows-x86_64/share/cmake-3.31/Modules/CXX-DetectStdlib.h" 2
71
+
72
+
73
+ CMAKE-STDLIB-DETECT: libc++
.gitattributes CHANGED
@@ -33,3 +33,52 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ blend2d/_bin/libblend2d.dll filter=lfs diff=lfs merge=lfs -text
37
+ blend2d/_bin/libblend2d.so filter=lfs diff=lfs merge=lfs -text
38
+ blend2d/_bin/libblend2d_fx.dll filter=lfs diff=lfs merge=lfs -text
39
+ blend2d/_bin/libblend2d_fx.pdb filter=lfs diff=lfs merge=lfs -text
40
+ blend2d/_bin/libblend2d_fx.so filter=lfs diff=lfs merge=lfs -text
41
+ blend2d/_bin/libblend2d_geo.dll filter=lfs diff=lfs merge=lfs -text
42
+ blend2d/_bin/libblend2d_geo.pdb filter=lfs diff=lfs merge=lfs -text
43
+ blend2d/_bin/libblend2d_geo.so filter=lfs diff=lfs merge=lfs -text
44
+ blend2d/_bin/libblend2d_motion.dll filter=lfs diff=lfs merge=lfs -text
45
+ blend2d/_bin/libblend2d_motion.pdb filter=lfs diff=lfs merge=lfs -text
46
+ blend2d/_bin/libblend2d_motion.so filter=lfs diff=lfs merge=lfs -text
47
+ blend2d/_bin/libblend2d_perspective.pdb filter=lfs diff=lfs merge=lfs -text
48
+ blend2d/_bin/libblend2d_video.dll filter=lfs diff=lfs merge=lfs -text
49
+ blend2d/_bin/libblend2d_video.pdb filter=lfs diff=lfs merge=lfs -text
50
+ blend2d/_bin/libblend2d_video.so filter=lfs diff=lfs merge=lfs -text
51
+ blend2d/_bin/libnaramotion_fx.dll filter=lfs diff=lfs merge=lfs -text
52
+ blend2d/_bin/libnaramotion_fx.so filter=lfs diff=lfs merge=lfs -text
53
+ blend2d/_bin/libnaramotion_geo.dll filter=lfs diff=lfs merge=lfs -text
54
+ blend2d/_bin/libnaramotion_geo.so filter=lfs diff=lfs merge=lfs -text
55
+ blend2d/_bin/libnaramotion_motion.dll filter=lfs diff=lfs merge=lfs -text
56
+ blend2d/_bin/libnaramotion_motion.so filter=lfs diff=lfs merge=lfs -text
57
+ blend2d/_bin/libnaramotion_video.dll filter=lfs diff=lfs merge=lfs -text
58
+ blend2d/_bin/libnaramotion_video.so filter=lfs diff=lfs merge=lfs -text
59
+ dist/naramotion-0.26.0-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
60
+ naramotion/_bin/libblend2d.dll filter=lfs diff=lfs merge=lfs -text
61
+ naramotion/_bin/libblend2d.so filter=lfs diff=lfs merge=lfs -text
62
+ naramotion/_bin/libblend2d_fx.dll filter=lfs diff=lfs merge=lfs -text
63
+ naramotion/_bin/libblend2d_fx.pdb filter=lfs diff=lfs merge=lfs -text
64
+ naramotion/_bin/libblend2d_fx.so filter=lfs diff=lfs merge=lfs -text
65
+ naramotion/_bin/libblend2d_geo.dll filter=lfs diff=lfs merge=lfs -text
66
+ naramotion/_bin/libblend2d_geo.pdb filter=lfs diff=lfs merge=lfs -text
67
+ naramotion/_bin/libblend2d_geo.so filter=lfs diff=lfs merge=lfs -text
68
+ naramotion/_bin/libblend2d_motion.dll filter=lfs diff=lfs merge=lfs -text
69
+ naramotion/_bin/libblend2d_motion.pdb filter=lfs diff=lfs merge=lfs -text
70
+ naramotion/_bin/libblend2d_motion.so filter=lfs diff=lfs merge=lfs -text
71
+ naramotion/_bin/libblend2d_perspective.pdb filter=lfs diff=lfs merge=lfs -text
72
+ naramotion/_bin/libblend2d_video.dll filter=lfs diff=lfs merge=lfs -text
73
+ naramotion/_bin/libblend2d_video.pdb filter=lfs diff=lfs merge=lfs -text
74
+ naramotion/_bin/libblend2d_video.so filter=lfs diff=lfs merge=lfs -text
75
+ naramotion/_bin/libnaramotion_fx.dll filter=lfs diff=lfs merge=lfs -text
76
+ naramotion/_bin/libnaramotion_fx.so filter=lfs diff=lfs merge=lfs -text
77
+ naramotion/_bin/libnaramotion_geo.dll filter=lfs diff=lfs merge=lfs -text
78
+ naramotion/_bin/libnaramotion_geo.so filter=lfs diff=lfs merge=lfs -text
79
+ naramotion/_bin/libnaramotion_motion.dll filter=lfs diff=lfs merge=lfs -text
80
+ naramotion/_bin/libnaramotion_motion.so filter=lfs diff=lfs merge=lfs -text
81
+ naramotion/_bin/libnaramotion_video.dll filter=lfs diff=lfs merge=lfs -text
82
+ naramotion/_bin/libnaramotion_video.so filter=lfs diff=lfs merge=lfs -text
83
+ test_winhttp.dll filter=lfs diff=lfs merge=lfs -text
84
+ test_winhttp.pdb filter=lfs diff=lfs merge=lfs -text
AI_RULES.md ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 🤖 AI_RULES.md: Master System Prompt & Engineering Guidelines for NaraMotion
2
+
3
+ > **NOTE FOR AI CODING ASSISTANTS (ChatGPT, Claude, Gemini, DeepSeek, Cursor, Copilot, Kaggle)**:
4
+ > This document defines the strict architectural rules, API standards, and execution patterns for writing code using **NaraMotion** (`import naramotion as nm` or `from naramotion import ...`).
5
+
6
+ ---
7
+
8
+ ## 🛑 1. The Cardinal Rule: 100% Native & Self-Contained Engine
9
+
10
+ **NaraMotion is an All-in-One Super Engine** combining JIT-accelerated vector drawing, cinematic visual FX, motion graphics, 2.5D perspective camera, particle physics, GIS mapping, multi-threaded Parquet ingestion, and hardware video encoding into a single native C++ pipeline.
11
+
12
+ ### ⛔ BANNED EXTERNAL LIBRARIES (DO NOT USE):
13
+ | Prohibited Library | Reason | Native NaraMotion Replacement |
14
+ | :--- | :--- | :--- |
15
+ | `import cv2` (OpenCV) | Redundant & slow memory copies | `from naramotion.fx import bloom, neon_glow, gaussian_blur, box_blur_integral, chromatic_aberration, color_grade, tone_map_aces` |
16
+ | `import moviepy` / `imageio` | Inefficient Python video wrappers | `from naramotion.video import VideoWriter` or direct `img.buffer` pipe |
17
+ | `from PIL import Image` | Unnecessary wrapper overhead | `from naramotion import Image, Context` (includes `to_pil()` / `from_pil()`) |
18
+ | `import matplotlib.pyplot` | Slow vector rendering | `from naramotion.shapgeo import GeoCanvas` or `ctx.stroke_line_array` |
19
+ | `import scipy.ndimage` | External filter dependency | `from naramotion.fx import FXPipeline, gaussian_blur, box_blur, box_blur_integral` |
20
+ | `import pyproj` | Heavy external projection dependency | `from naramotion.shapgeo import Transformer, reproject_gdf` (Native C++ Proj Engine) |
21
+
22
+ ---
23
+
24
+ ## 🔑 2. Mandatory Commercial License Activation
25
+
26
+ Every standalone script or notebook cell must begin by activating the license:
27
+
28
+ ```python
29
+ import naramotion as nm
30
+
31
+ # 1. Activate License (Bypasses evaluation watermark)
32
+ nm.set_license("08032008is")
33
+ ```
34
+
35
+ ---
36
+
37
+ ## 🗺️ 3. Native Module Directory & Import Map
38
+
39
+ ```python
40
+ # 1. Core Vector & Context Engine
41
+ from naramotion import (
42
+ Image, Context, Path, Font, FontFace, Matrix2D,
43
+ Format, CompOp, StrokeCap, StrokeJoin, FillRule, ExtendMode,
44
+ Color, Rgba32, Rgba, set_license, is_licensed, Palette
45
+ )
46
+
47
+ # 2. Cinematic Post-Processing & Visual FX Engine
48
+ from naramotion.fx import (
49
+ bloom, neon_glow, gaussian_blur, box_blur, box_blur_integral,
50
+ chromatic_aberration, vignette, film_grain,
51
+ color_grade, grayscale, invert, sepia,
52
+ scanlines, glitch_displacement, drop_shadow,
53
+ tone_map_aces, tone_map_reinhard, FXPipeline
54
+ )
55
+
56
+ # 3. Motion Graphics, Particles, Timeline & 2.5D Camera
57
+ from naramotion.motion import (
58
+ Timeline, Easing, Spring, CubicBezier,
59
+ Action, DrawReveal, Create, ShowCreation, Uncreate, Typewriter, Stagger,
60
+ interpolate, Extrapolate, chaikin_smooth, chaikin_smooth_points,
61
+ Sequence, Composition, delay_render,
62
+ ParticleSystem, trim_path, PathFollower, PathMorph,
63
+ Scene, Node, Camera2D, PerspectiveCamera, render_globe
64
+ )
65
+
66
+ # 4. Geospatial & GIS Big Data Engine
67
+ from naramotion.shapgeo import (
68
+ GeoCanvas, GeoTransform, auto_bounds, compute_center,
69
+ read_file, read_parquet, read_parquet_native, read_geojson, read_shapefile,
70
+ Transformer, to_web_mercator, to_wgs84, reproject_gdf,
71
+ RetainedGeoLayer, NativeGeoLayerSoA, UniformGridIndex, clip_polygon_bbox
72
+ )
73
+
74
+ # 5. Zero-Copy Hardware Video Encoder & Reader
75
+ from naramotion.video import VideoWriter, VideoReader, record_animation
76
+ ```
77
+
78
+ ---
79
+
80
+ ## 🎬 4. Core Motion & Declarative Kinetic Suite
81
+
82
+ ### Declarative Reveal Actions (`Create`, `ShowCreation`, `Uncreate`):
83
+ ```python
84
+ from naramotion.motion import Create, ShowCreation, Uncreate, Timeline
85
+
86
+ timeline = Timeline(fps=60)
87
+ timeline.add_action(Create(road_path, duration=2.5, easing=Easing.cubic_out), start_time=0.0)
88
+ ```
89
+
90
+ ### Chaikin's Corner Smoothing (Native C++ Curve Curvature Continuous):
91
+ ```python
92
+ from naramotion.motion import chaikin_smooth
93
+
94
+ # Smooth raw polygon/linestring/coords in C++ in 0.01ms
95
+ smooth_geometry = chaikin_smooth(raw_road_geometry, iterations=2)
96
+ ```
97
+
98
+ ### Interpolation & Extrapolation Remapping:
99
+ ```python
100
+ from naramotion.motion import interpolate, Extrapolate
101
+
102
+ # Piecewise remapping with clamping or bounce
103
+ val = interpolate(progress, [0.0, 0.5, 1.0], [0.0, 100.0, 50.0], extrapolate=Extrapolate.CLAMP)
104
+ ```
105
+
106
+ ### Distributed Temporal Composition (`Sequence`, `delay_render`):
107
+ ```python
108
+ from naramotion.motion import Sequence, Composition, delay_render
109
+
110
+ seq = Sequence(from_frame=60, duration_frames=180)
111
+ ```
112
+
113
+ ---
114
+
115
+ ## 🗺️ 5. Geospatial Super-Engine (Structure of Arrays, Dual-Buffer, Spring Pop-in)
116
+
117
+ ### 1. Structure of Arrays (SoA) & Path Memory Arena (`NativeGeoLayerSoA`):
118
+ Pre-allocates city blocks in contiguous C++ cache lines (`distances`, `bboxes`, `paths`, `centroids`, `start_frames`), eliminating heap jitter:
119
+ ```python
120
+ from naramotion import NativeGeoLayerSoA
121
+
122
+ layer = NativeGeoLayerSoA(capacity=50000)
123
+ layer.from_wkb_batch(wkb_list, transform=canvas.transform)
124
+ layer.compute_propagation(epicenters=[(-74.0060, 40.7128)], duration_frames=300.0)
125
+ ```
126
+
127
+ ### 2. Dual-Buffer Polygon Rendering & Centroid Spring Pop-in:
128
+ > **PERFORMANCE RULE**: Group fills into Pass 1 and strokes into Pass 2 to keep Blend2D JIT pipelines 100% hot (2.5x faster). Animate expansion via `popin=True` ($Scale(t) = \text{Easing::back\_out}(t)$) centered on feature centroids:
129
+ ```python
130
+ with GeoCanvas(width=3840, height=2160, bg_color="#030408") as canvas:
131
+ canvas.crop_and_fit(min_lon, min_lat, max_lon, max_lat, aspect_ratio=16/9)
132
+
133
+ with VideoWriter("output_4k.mp4", 3840, 2160, fps=60) as vw:
134
+ for frame in range(300):
135
+ canvas.clear_frame("#030408") # Fast memset clear in 0.4ms
136
+
137
+ # Dual-buffer batch render with elastic spring pop-in
138
+ layer.render_popin(
139
+ canvas, current_frame=frame,
140
+ fill_color="#00F0FF", stroke_color="#FFFFFF", stroke_width=1.0
141
+ )
142
+
143
+ # Zero-copy pipe stream directly to FFmpeg stdin
144
+ vw.write_frame(canvas.image)
145
+ ```
146
+
147
+ ### 3. Flat Uniform Grid Spatial Indexing (`UniformGridIndex`):
148
+ ```python
149
+ from naramotion import UniformGridIndex
150
+
151
+ grid = UniformGridIndex(bounds=(-74.1, 40.6, -73.8, 40.9), grid_w=64, grid_h=64)
152
+ grid.build_from_bboxes(bboxes)
153
+ visible_ids = grid.query_bbox(-74.01, 40.70, -73.98, 40.75) # < 1 microsecond!
154
+ ```
155
+
156
+ ### 4. Zero-Object Native Parquet / WKB Ingestion:
157
+ ```python
158
+ import naramotion as nm
159
+
160
+ # Streams WKB directly into C++ SoA layers bypassing Python/Shapely completely
161
+ layer = nm.read_parquet_native("nyc_blocks.parquet", return_native_soa=True)
162
+ ```
163
+
164
+ ### 5. Fast Built-in Metric Projection (Proj Engine):
165
+ ```python
166
+ # C++ SIMD transformations for EPSG:4326, 3857, 2263, 5070, and UTM
167
+ projected = nm.reproject_gdf(gdf, target_crs="EPSG:2263")
168
+ ```
169
+
170
+ ### 6. 4K Ultra-Fast Hierarchical Downsampled Bloom:
171
+ ```python
172
+ from naramotion.fx import bloom
173
+
174
+ # Multi-threaded pyramid downsampling runs in < 60ms on full 4K frames
175
+ bloom(canvas.image, threshold=0.4, intensity=1.5, radius=16.0)
176
+ ```
177
+
178
+ ---
179
+
180
+ ## 🎯 6. AI Code Validation Checklist
181
+
182
+ Before presenting NaraMotion code to the user, ensure:
183
+ 1. `naramotion.set_license("08032008is")` is present.
184
+ 2. NO `cv2`, `PIL`, `pyproj`, or `moviepy` are imported.
185
+ 3. For video loops, instantiate `GeoCanvas` ONCE outside the loop and reuse via `canvas.clear_frame(...)`.
186
+ 4. For polygon blocks/roads in animations, pre-compile with `canvas.create_retained_layer(...)` or `NativeGeoLayerSoA(...)`.
187
+ 5. For animated building reveals, utilize `layer.render_popin(...)` or `dual_buffer=True`.
188
+ 6. Visual FX use `naramotion.fx.*` or `FXPipeline`.
189
+ 7. Video export uses `naramotion.video.VideoWriter` or direct `img.buffer` pipe.
DOCUMENTATION.md ADDED
@@ -0,0 +1,889 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NaraMotion Complete API Documentation & Reference Guide 📚✨
2
+
3
+ **Author & Creator**: Islam Arifi
4
+ **Official PyPI Package**: [`naramotion`](https://pypi.org/project/naramotion/) (v0.26.0)
5
+ **Core Engine**: Powered by Blend2D (Native C++ JIT Compiler & SIMD Hardware Acceleration)
6
+ **License**: Proprietary Commercial License (with Evaluation Mode)
7
+
8
+
9
+ ---
10
+
11
+ ## 📑 Table of Contents
12
+
13
+ 1. [Official Installation](#1-official-installation)
14
+ 2. [Commercial License & Evaluation Watermark Removal](#2-commercial-license--evaluation-watermark-removal)
15
+ 3. [Architectural Overview: C++ vs. Python](#3-architectural-overview-c-vs-python)
16
+ 4. [C++ to Python Translation Cheat Sheet](#4-c-to-python-translation-cheat-sheet)
17
+ 5. [Strict Color Input Specifications & Restrictions](#5-strict-color-input-specifications--restrictions)
18
+ 6. [Image Handling (`naramotion.Image`)](#6-image-handling-blend2dimage)
19
+ 7. [2D Rendering Context (`naramotion.Context`)](#7-2d-rendering-context-blend2dcontext)
20
+ 8. [Vector Path Builder (`naramotion.Path`)](#8-vector-path-builder-blend2dpath)
21
+ 9. [Typography & Fonts (`naramotion.Font`, `naramotion.FontFace`)](#9-typography--fonts-blend2dfont-blend2dfontface)
22
+ 10. [Gradients & Patterns (`naramotion.style`)](#10-gradients--patterns-blend2dstyle)
23
+ 11. [Geometric Primitives (`naramotion.geometry`)](#11-geometric-primitives-blend2dgeometry)
24
+ 12. [Affine Transformations (`naramotion.Matrix2D`)](#12-affine-transformations-blend2dmatrix2d)
25
+ 13. [Bulk & Batch Operations for Big Data](#13-bulk--batch-operations-for-big-data)
26
+ 14. [Zero-Copy NumPy & FFmpeg Video Streaming](#14-zero-copy-numpy--ffmpeg-video-streaming)
27
+ 15. [Hardware-Accelerated Video Engine (`naramotion.video`)](#15-hardware-accelerated-video-engine-blend2dvideo)
28
+ 16. [Geospatial & Big Data Engine (`naramotion.shapgeo` / `naramotion.geo`)](#16-geospatial--big-data-engine-blend2dshapgeo--blend2dgeo)
29
+ 17. [Motion Graphics & Animation (`naramotion.motion`)](#17-motion-graphics--animation-blend2dmotion)
30
+ - [17.1 Easing Curves Reference Table & Physics Springs](#171-easing-curves-reference-table--physics-springs)
31
+ - [17.2 Vector Path Animations & Trimming](#172-vector-path-animations--trimming)
32
+ - [17.3 Particle Simulation & VFX Engine](#173-particle-simulation--vfx-engine)
33
+ - [17.4 Scene Graph, Layers & Camera2D](#174-scene-graph-layers--camera2d)
34
+ - [17.5 Multi-Track Timeline & Direct Video Export](#175-multi-track-timeline--direct-video-export)
35
+ 18. [Kinetic Perspective & 3D Globe (`naramotion.motion.PerspectiveCamera`)](#18-kinetic-perspective--3d-globe-blend2dmotionperspectivecamera)
36
+ 19. [Cinematic Visual FX & Post-Processing (`naramotion.fx`)](#19-cinematic-visual-fx--post-processing-blend2dfx)
37
+ 20. [Enumerations Reference](#20-enumerations-reference)
38
+ 21. [Performance & Best Practices Guide](#21-performance--best-practices-guide)
39
+ 22. [Comprehensive Error Catalog, Exceptions & Troubleshooting Guide](#22-comprehensive-error-catalog-exceptions--troubleshooting-guide)
40
+
41
+ ---
42
+
43
+ ## 1. Official Installation
44
+
45
+ NaraMotion is published officially on **PyPI** (`naramotion`) with pre-compiled native C++ binaries for maximum performance:
46
+
47
+ ### 📦 Standard PyPI Installation:
48
+ ```bash
49
+ pip install naramotion
50
+ ```
51
+
52
+ ### 🛠️ Optional Ecosystem Dependencies:
53
+ ```bash
54
+ # NumPy & Pillow integration (Zero-Copy views)
55
+ pip install "naramotion[numpy,pil]"
56
+
57
+ # Full GIS & Testing Suite (GeoPandas, Shapely, Pytest)
58
+ pip install "naramotion[all]"
59
+ ```
60
+
61
+ ### ✅ Quick Verification & Sanity Check:
62
+ ```python
63
+ import naramotion
64
+
65
+ print(f"✨ NaraMotion Version: {naramotion.__version__} by {naramotion.__author__}")
66
+
67
+ # Render test surface
68
+ img = naramotion.Image(400, 400)
69
+ with naramotion.Context(img) as ctx:
70
+ ctx.fill_all("#090D16")
71
+ ctx.fill_circle(200, 200, 80, "#38BDF8")
72
+
73
+ img.save("test_render.png")
74
+ print("🚀 NaraMotion is installed and rendering with 100% hardware acceleration!")
75
+ ```
76
+
77
+ ---
78
+
79
+ ## 2. Commercial License & Evaluation Watermark Removal
80
+
81
+ NaraMotion is distributed under a **Proprietary Commercial License** with an Evaluation Mode.
82
+
83
+ ### Evaluation Mode Behavior:
84
+ - When unlicensed, rendered images saved to disk or encoded to bytes contain a semi-transparent `"Auras"` watermark in the center.
85
+ - Full API functionality, SIMD acceleration, GIS, and video features remain active during evaluation.
86
+
87
+ ### Activating the Commercial License:
88
+ Call `naramotion.set_license()` with your commercial activation key at script startup:
89
+
90
+ ```python
91
+ import naramotion
92
+
93
+ # Activate commercial license (replaces 'YOUR_COMMERCIAL_KEY' with your purchased key)
94
+ naramotion.set_license("YOUR_COMMERCIAL_KEY")
95
+
96
+ print(f"🔑 License Activated: {naramotion.is_licensed()}")
97
+ ```
98
+
99
+ Or set the environment variable on your system/server:
100
+ ```bash
101
+ export NARAMOTION_LICENSE_KEY="YOUR_COMMERCIAL_KEY" # Linux / macOS
102
+ set NARAMOTION_LICENSE_KEY="YOUR_COMMERCIAL_KEY" # Windows
103
+ ```
104
+
105
+ ---
106
+
107
+ ## 3. Architectural Overview: C++ vs. Python
108
+
109
+ NaraMotion exposes the full power of Blend2D's native JIT engine while adapting all APIs into clean, idiomatic Python:
110
+
111
+ | Concept | C++ (Blend2D) | Python (NaraMotion) |
112
+ | :--- | :--- | :--- |
113
+ | **Naming Convention** | CamelCase (`fillCircle`, `setStrokeWidth`) | snake_case (`fill_circle`, `stroke_width = ...`) |
114
+ | **Context Lifecycle** | `BLContext ctx(img); ... ctx.end();` | `with Context(img) as ctx:` (Auto end/flush) |
115
+ | **Colors** | `BLRgba32(0xFF0000FF)` | String (`"#FF0000"`), Tuple `(255, 0, 0)`, or `0xFFFF0000` |
116
+ | **Properties** | `ctx.setCompOp(...)`, `ctx.getCompOp()` | `ctx.comp_op = CompOp.SRC_OVER` |
117
+ | **Matrix Math** | `m.postTranslate(x, y)` | `m.translate(x, y)` or `m1 * m2` |
118
+ | **NumPy Access** | `BLImageData::pixelData` | `img.to_numpy(copy=False)` (Zero-copy ndarray) |
119
+ | **Video Streaming** | Manual pointer copy | `img.buffer` (Zero-copy Python `memoryview`) |
120
+
121
+ ---
122
+
123
+ ## 4. C++ to Python Translation Cheat Sheet
124
+
125
+ ### Creating an Image and Context
126
+ **C++:**
127
+ ```cpp
128
+ BLImage img(800, 600, BL_FORMAT_PRGB32);
129
+ BLContext ctx(img);
130
+ ctx.fillAll(BLRgba32(0xFF000000));
131
+ ctx.fillCircle(BLCircle(400, 300, 100), BLRgba32(0xFFFF3366));
132
+ ctx.end();
133
+ img.writeToFile("output.png");
134
+ ```
135
+
136
+ **Python:**
137
+ ```python
138
+ from naramotion import Image, Context, Format
139
+
140
+ img = Image(800, 600, Format.PRGB32)
141
+ with Context(img) as ctx:
142
+ ctx.fill_all("black")
143
+ ctx.fill_circle(400, 300, 100, "#FF3366")
144
+
145
+ img.save("output.png")
146
+ ```
147
+
148
+ ---
149
+
150
+ ## 5. Strict Color Input Specifications & Restrictions
151
+
152
+ > [!WARNING]
153
+ > **Strict C++ Parser Rule**:
154
+ > The Blend2D parser does **NOT** accept CSS functional syntax like `"rgba(255, 0, 0, 0.5)"` or `"rgb(0, 255, 0)"`.
155
+ > Colors must strictly be provided in one of the 5 formats below:
156
+
157
+ | Format Type | Syntax Example | Technical Notes |
158
+ | :--- | :--- | :--- |
159
+ | **1. Hex String (RGB)** | `"#38BDF8"` or `"#F00"` | 6 or 3 hex characters prefixed with `#` |
160
+ | **2. Hex String with Alpha (RGBA)** | `"#38BDF888"` or `"#F008"` | 8 or 4 hex characters (`AA` at end) |
161
+ | **3. Named SVG / CSS Colors** | `"crimson"`, `"deepskyblue"`, `"black"` | Standard keyword identifiers |
162
+ | **4. Numeric Tuple (RGB / RGBA)** | `(56, 189, 248)` or `(56, 189, 248, 128)` | Integers strictly between `[0, 255]` |
163
+ | **5. 32-bit Packed Integer (ARGB)** | `0x8838BDF8` | Memory layout: `0xAARRGGBB` |
164
+ | **6. Class Instances** | `Rgba32(56, 189, 248, 255)` or `Rgba(0.22, 0.74, 0.97, 1.0)` | Native C struct wrappers |
165
+
166
+ ---
167
+
168
+ ## 6. Image Handling (`naramotion.Image`)
169
+
170
+ ```python
171
+ # Constructor Signature:
172
+ Image(width: int = 0, height: int = 0, format: Format = Format.PRGB32)
173
+ ```
174
+
175
+ ```python
176
+ # 3-Line MWE:
177
+ from naramotion import Image, Format
178
+ img = Image(1920, 1080, Format.PRGB32)
179
+ img.save("frame.png")
180
+ ```
181
+
182
+ ### Supported Pixel Formats:
183
+ - `Format.PRGB32`: 32-bit Premultiplied ARGB (Default, fastest SIMD execution and highest quality).
184
+ - `Format.XRGB32`: 32-bit RGB with ignored alpha.
185
+ - `Format.A8`: 8-bit Alpha mask only (ideal for glyph caches and matte compositing).
186
+
187
+ ### Complete Method Signatures:
188
+ - `img.create(width: int, height: int, format: Format = Format.PRGB32)`: Reallocate image buffer.
189
+ - `img.reset()`: Free underlying native image memory.
190
+ - `img.copy() -> Image` / `img.clone() -> Image`: Create a deep copy of the image.
191
+ - `img.convert(format: Format)`: In-place format conversion.
192
+ - `img.read_from_file(path: str)`: Load PNG, JPEG, BMP from disk.
193
+ - `img.write_to_file(path: str, codec: str = "PNG")`: Write to disk.
194
+ - `img.save(path: str)`: Alias for `write_to_file`.
195
+ - `img.to_data(codec: str = "PNG") -> bytes`: Encode directly to in-memory bytes.
196
+ - `Image.from_file(path: str) -> Image`: Classmethod to load an image.
197
+ - `Image.from_data(data: bytes) -> Image`: Classmethod to decode bytes.
198
+ - `img.to_numpy(copy: bool = False) -> np.ndarray`: Return `(H, W, 4)` uint8 BGRA view.
199
+ - `Image.from_numpy(arr: np.ndarray) -> Image`: Wrap or copy NumPy ndarray into Blend2D Image.
200
+ - `img.to_pil() -> PIL.Image`: Convert to Pillow Image.
201
+ - `Image.from_pil(pil_img) -> Image`: Convert Pillow Image to Blend2D Image.
202
+ - `img.buffer -> memoryview`: Zero-copy `memoryview` for high-throughput streaming.
203
+
204
+ ---
205
+
206
+ ## 7. 2D Rendering Context (`naramotion.Context`)
207
+
208
+ ```python
209
+ # Context Manager Usage:
210
+ with Context(image: Image) as ctx:
211
+ ...
212
+ ```
213
+
214
+ ```python
215
+ # 3-Line MWE:
216
+ from naramotion import Image, Context
217
+ img = Image(800, 600)
218
+ with Context(img) as ctx:
219
+ ctx.fill_all("#0B0F19")
220
+ ctx.fill_circle(400, 300, 120, "#38BDF8")
221
+ ```
222
+
223
+ ### Complete Rendering API Signatures:
224
+
225
+ #### 1. Canvas Clearing & Rectangles:
226
+ - `ctx.fill_all(style)`: Fill entire surface with color, gradient, or pattern.
227
+ - `ctx.clear_all()`: Clear surface to fully transparent black `(0x00000000)`.
228
+ - `ctx.fill_rect(x: float, y: float, w: float, h: float, style)`
229
+ - `ctx.stroke_rect(x: float, y: float, w: float, h: float, style)`
230
+ - `ctx.fill_round_rect(x: float, y: float, w: float, h: float, rx: float, ry: Optional[float] = None, style)`
231
+ - `ctx.stroke_round_rect(x: float, y: float, w: float, h: float, rx: float, ry: Optional[float] = None, style)`
232
+
233
+ #### 2. Circles, Ellipses & Arcs:
234
+ - `ctx.fill_circle(cx: float, cy: float, r: float, style)`
235
+ - `ctx.stroke_circle(cx: float, cy: float, r: float, style)`
236
+ - `ctx.fill_ellipse(cx: float, cy: float, rx: float, ry: float, style)`
237
+ - `ctx.stroke_ellipse(cx: float, cy: float, rx: float, ry: float, style)`
238
+ - `ctx.fill_arc(cx: float, cy: float, rx: float, ry: float, start: float, sweep: float, style)`
239
+ - `ctx.stroke_arc(cx: float, cy: float, rx: float, ry: float, start: float, sweep: float, style)`
240
+ - `ctx.fill_chord(cx: float, cy: float, rx: float, ry: float, start: float, sweep: float, style)`
241
+ - `ctx.fill_pie(cx: float, cy: float, rx: float, ry: float, start: float, sweep: float, style)`
242
+
243
+ #### 3. Lines & Polygons:
244
+ - `ctx.stroke_line(x0: float, y0: float, x1: float, y1: float, style)`
245
+ - `ctx.fill_polygon(points: Sequence[Tuple[float, float]], style)`
246
+ - `ctx.stroke_polygon(points: Sequence[Tuple[float, float]], style)`
247
+ - `ctx.fill_polyline(points: Sequence[Tuple[float, float]], style)`
248
+ - `ctx.stroke_polyline(points: Sequence[Tuple[float, float]], style)`
249
+
250
+ #### 4. Vector Paths:
251
+ - `ctx.fill_path(path: Path, style)`
252
+ - `ctx.stroke_path(path: Path, style)`
253
+
254
+ #### 5. Image Blitting:
255
+ - `ctx.blit_image(pt_or_x, y_or_img, image=None, src_rect=None)`: Blit an image at specified coordinates.
256
+
257
+ #### 6. State Stack & Clipping:
258
+ - `ctx.save() -> int`: Push context state (matrix, clip, styles) and return cookie ID.
259
+ - `ctx.restore(cookie: Optional[int] = None)`: Pop state back to cookie ID.
260
+ - `ctx.clip_to_rect(x: float, y: float, w: float, h: float)`
261
+ - `ctx.clip_to_path(path: Path)`
262
+ - `ctx.restore_clipping()`
263
+
264
+ #### 7. Context Properties:
265
+ - `ctx.comp_op = CompOp.SRC_OVER`: Composite operation mode.
266
+ - `ctx.global_alpha = 0.75`: Global opacity multiplier `[0.0, 1.0]`.
267
+ - `ctx.stroke_width = 3.5`: Stroke line width in pixels.
268
+ - `ctx.stroke_cap = StrokeCap.ROUND`: Stroke end caps (`BUTT`, `SQUARE`, `ROUND`).
269
+ - `ctx.stroke_join = StrokeJoin.ROUND`: Corner joins (`MITER_CLIP`, `BEVEL`, `ROUND`).
270
+ - `ctx.stroke_miter_limit = 4.0`: Miter limit ratio.
271
+ - `ctx.stroke_dash_offset = 0.0`: Dash pattern offset.
272
+ - `ctx.set_stroke_dash_array(dashes: Sequence[float])`: e.g. `[10.0, 5.0]`.
273
+
274
+ ---
275
+
276
+ ## 8. Vector Path Builder (`naramotion.Path`)
277
+
278
+ ```python
279
+ # Constructor Signature:
280
+ Path()
281
+ ```
282
+
283
+ ```python
284
+ # 3-Line MWE:
285
+ from naramotion import Path
286
+ p = Path()
287
+ p.move_to(100, 100).line_to(200, 100).cubic_to(250, 150, 250, 250, 100, 200).close()
288
+ ```
289
+
290
+ ### Path Verbs & Signatures:
291
+ - `p.move_to(x: float, y: float) -> Path`
292
+ - `p.line_to(x: float, y: float) -> Path`
293
+ - `p.quad_to(x1: float, y1: float, x2: float, y2: float) -> Path`
294
+ - `p.cubic_to(x1: float, y1: float, x2: float, y2: float, x3: float, y3: float) -> Path`
295
+ - `p.arc_to(cx: float, cy: float, rx: float, ry: float, start: float, sweep: float) -> Path`
296
+ - `p.close() -> Path`
297
+ - `p.clear() -> Path`
298
+ - `p.add_circle(cx: float, cy: float, r: float) -> Path`
299
+ - `p.add_rect(x: float, y: float, w: float, h: float) -> Path`
300
+ - `p.add_round_rect(x: float, y: float, w: float, h: float, rx: float, ry: Optional[float] = None) -> Path`
301
+ - `p.add_path(other: Path, matrix: Optional[Matrix2D] = None) -> Path`
302
+ - `p.hit_test(x: float, y: float, fill_rule: FillRule = FillRule.NON_ZERO) -> HitTest`
303
+ - `p.get_length() -> float`: Calculate total arc length in pixels.
304
+ - `p.get_vertices() -> List[Tuple[int, float, float]]`: Extract raw control points and verb tags.
305
+ - `p.to_svg_d() -> str`: Export path as standard SVG `d="..."` string.
306
+
307
+ ---
308
+
309
+ ## 9. Typography & Fonts (`naramotion.Font`, `naramotion.FontFace`)
310
+
311
+ ```python
312
+ # Signatures:
313
+ FontFace.from_file(filepath: str) -> FontFace
314
+ Font(face: FontFace, size: float = 12.0)
315
+ ```
316
+
317
+ ```python
318
+ # 3-Line MWE:
319
+ from naramotion import FontFace, Font, Context
320
+ face = FontFace.from_file("C:/Windows/Fonts/arial.ttf")
321
+ font = Font(face, size=32.0)
322
+ ctx.fill_text(100, 100, font, "NaraMotion Engine", style="#FFFFFF")
323
+ ```
324
+
325
+ ### Metrics & Text Measurement:
326
+ - `font.metrics`: Returns ascent, descent, line gap, x-height, cap-height.
327
+ - `font.get_text_metrics(text: str)`: Returns text advance vector `(advance.x, advance.y)` and bounding box.
328
+ - `ctx.fill_text(x: float, y: float, font: Font, text: str, style)`
329
+ - `ctx.stroke_text(x: float, y: float, font: Font, text: str, style)`
330
+
331
+ ---
332
+
333
+ ## 10. Gradients & Patterns (`naramotion.style`)
334
+
335
+ ### 1. Linear Gradient:
336
+ ```python
337
+ LinearGradient(x0: float, y0: float, x1: float, y1: float, extend_mode: ExtendMode = ExtendMode.PAD)
338
+ ```
339
+ ```python
340
+ from naramotion.style import LinearGradient
341
+ grad = LinearGradient(0, 0, 800, 0)
342
+ grad.add_stop(0.0, "#38BDF8").add_stop(1.0, "#F43F5E")
343
+ ctx.fill_rect(0, 0, 800, 600, style=grad)
344
+ ```
345
+
346
+ ### 2. Radial Gradient:
347
+ ```python
348
+ RadialGradient(x0: float, y0: float, x1: float, y1: float, r0: float, extend_mode: ExtendMode = ExtendMode.PAD)
349
+ ```
350
+ ```python
351
+ from naramotion.style import RadialGradient
352
+ rad = RadialGradient(400, 300, 400, 300, 200)
353
+ rad.add_stop(0.0, "#FFFFFF").add_stop(1.0, "#090D16")
354
+ ctx.fill_circle(400, 300, 200, style=rad)
355
+ ```
356
+
357
+ ### 3. Conic Gradient:
358
+ ```python
359
+ ConicGradient(cx: float, cy: float, angle_rad: float = 0.0)
360
+ ```
361
+ ```python
362
+ from naramotion.style import ConicGradient
363
+ conic = ConicGradient(400, 300, 0.0)
364
+ conic.add_stop(0.0, "red").add_stop(0.5, "blue").add_stop(1.0, "red")
365
+ ctx.fill_circle(400, 300, 150, style=conic)
366
+ ```
367
+
368
+ ### 4. Image Pattern:
369
+ ```python
370
+ Pattern(image: Image, extend_mode: ExtendMode = ExtendMode.REPEAT)
371
+ ```
372
+
373
+ ---
374
+
375
+ ## 11. Geometric Primitives (`naramotion.geometry`)
376
+
377
+ NaraMotion provides direct C-struct wrappers for 2D primitives:
378
+ - `Point(x, y)` / `PointI(x, y)`
379
+ - `Size(w, h)` / `SizeI(w, h)`
380
+ - `Rect(x, y, w, h)` / `RectI(x, y, w, h)`
381
+ - `Circle(cx, cy, r)`
382
+ - `Ellipse(cx, cy, rx, ry)`
383
+ - `RoundRect(x, y, w, h, rx, ry)`
384
+ - `Line(x0, y0, x1, y1)`
385
+ - `Arc(cx, cy, rx, ry, start, sweep)`
386
+ - `Chord(cx, cy, rx, ry, start, sweep)`
387
+ - `Pie(cx, cy, rx, ry, start, sweep)`
388
+
389
+ ---
390
+
391
+ ## 12. Affine Transformations (`naramotion.Matrix2D`)
392
+
393
+ ```python
394
+ # Constructor Signature:
395
+ Matrix2D(m00: float = 1.0, m01: float = 0.0, m10: float = 0.0, m11: float = 1.0, m20: float = 0.0, m21: float = 0.0)
396
+ ```
397
+
398
+ ```python
399
+ # 3-Line MWE:
400
+ from naramotion import Matrix2D
401
+ m = Matrix2D.make_translation(100, 50).scale(2.0, 2.0).rotate_deg(45.0)
402
+ ctx.transform(m)
403
+ ```
404
+
405
+ ### Transformation Methods:
406
+ - `Matrix2D.identity()`
407
+ - `Matrix2D.make_translation(x, y)`
408
+ - `Matrix2D.make_scaling(sx, sy)`
409
+ - `Matrix2D.make_rotation(angle_rad)` / `Matrix2D.make_rotation_deg(angle_deg)`
410
+ - `m.translate(x, y)` / `m.scale(sx, sy)` / `m.rotate(rad)` / `m.rotate_deg(deg)`
411
+ - `m.invert() -> Matrix2D`
412
+ - `m1 * m2`: Matrix multiplication operator.
413
+ - `m.map_point(x, y) -> Tuple[float, float]`
414
+
415
+ ---
416
+
417
+ ## 13. Bulk & Batch Operations for Big Data
418
+
419
+ Render millions of shapes in a single SIMD call with zero Python interpreter overhead:
420
+
421
+ ```python
422
+ # 1. Batch Circles:
423
+ ctx.fill_circle_array(circles_array, style="#38BDF8")
424
+
425
+ # 2. Batch Rectangles:
426
+ ctx.fill_rect_array(rects_array, style="#10B981")
427
+
428
+ # 3. Batch Lines:
429
+ ctx.stroke_line_array(lines_array, style="#F59E0B")
430
+ ```
431
+
432
+ ---
433
+
434
+ ## 14. Zero-Copy NumPy & FFmpeg Video Streaming
435
+
436
+ ```python
437
+ import naramotion
438
+ import numpy as np
439
+
440
+ # Zero-copy NumPy view (changes in ndarray reflect instantly in Blend2D image)
441
+ img = naramotion.Image(1920, 1080)
442
+ arr = img.to_numpy(copy=False)
443
+ arr[:, :, 0] = 255 # Fill blue channel directly in memory
444
+
445
+ # Direct pipe to FFmpeg process
446
+ import subprocess
447
+ ffmpeg = subprocess.Popen([
448
+ "ffmpeg", "-y", "-f", "rawvideo", "-pix_fmt", "bgra",
449
+ "-s", "1920x1080", "-r", "60", "-i", "-",
450
+ "-c:v", "libx264", "-pix_fmt", "yuv420p", "output.mp4"
451
+ ], stdin=subprocess.PIPE)
452
+
453
+ # Zero copy write from memoryview
454
+ ffmpeg.stdin.write(img.buffer)
455
+ ```
456
+
457
+ ---
458
+
459
+ ## 15. Hardware-Accelerated Video Engine (`naramotion.video`)
460
+
461
+ ```python
462
+ # Constructor Signature:
463
+ VideoWriter(
464
+ output_path: str,
465
+ width: int,
466
+ height: int,
467
+ fps: int = 60,
468
+ bitrate: str = "12M",
469
+ codec: Optional[str] = None, # "h264_nvenc", "h264_qsv", "h264_amf", "libx264", "prores"
470
+ preset: str = "fast",
471
+ crf: Optional[int] = None,
472
+ pixel_format: str = "yuv420p"
473
+ )
474
+ ```
475
+
476
+ ```python
477
+ # 3-Line MWE:
478
+ from naramotion.video import VideoWriter
479
+ with VideoWriter("render.mp4", width=3840, height=2160, fps=60, codec="h264_nvenc") as vw:
480
+ with vw.render_frame_context() as ctx:
481
+ ctx.fill_all("#090D16")
482
+ ```
483
+
484
+ ---
485
+
486
+ ## 16. Geospatial & Big Data Engine (`naramotion.shapgeo` / `naramotion.geo`)
487
+
488
+ NaraMotion natively streams and renders massive GIS datasets (e.g. `secondary_roads.parquet`, `roads.parquet`, `03_secondary_roads.geojson`, Shapefiles) directly with zero memory bloat.
489
+
490
+ ### `GeoCanvas` Signature:
491
+ ```python
492
+ GeoCanvas(
493
+ width: int = 1920,
494
+ height: int = 1080,
495
+ bounds: Optional[Tuple[float, float, float, float]] = None,
496
+ bg_color: Union[str, Rgba32] = "#050811",
497
+ padding: float = 0.05
498
+ )
499
+ ```
500
+
501
+ ```python
502
+ # 3-Line MWE (Multi-Layer Parquet & GeoJSON Map):
503
+ from naramotion.shapgeo import GeoCanvas
504
+
505
+ with GeoCanvas(width=3840, height=2160, bg_color="#050811") as canvas:
506
+ # 1. Add massive Parquet vector layer (e.g. roads, secondary roads)
507
+ canvas.add_parquet("secondary_roads.parquet", stroke_color="#00F0FF", stroke_width=2.5)
508
+
509
+ # 2. Add GeoJSON overlay layer
510
+ canvas.add_geojson("03_secondary_roads.geojson", stroke_color="#FF007F", stroke_width=1.5)
511
+
512
+ canvas.save("world_roads_4k.png")
513
+ ```
514
+
515
+ ### Dynamic Stroke & Scale-Aware Level of Detail (LOD):
516
+ Avoid map clutter and ink bleed when zooming out to country or continental level:
517
+ ```python
518
+ # dynamic_stroke=True automatically scales line width proportionally to zoom bounds!
519
+ canvas.add_parquet("secondary_roads.parquet", stroke_color="#00F0FF", stroke_width=2.0, dynamic_stroke=True)
520
+ canvas.add_geojson("03_secondary_roads.geojson", stroke_color="#FF007F", stroke_width=1.5, dynamic_stroke=True)
521
+ ```
522
+
523
+ ### Center, Centroid & Auto-Focusing Viewport:
524
+ ```python
525
+ from naramotion import compute_center, get_centroid
526
+
527
+ # Compute center of GeoDataFrame, Shapefile, Path, or Bounding Box:
528
+ cx, cy = compute_center(gdf_roads)
529
+ print(f"Road network center: lon={cx:.4f}, lat={cy:.4f}")
530
+
531
+ # Dynamically focus canvas camera onto a specific city or country with zoom factor:
532
+ canvas.focus_on(gdf_city, zoom=2.5)
533
+ ```
534
+
535
+ ### High-Speed GIS Readers (`read_parquet`, `read_parquet_native`, `read_geojson`, `read_file`):
536
+ ```python
537
+ from naramotion.shapgeo import read_parquet, read_parquet_native, read_geojson, read_file
538
+
539
+ # 1. Read directly into GeoDataFrame or native GeoDataset
540
+ gdf_roads = read_parquet("secondary_roads.parquet")
541
+ gdf_json = read_geojson("03_secondary_roads.geojson")
542
+ gdf_auto = read_file("boundaries.shp")
543
+
544
+ # 2. Pure Native C++ WKB Parsing directly to SoA (bypasses Shapely/Python completely):
545
+ soa_layer = read_parquet_native("census_blocks.parquet", return_native_soa=True)
546
+ ```
547
+
548
+ ### Structure of Arrays (SoA) & Path Memory Arena (`NativeGeoLayerSoA`):
549
+ For massive cityscapes (30,000+ building blocks / parcels), SoA layout keeps all data in contiguous cache lines (`distances`, `bboxes`, `paths`, `centroids`, `start_frames`), eliminating Python object overhead:
550
+ ```python
551
+ from naramotion import NativeGeoLayerSoA, GeoCanvas
552
+
553
+ layer = NativeGeoLayerSoA(capacity=50000)
554
+ # Parse WKB directly in C++ into BLPathCore
555
+ layer.from_wkb_batch(wkb_buffers, transform=canvas.transform)
556
+
557
+ # Compute shockwave timeline in L1/L2 cache
558
+ layer.compute_propagation(epicenters=[(-74.0060, 40.7128)], duration_frames=300.0)
559
+
560
+ # Vectorized BBox clipping and frame activation
561
+ vis_count = layer.cull_and_update(viewport_bbox=(0, 0, 3840, 2160), current_frame=frame)
562
+ ```
563
+
564
+ ### Dual-Buffer Polygon Render Pipeline & Centroid Spring Pop-In:
565
+ Alternating fill and stroke flushes the JIT pipeline. Dual-Buffer batch rendering separates all fills (Pass 1) from all strokes (Pass 2) for maximum speed. `render_popin` applies an elastic spring back-out scale expansion around each polygon's centroid:
566
+ ```python
567
+ with GeoCanvas(3840, 2160) as canvas:
568
+ # 1. Dual-Buffer Batch Render
569
+ layer.render_dual_buffer(canvas, fill_color="#00F0FF", stroke_color="#FFFFFF", stroke_width=1.0)
570
+
571
+ # 2. Spring Pop-In Animation (Scale(t) = Easing::back_out(t))
572
+ layer.render_popin(canvas, current_frame=frame, fill_color="#00F0FF", stroke_color="#FFFFFF", stroke_width=1.0)
573
+ ```
574
+
575
+ ### Flat Uniform Grid Spatial Index (`UniformGridIndex`):
576
+ ```python
577
+ from naramotion import UniformGridIndex
578
+
579
+ grid = UniformGridIndex(bounds=(-74.1, 40.6, -73.8, 40.9), grid_w=64, grid_h=64)
580
+ grid.build_from_bboxes(bboxes)
581
+ visible_ids = grid.query_bbox(-74.01, 40.70, -73.98, 40.75) # < 1 microsecond!
582
+ ```
583
+
584
+ ### Curated Palettes & Color Harmony Engine (`naramotion.Palette`):
585
+ ```python
586
+ from naramotion import Palette
587
+
588
+ # 1. Designer Pre-built Palettes:
589
+ cyberpunk = Palette.CYBERPUNK # Cyan, Hot Pink, Electric Purple, Neon Green, Acid Yellow
590
+ tokyo = Palette.TOKYO_NIGHT # Soft Blue, Lavender, Sky, Crimson, Gold
591
+ solar = Palette.SOLAR_HEAT # Red Orange, Solar Gold, Deep Pink, Plum
592
+ nordic = Palette.NORDIC_FROST # Ice Blue, Glacier, Deep Ocean, Frost Mauve
593
+ midnight = Palette.MIDNIGHT_BLUE # Electric Cyan, Indigo, Purple, Rose, Emerald
594
+
595
+ # 2. Golden-Ratio Harmonic Generator (Guaranteed zero color clash for N layers):
596
+ layer_colors = Palette.generate(8, base_color="#00F0FF", mode="golden_ratio")
597
+ ```
598
+
599
+ ### Anti-Burnout ACES Filmic Tone Mapping (`naramotion.fx.tone_map_aces`):
600
+ ```python
601
+ from naramotion.fx import tone_map_aces, bloom
602
+
603
+ # Render 10,000 glowing intersecting lines without clipping to solid white!
604
+ tone_map_aces(canvas.img, exposure=1.1)
605
+ ```
606
+
607
+ ---
608
+
609
+ ## 17. Motion Graphics & Animation (`naramotion.motion`)
610
+
611
+ ### 17.1 Declarative Action Chaining & Kinetic Animations
612
+ ```python
613
+ from naramotion.motion import DrawReveal, Typewriter, Stagger, Spring
614
+
615
+ # Progressive line drawing reveal (0% to 100%):
616
+ reveal_action = DrawReveal(target_path, duration=2.0, color="#00F0FF", width=2.5)
617
+
618
+ # Kinetic Typewriter with glowing blinking cursor:
619
+ typewriter_action = Typewriter("NARAMOTION V0.23", x=100, y=200, duration=1.5, font_size=36)
620
+
621
+ # Stagger actions sequentially:
622
+ staggered_actions = Stagger.create([reveal_action, typewriter_action], delay_step=0.4)
623
+ ```
624
+
625
+ ### 17.2 Easing Curves Reference Table & Physics Springs
626
+
627
+ All easing functions accept progress $t \in [0.0, 1.0]$:
628
+
629
+ | Family | In (`_in`) | Out (`_out`) | In-Out (`_in_out`) |
630
+ | :--- | :--- | :--- | :--- |
631
+ | **Linear** | `Easing.linear(t)` | `Easing.linear(t)` | `Easing.linear(t)` |
632
+ | **Quadratic** | `Easing.quad_in(t)` | `Easing.quad_out(t)` | `Easing.quad_in_out(t)` |
633
+ | **Cubic** | `Easing.cubic_in(t)` | `Easing.cubic_out(t)` | `Easing.cubic_in_out(t)` |
634
+ | **Quartic** | `Easing.quart_in(t)` | `Easing.quart_out(t)` | `Easing.quart_in_out(t)` |
635
+ | **Quintic** | `Easing.quint_in(t)` | `Easing.quint_out(t)` | `Easing.quint_in_out(t)` |
636
+ | **Sine** | `Easing.sine_in(t)` | `Easing.sine_out(t)` | `Easing.sine_in_out(t)` |
637
+ | **Exponential** | `Easing.expo_in(t)` | `Easing.expo_out(t)` | `Easing.expo_in_out(t)` |
638
+ | **Circular** | `Easing.circ_in(t)` | `Easing.circ_out(t)` | `Easing.circ_in_out(t)` |
639
+ | **Elastic** | `Easing.elastic_in(t)` | `Easing.elastic_out(t)` | `Easing.elastic_in_out(t)` |
640
+ | **Back (Overshoot)** | `Easing.back_in(t)` | `Easing.back_out(t)` | `Easing.back_in_out(t)` |
641
+ | **Bounce** | `Easing.bounce_in(t)` | `Easing.bounce_out(t)` | `Easing.bounce_in_out(t)` |
642
+
643
+ #### Spring Physics Dynamics:
644
+ ```python
645
+ from naramotion.motion import Spring
646
+ spring = Spring(stiffness=170.0, damping=26.0, mass=1.0)
647
+ pos = spring.evaluate(t=0.35)
648
+ ```
649
+
650
+ #### Cubic Bezier Curves:
651
+ ```python
652
+ from naramotion.motion import CubicBezier
653
+ bezier = CubicBezier(0.25, 0.1, 0.25, 1.0)
654
+ val = bezier.evaluate(t=0.5)
655
+ ```
656
+
657
+ ---
658
+
659
+ ### 17.2 Vector Path Animations & Trimming
660
+
661
+ ```python
662
+ # Trim path line-drawing reveal:
663
+ from naramotion.motion import trim_path, PathFollower, path_morph
664
+ revealed = trim_path(full_path, start=0.0, end=0.8)
665
+
666
+ # Follow tangent and position along path:
667
+ follower = PathFollower(full_path)
668
+ x, y, angle_rad = follower.point_at(t=0.5)
669
+
670
+ # Morph between two paths:
671
+ morphed_path = path_morph(path_a, path_b, progress=0.5)
672
+ ```
673
+
674
+ ---
675
+
676
+ ### 17.3 Particle Simulation & VFX Engine
677
+
678
+ ```python
679
+ from naramotion.motion import ParticleSystem
680
+ ps = ParticleSystem(max_particles=20000).add_gravity(0, 500)
681
+ ps.preset_fireworks(x=960, y=540, count=250)
682
+ ps.update(1.0 / 60.0)
683
+ ps.render(ctx)
684
+ ```
685
+
686
+ ---
687
+
688
+ ### 17.4 Scene Graph, Layers & Camera2D
689
+
690
+ ```python
691
+ from naramotion.motion import Scene, Node, Camera2D
692
+ scene = Scene(1920, 1080)
693
+ scene.camera.look_at(500, 500)
694
+ scene.camera.shake(intensity=15.0, duration=0.6)
695
+ scene.render(ctx)
696
+ ```
697
+
698
+ ---
699
+
700
+ ### 17.5 Multi-Track Timeline & Direct Video Export
701
+
702
+ ```python
703
+ from naramotion.motion import Timeline
704
+ tl = Timeline(duration=5.0, fps=60)
705
+ tl.animate(cam, "pitch", start_val=0.0, end_val=70.0, duration=3.0, easing="easeInOutCubic")
706
+ tl.render_video("cinematic.mp4", width=3840, height=2160, fps=60, draw_fn=render_callback)
707
+ ```
708
+
709
+ ---
710
+
711
+ ## 18. Kinetic Perspective & 3D Globe (`naramotion.motion.PerspectiveCamera`)
712
+
713
+ ```python
714
+ # Constructor Signature:
715
+ PerspectiveCamera(
716
+ width: int = 1920,
717
+ height: int = 1080,
718
+ fov: float = 60.0,
719
+ pitch: float = 0.0, # Tilt (0 = top-down 2D, 75 = horizon perspective)
720
+ yaw: float = 0.0, # Heading rotation
721
+ roll: float = 0.0, # Banking angle
722
+ distance: float = 1000.0,# Altitude / zoom
723
+ target_x: float = 0.0, # Focus point X
724
+ target_y: float = 0.0, # Focus point Y
725
+ near_clip: float = 10.0 # Near-plane clipping
726
+ )
727
+ ```
728
+
729
+ ```python
730
+ # 3-Line MWE:
731
+ from naramotion.motion import PerspectiveCamera
732
+ cam = PerspectiveCamera(width=3840, height=2160, pitch=72.0, distance=900.0)
733
+ proj_lines, scales, valid = cam.transform_lines(street_lines_nx4)
734
+ cam.render_fog(ctx, fog_color="#050811", horizon_y_ratio=0.3)
735
+ ```
736
+
737
+ ### 3D Globe Renderer:
738
+ ```python
739
+ from naramotion.motion import render_globe
740
+ render_globe(
741
+ dst_image=canvas_img,
742
+ texture_image=world_texture_img,
743
+ cx=960, cy=540, radius=400,
744
+ rot_lon=45.0, rot_lat=15.0,
745
+ glow_color="#38BDF8FF"
746
+ )
747
+ ```
748
+
749
+ ---
750
+
751
+ ## 19. Cinematic Visual FX & Post-Processing (`naramotion.fx`)
752
+
753
+ ```python
754
+ # Signatures for All Filters:
755
+ gaussian_blur(image: Image, sigma: float = 3.0, in_place: bool = True) -> Image
756
+ bloom(image: Image, threshold: float = 0.6, intensity: float = 1.2, radius: float = 10.0, tint: str = "#FFFFFFFF") -> Image
757
+ neon_glow(image: Image, color: str = "#38BDF8FF", intensity: float = 1.8, radius: float = 14.0) -> Image
758
+ chromatic_aberration(image: Image, shift_x: float = 6.0, shift_y: float = 0.0) -> Image
759
+ vignette(image: Image, intensity: float = 0.6, radius: float = 0.4, smoothness: float = 0.45) -> Image
760
+ film_grain(image: Image, amount: float = 0.08, seed: int = 0) -> Image
761
+ color_grade(image: Image, brightness: float = 0.0, contrast: float = 1.0, saturation: float = 1.0, gamma: float = 1.0) -> Image
762
+ drop_shadow(image: Image, dx: float = 12.0, dy: float = 12.0, blur: float = 15.0, shadow_color: str = "#000000AA") -> Image
763
+ scanlines(image: Image, spacing: int = 4, intensity: float = 0.35) -> Image
764
+ glitch_displacement(image: Image, num_slices: int = 12, max_displacement: int = 30) -> Image
765
+ ```
766
+
767
+ ### Fluent Chaining Pipeline:
768
+ ```python
769
+ from naramotion.fx import FXPipeline
770
+ pipe = (
771
+ FXPipeline()
772
+ .bloom(threshold=0.5, intensity=1.4, radius=12.0)
773
+ .chromatic_aberration(shift_x=5.0)
774
+ .vignette(intensity=0.55)
775
+ .film_grain(amount=0.06)
776
+ )
777
+ pipe.apply(img)
778
+ ```
779
+
780
+ ---
781
+
782
+ ## 20. Enumerations Reference
783
+
784
+ ### `CompOp` (Composite Modes):
785
+ `SRC_OVER`, `SRC_COPY`, `SRC_IN`, `SRC_OUT`, `SRC_ATOP`, `DST_OVER`, `DST_IN`, `DST_OUT`, `DST_ATOP`, `XOR`, `CLEAR`, `PLUS`, `MINUS`, `MULTIPLY`, `SCREEN`, `OVERLAY`, `DARKEN`, `LIGHTEN`, `COLOR_DODGE`, `COLOR_BURN`, `HARD_LIGHT`, `SOFT_LIGHT`, `DIFFERENCE`, `EXCLUSION`.
786
+
787
+ ### `StrokeCap`:
788
+ `BUTT`, `SQUARE`, `ROUND`, `ROUND_REV`, `TRIANGLE`, `TRIANGLE_REV`.
789
+
790
+ ### `StrokeJoin`:
791
+ `MITER_CLIP`, `MITER_BEVEL`, `MITER_ROUND`, `BEVEL`, `ROUND`.
792
+
793
+ ### `FillRule`:
794
+ `NON_ZERO`, `EVEN_ODD`.
795
+
796
+ ### `Format`:
797
+ `PRGB32` (Premultiplied 32-bit ARGB), `XRGB32` (Opaque 32-bit RGB), `A8` (8-bit Alpha mask).
798
+
799
+ ### `ExtendMode`:
800
+ `PAD`, `REPEAT`, `REFLECT`, `PAD_X_PAD_Y`, `REPEAT_X_REPEAT_Y`.
801
+
802
+ ---
803
+
804
+ ## 21. Performance & Best Practices Guide
805
+
806
+ 1. **Always Use the Context Manager (`with Context(img) as ctx:`)**:
807
+ - Ensures automatic native flushing and exception safety.
808
+ 2. **Prefer In-Place Batch Arrays for Big Data**:
809
+ - Use `ctx.fill_circle_array()` and `cam.transform_lines()` instead of looping in Python.
810
+ 3. **Prefer `PRGB32` Format**:
811
+ - Blend2D's JIT compiler generates AVX2 / AVX-512 vector pipelines specifically optimized for premultiplied 32-bit pixel buffers.
812
+ 4. **Use Zero-Copy `img.buffer` for Video Encoding**:
813
+ - Stream directly into `VideoWriter` or FFmpeg without memory allocation overhead.
814
+
815
+ ---
816
+
817
+ ## 22. Comprehensive Error Catalog, Exceptions & Troubleshooting Guide
818
+
819
+ NaraMotion wraps all native C++ engine errors into standard Python exceptions. Below is the complete catalog of errors, their root causes, and step-by-step resolution.
820
+
821
+ ### 22.1 Native Engine Errors (`naramotion.Blend2DError`)
822
+
823
+ | Error Code | Exception Output | Root Cause | Resolution |
824
+ | :--- | :--- | :--- | :--- |
825
+ | **`BL_ERROR_INVALID_VALUE` (1)** | `Blend2DError: Invalid value` | Passing invalid image width/height ($\le 0$), negative radius, NaN, or Inf coordinates. | Ensure dimensions are integers $> 0$ and coordinates are valid finite numbers (`math.isfinite(x)`). |
826
+ | **`BL_ERROR_INVALID_STATE` (2)** | `Blend2DError: Invalid state` | Calling drawing methods on a context after `ctx.end()`, or before `ctx.begin()`. | Always use the context manager `with Context(img) as ctx:` which guarantees safe lifecycle. |
827
+ | **`BL_ERROR_INVALID_HANDLE` (3)** | `Blend2DError: Invalid handle` | Calling methods on a destroyed image/path resource (e.g. after `img.reset()`). | Do not access an image after calling `img.reset()`. Create a new image if needed. |
828
+ | **`BL_ERROR_NO_MATCHING_VERTEX` (4)** | `Blend2DError: No matching vertex` | Attempting to trim or query path tangent on an empty `Path()`. | Ensure the path contains at least one `move_to` and `line_to` before calling `trim_path()` or `PathFollower`. |
829
+ | **`BL_ERROR_OUT_OF_MEMORY` (6)** | `Blend2DError: Out of memory` | Requesting an image allocation larger than available RAM (e.g. $100000 \times 100000$). | Verify image dimensions before creating canvas. For large maps, render in tiles or at 4K/8K. |
830
+ | **`BL_ERROR_FONT_NOT_MATCHED` (14)** | `Blend2DError: Font not matched` | Passing a corrupted font file or unsupported font format. | Provide a standard OpenType (`.otf`) or TrueType (`.ttf` / `.ttc`) font file. |
831
+
832
+ ---
833
+
834
+ ### 22.2 Common Python Exceptions in NaraMotion
835
+
836
+ #### 1. `ValueError: Unsupported color format`
837
+ - **When it happens**: Passing CSS functional strings like `"rgba(255, 0, 0, 0.5)"` or `"rgb(0, 255, 0)"`.
838
+ - **Fix**: Convert to hex string or numeric tuple:
839
+ ```python
840
+ # ❌ Incorrect:
841
+ ctx.fill_circle(100, 100, 50, "rgba(56, 189, 248, 0.5)")
842
+
843
+ # ✅ Correct:
844
+ ctx.fill_circle(100, 100, 50, "#38BDF880") # Hex with 50% alpha
845
+ ctx.fill_circle(100, 100, 50, (56, 189, 248, 128)) # Tuple with alpha
846
+ ```
847
+
848
+ #### 2. `RuntimeError: FFmpeg executable not found`
849
+ - **When it happens**: Using `VideoWriter` or `VideoReader` when FFmpeg is not installed or not in system `PATH`.
850
+ - **Fix**:
851
+ - **Windows**: `winget install Gyan.FFmpeg`
852
+ - **Ubuntu / Debian**: `sudo apt update && sudo apt install -y ffmpeg`
853
+ - **macOS**: `brew install ffmpeg`
854
+
855
+ #### 3. `TypeError: Array must be C-contiguous and uint8`
856
+ - **When it happens**: Passing a non-contiguous slice or float array to `Image.from_numpy()`.
857
+ - **Fix**: Ensure array is C-contiguous with `uint8` dtype:
858
+ ```python
859
+ import numpy as np
860
+ arr = np.ascontiguousarray(arr, dtype=np.uint8)
861
+ img = Image.from_numpy(arr)
862
+ ```
863
+
864
+ #### 4. `FileNotFoundError: Font file not found`
865
+ - **When it happens**: Calling `FontFace.from_file("arial.ttf")` when the file does not exist at that path.
866
+ - **Fix**: Use absolute paths:
867
+ ```python
868
+ # Windows:
869
+ face = FontFace.from_file("C:/Windows/Fonts/segoeui.ttf")
870
+ # Linux:
871
+ face = FontFace.from_file("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf")
872
+ ```
873
+
874
+ #### 5. `ImportError: DLL load failed while importing _bin`
875
+ - **When it happens**: Missing Visual C++ runtime on Windows.
876
+ - **Fix**: Install the official [Microsoft Visual C++ 2015-2022 Redistributable (x64)](https://aka.ms/vs/17/release/vc_redist.x64.exe) or reinstall with:
877
+ ```bash
878
+ pip install --force-reinstall naramotion
879
+ ```
880
+
881
+ ---
882
+
883
+ ### 22.3 Environment Conflicts & Compatibility Solutions
884
+
885
+ | Environment Issue | Cause | Solution |
886
+ | :--- | :--- | :--- |
887
+ | **GeoPandas / Shapely version mismatch** | Old versions missing `__geo_interface__` | `pip install --upgrade geopandas shapely` |
888
+ | **Virtualenv DLL isolation** | Custom sandbox blocking `.dll` search | NaraMotion auto-adds `blend2d/_bin` with `os.add_dll_directory()`. |
889
+ | **Multithreading OpenMP / Context Sharing** | Two threads drawing to the same `Context` simultaneously | Create one `Context` per image per thread. Images can be rendered in parallel across threads. |
README.md ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NaraMotion 🎨🚀
2
+
3
+ [![Python Version](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/)
4
+ [![License](https://img.shields.io/badge/License-Proprietary-red.svg)](https://pypi.org/project/naramotion/)
5
+ [![JIT Accelerated](https://img.shields.io/badge/JIT-AsmJit%20Hardware%20Accelerated-orange.svg)](https://blend2d.com)
6
+
7
+ **Author & Creator**: Islam Arifi
8
+ **Official PyPI Package**: [`naramotion`](https://pypi.org/project/naramotion/) (v0.22.0)
9
+
10
+ **NaraMotion** is an ultra-fast 2D/2.5D vector graphics, GIS, motion graphics, and cinematic video engine for Python powered by **[Blend2D](https://blend2d.com)** (embedded JIT compiler and SIMD hardware acceleration).
11
+
12
+ ---
13
+
14
+ ## 🔑 License Activation & Evaluation Mode
15
+
16
+ NaraMotion is distributed under a **Proprietary Commercial License** with an Evaluation Mode.
17
+ Unlicensed evaluation renders include a subtle semi-transparent `"Auras"` watermark in the center.
18
+
19
+ ### To Activate Full Commercial Version:
20
+ Call `naramotion.set_license()` at the beginning of your program with your commercial key:
21
+
22
+ ```python
23
+ import naramotion
24
+
25
+ # Activate official license (removes all evaluation watermarks)
26
+ naramotion.set_license("YOUR_COMMERCIAL_KEY")
27
+ ```
28
+
29
+ Or set the environment variable:
30
+ ```bash
31
+ export NARAMOTION_LICENSE_KEY="YOUR_COMMERCIAL_KEY" # Linux/macOS
32
+ set NARAMOTION_LICENSE_KEY="YOUR_COMMERCIAL_KEY" # Windows
33
+ ```
34
+
35
+ ---
36
+
37
+ ## 📦 Official Installation
38
+
39
+ ### 1. From PyPI:
40
+ ```bash
41
+ pip install naramotion
42
+ ```
43
+
44
+ ### 2. Optional Speed & Ecosystem Extensions:
45
+ ```bash
46
+ pip install "naramotion[numpy,pil]" # For Zero-Copy NumPy & Pillow integration
47
+ pip install "naramotion[all]" # For GeoPandas, Shapely & full testing
48
+ ```
49
+
50
+ ### ✅ Quick Verification:
51
+ ```python
52
+ import naramotion
53
+ print(f"✨ NaraMotion Version: {naramotion.__version__} by {naramotion.__author__}")
54
+ ```
55
+
56
+ ---
57
+
58
+ ## 🚀 Quickstart
59
+
60
+ ### 1. Basic Drawing & Context Manager
61
+
62
+ ```python
63
+ from naramotion import Image, Context, Format
64
+
65
+ # Create 800x600 surface in PRGB32 format
66
+ img = Image(800, 600, Format.PRGB32)
67
+
68
+ with Context(img) as ctx:
69
+ # 1. Fill dark cyberpunk canvas background
70
+ ctx.fill_all("#090D16")
71
+
72
+ # 2. Draw soft glowing circle
73
+ ctx.fill_circle(400, 300, 140, "#38BDF8")
74
+
75
+ # 3. Add stylish thick border with rounded corners
76
+ ctx.stroke_width = 8.0
77
+ ctx.stroke_round_rect(100, 100, 600, 400, 24.0, style="#F43F5E")
78
+
79
+ # Save directly to disk
80
+ img.save("quickstart_naramotion.png")
81
+ ```
82
+
83
+ ---
84
+
85
+ ### 2. Cinematic Post-Processing FX & Post-Pipeline
86
+
87
+ ```python
88
+ from naramotion import Image, Context, fx
89
+
90
+ img = Image(1280, 720)
91
+ with Context(img) as ctx:
92
+ ctx.fill_all("#060810")
93
+ ctx.fill_circle(640, 360, 180, "#38BDF8")
94
+
95
+ # Apply chained visual FX (Bloom + Vignette + Film Grain)
96
+ fx.FXPipeline().bloom(threshold=0.5, intensity=1.5, radius=12.0).vignette(0.5).film_grain(0.05).apply(img)
97
+ img.save("cinematic_naramotion.png")
98
+ ```
99
+
100
+ ---
101
+
102
+ ### 3. Kinetic Perspective Camera (2.5D 4K Video Flythrough)
103
+
104
+ ```python
105
+ from naramotion import Image, Context, Format, CompOp
106
+ from naramotion.motion import PerspectiveCamera
107
+ from naramotion.video import VideoWriter
108
+
109
+ WIDTH, HEIGHT = 1920, 1080
110
+ img = Image(WIDTH, HEIGHT, Format.PRGB32)
111
+ cam = PerspectiveCamera(width=WIDTH, height=HEIGHT, pitch=65.0, distance=900.0)
112
+
113
+ with VideoWriter("flythrough.mp4", width=WIDTH, height=HEIGHT, fps=60) as vw:
114
+ for frame in range(120):
115
+ cam.target_y = (frame / 119.0) * 1200.0
116
+ with Context(img) as ctx:
117
+ ctx.fill_all("#050811")
118
+ cam.render_fog(ctx, fog_color="#050811", horizon_y_ratio=0.35)
119
+ vw.write_frame(img)
120
+ ```
121
+
122
+ ---
123
+
124
+ ## 📚 Complete API Documentation
125
+
126
+ For the complete 22-section master documentation and AI guidelines, see:
127
+ - [`DOCUMENTATION.md`](DOCUMENTATION.md)
128
+ - [`AI_RULES.md`](AI_RULES.md)
blend2d/__init__.py ADDED
@@ -0,0 +1,343 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ NaraMotion: High-Performance 2D Vector Graphics Engine for Python powered by Blend2D.
3
+ """
4
+
5
+ from naramotion.enums import (
6
+ Format,
7
+ CompOp,
8
+ FillRule,
9
+ GeometryType,
10
+ ExtendMode,
11
+ GradientType,
12
+ StrokeCap,
13
+ StrokeCapPosition,
14
+ StrokeJoin,
15
+ StrokeTransformOrder,
16
+ TransformOp,
17
+ ClipOp,
18
+ FlattenMode,
19
+ RenderingEngine,
20
+ ResultCode,
21
+ ContextHint,
22
+ RenderingQuality,
23
+ GradientQuality,
24
+ PatternQuality,
25
+ RuntimeInfoType,
26
+ RuntimeCpuArch,
27
+ RuntimeCpuFeatures,
28
+ )
29
+ from naramotion.ffi import Blend2DError
30
+ from naramotion.geometry import (
31
+ Point,
32
+ PointI,
33
+ Size,
34
+ SizeI,
35
+ Rect,
36
+ RectI,
37
+ Box,
38
+ BoxI,
39
+ Circle,
40
+ Ellipse,
41
+ RoundRect,
42
+ Triangle,
43
+ Arc,
44
+ Line,
45
+ )
46
+ from naramotion.matrix import Matrix2D
47
+ from naramotion.color import (
48
+ Color,
49
+ Rgba32,
50
+ Rgba,
51
+ parse_color,
52
+ NAMED_COLORS,
53
+ )
54
+ from naramotion.image import Image
55
+ from naramotion.path import Path
56
+ from naramotion.style import (
57
+ Gradient,
58
+ LinearGradient,
59
+ RadialGradient,
60
+ ConicGradient,
61
+ Pattern,
62
+ )
63
+ from naramotion.font import (
64
+ FontFace,
65
+ Font,
66
+ FontMetrics,
67
+ TextMetrics,
68
+ )
69
+ from naramotion.context import Context
70
+ from naramotion.diagnostics import (
71
+ diagnose_environment,
72
+ print_diagnostic_report,
73
+ get_error_details,
74
+ get_runtime_info,
75
+ )
76
+ from naramotion import svg
77
+ from naramotion.svg import SvgContext, export_svg
78
+ from naramotion import video
79
+ from naramotion.video import (
80
+ VideoWriter,
81
+ VideoReader,
82
+ record_animation,
83
+ detect_hardware_encoders,
84
+ VideoError,
85
+ CodecNotFoundError,
86
+ FrameFormatError,
87
+ )
88
+ from naramotion import shapgeo
89
+ from naramotion.shapgeo import (
90
+ GeoCanvas,
91
+ GeoTransform,
92
+ from_shapely,
93
+ from_geojson,
94
+ from_wkt,
95
+ render_gdf,
96
+ auto_bounds,
97
+ compute_center,
98
+ get_center,
99
+ get_centroid,
100
+ read_file,
101
+ read_parquet,
102
+ read_parquet_native,
103
+ read_shapefile,
104
+ read_geojson,
105
+ proj,
106
+ Transformer,
107
+ to_web_mercator,
108
+ to_wgs84,
109
+ reproject_gdf,
110
+ RetainedGeoLayer,
111
+ NativeGeoLayerSoA,
112
+ UniformGridIndex,
113
+ clip_polygon_bbox,
114
+ )
115
+ from naramotion.palette import Palette
116
+ from naramotion import motion
117
+ from naramotion.motion import (
118
+ Timeline,
119
+ Easing,
120
+ Spring,
121
+ Action,
122
+ DrawReveal,
123
+ Create,
124
+ ShowCreation,
125
+ Uncreate,
126
+ Typewriter,
127
+ Stagger,
128
+ interpolate,
129
+ Extrapolate,
130
+ chaikin_smooth,
131
+ chaikin_smooth_points,
132
+ Sequence,
133
+ Composition,
134
+ delay_render,
135
+ CubicBezier,
136
+ trim_path,
137
+ PathFollower,
138
+ PathMorph,
139
+ ParticleSystem,
140
+ Camera2D,
141
+ PerspectiveCamera,
142
+ render_globe,
143
+ Node,
144
+ Layer,
145
+ Scene,
146
+ )
147
+ from naramotion import fx
148
+ from naramotion.fx import (
149
+ FXPipeline,
150
+ gaussian_blur,
151
+ box_blur,
152
+ box_blur_integral,
153
+ bloom,
154
+ neon_glow,
155
+ drop_shadow,
156
+ chromatic_aberration,
157
+ vignette,
158
+ film_grain,
159
+ color_grade,
160
+ grayscale,
161
+ invert,
162
+ sepia,
163
+ tone_map_aces,
164
+ tone_map_reinhard,
165
+ scanlines,
166
+ glitch_displacement,
167
+ )
168
+ from naramotion.license import (
169
+ set_license,
170
+ is_licensed,
171
+ )
172
+
173
+ # Alias geo -> shapgeo for developer convenience
174
+ geo = shapgeo
175
+
176
+ __version__ = "0.26.0"
177
+
178
+ __author__ = "Islam Arifi, NaraMotion Team, Blend2D Authors"
179
+
180
+ # Backward compatibility alias
181
+ import sys
182
+ sys.modules["blend2d"] = sys.modules[__name__]
183
+
184
+ __all__ = [
185
+ # Core
186
+ "Image",
187
+ "Context",
188
+ "Path",
189
+ "Blend2DError",
190
+ "set_license",
191
+ "is_licensed",
192
+ # Post-Processing FX Engine
193
+ "fx",
194
+ "FXPipeline",
195
+ "gaussian_blur",
196
+ "box_blur",
197
+ "bloom",
198
+ "neon_glow",
199
+ "drop_shadow",
200
+ "chromatic_aberration",
201
+ "vignette",
202
+ "film_grain",
203
+ "color_grade",
204
+ "grayscale",
205
+ "invert",
206
+ "sepia",
207
+ "scanlines",
208
+ "glitch_displacement",
209
+ # Motion Graphics & Animation Engine
210
+ "motion",
211
+ "Timeline",
212
+ "Easing",
213
+ "Spring",
214
+ "Action",
215
+ "DrawReveal",
216
+ "Create",
217
+ "ShowCreation",
218
+ "Uncreate",
219
+ "Typewriter",
220
+ "Stagger",
221
+ "interpolate",
222
+ "Extrapolate",
223
+ "chaikin_smooth",
224
+ "chaikin_smooth_points",
225
+ "Sequence",
226
+ "Composition",
227
+ "delay_render",
228
+ "CubicBezier",
229
+ "trim_path",
230
+ "PathFollower",
231
+ "PathMorph",
232
+ "ParticleSystem",
233
+ "Camera2D",
234
+ "PerspectiveCamera",
235
+ "render_globe",
236
+ "Node",
237
+ "Layer",
238
+ "Scene",
239
+ # Geospatial (GeoPandas & Shapely C++ Engine)
240
+ "shapgeo",
241
+ "geo",
242
+ "GeoCanvas",
243
+ "GeoTransform",
244
+ "from_shapely",
245
+ "from_geojson",
246
+ "from_wkt",
247
+ "render_gdf",
248
+ "auto_bounds",
249
+ "compute_center",
250
+ "get_center",
251
+ "get_centroid",
252
+ "read_file",
253
+ "read_parquet",
254
+ "read_shapefile",
255
+ "read_geojson",
256
+ "proj",
257
+ "Transformer",
258
+ "to_web_mercator",
259
+ "to_wgs84",
260
+ "reproject_gdf",
261
+ "RetainedGeoLayer",
262
+ "clip_polygon_bbox",
263
+ # Palette & Color Harmony
264
+ "Palette",
265
+ # Video & Native FFmpeg Engine
266
+ "video",
267
+ "VideoWriter",
268
+ "VideoReader",
269
+ "record_animation",
270
+ "detect_hardware_encoders",
271
+ "VideoError",
272
+ "CodecNotFoundError",
273
+ "FrameFormatError",
274
+ # SVG Vector Export
275
+ "svg",
276
+ "SvgContext",
277
+ "export_svg",
278
+ # Diagnostics & Troubleshooting
279
+ "diagnose_environment",
280
+ "print_diagnostic_report",
281
+ "get_error_details",
282
+ "get_runtime_info",
283
+ # Styles
284
+ "Gradient",
285
+ "LinearGradient",
286
+ "RadialGradient",
287
+ "ConicGradient",
288
+ "Pattern",
289
+ # Colors
290
+ "Rgba32",
291
+ "Rgba",
292
+ "parse_color",
293
+ "NAMED_COLORS",
294
+ # Typography
295
+ "FontFace",
296
+ "Font",
297
+ "FontMetrics",
298
+ "TextMetrics",
299
+ # Geometry
300
+ "Point",
301
+ "PointI",
302
+ "Size",
303
+ "SizeI",
304
+ "Rect",
305
+ "RectI",
306
+ "Box",
307
+ "BoxI",
308
+ "Circle",
309
+ "Ellipse",
310
+ "RoundRect",
311
+ "Triangle",
312
+ "Arc",
313
+ "Line",
314
+ "Matrix2D",
315
+ # Colors
316
+ "Color",
317
+ "Rgba32",
318
+ "Rgba",
319
+ "parse_color",
320
+ # Enums
321
+ "Format",
322
+ "CompOp",
323
+ "FillRule",
324
+ "GeometryType",
325
+ "ExtendMode",
326
+ "GradientType",
327
+ "StrokeCap",
328
+ "StrokeCapPosition",
329
+ "StrokeJoin",
330
+ "StrokeTransformOrder",
331
+ "TransformOp",
332
+ "ClipOp",
333
+ "FlattenMode",
334
+ "RenderingEngine",
335
+ "ResultCode",
336
+ "ContextHint",
337
+ "RenderingQuality",
338
+ "GradientQuality",
339
+ "PatternQuality",
340
+ "RuntimeInfoType",
341
+ "RuntimeCpuArch",
342
+ "RuntimeCpuFeatures",
343
+ ]
blend2d/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (4.17 kB). View file
 
blend2d/__pycache__/color.cpython-310.pyc ADDED
Binary file (8.09 kB). View file
 
blend2d/__pycache__/context.cpython-310.pyc ADDED
Binary file (46.5 kB). View file
 
blend2d/__pycache__/diagnostics.cpython-310.pyc ADDED
Binary file (6.73 kB). View file
 
blend2d/__pycache__/enums.cpython-310.pyc ADDED
Binary file (7.98 kB). View file
 
blend2d/__pycache__/ffi.cpython-310.pyc ADDED
Binary file (24 kB). View file
 
blend2d/__pycache__/font.cpython-310.pyc ADDED
Binary file (8.15 kB). View file
 
blend2d/__pycache__/geometry.cpython-310.pyc ADDED
Binary file (8.35 kB). View file
 
blend2d/__pycache__/image.cpython-310.pyc ADDED
Binary file (13.5 kB). View file
 
blend2d/__pycache__/license.cpython-310.pyc ADDED
Binary file (2.87 kB). View file
 
blend2d/__pycache__/matrix.cpython-310.pyc ADDED
Binary file (5.97 kB). View file
 
blend2d/__pycache__/path.cpython-310.pyc ADDED
Binary file (17.8 kB). View file
 
blend2d/__pycache__/shapgeo.cpython-310.pyc ADDED
Binary file (19.4 kB). View file
 
blend2d/__pycache__/shapgeo_downloader.cpython-310.pyc ADDED
Binary file (4.73 kB). View file
 
blend2d/__pycache__/shapgeo_io.cpython-310.pyc ADDED
Binary file (8.49 kB). View file
 
blend2d/__pycache__/shapgeo_proj.cpython-310.pyc ADDED
Binary file (6.42 kB). View file
 
blend2d/__pycache__/style.cpython-310.pyc ADDED
Binary file (7.41 kB). View file
 
blend2d/__pycache__/svg.cpython-310.pyc ADDED
Binary file (16.4 kB). View file
 
blend2d/__pycache__/video.cpython-310.pyc ADDED
Binary file (14.2 kB). View file
 
blend2d/_bin/blend2d_fx.lib ADDED
Binary file (7.22 kB). View file
 
blend2d/_bin/blend2d_geo.lib ADDED
Binary file (3.52 kB). View file
 
blend2d/_bin/blend2d_license.lib ADDED
Binary file (1.91 kB). View file
 
blend2d/_bin/blend2d_motion.lib ADDED
Binary file (3.54 kB). View file
 
blend2d/_bin/blend2d_perspective.lib ADDED
Binary file (2.24 kB). View file
 
blend2d/_bin/blend2d_video.lib ADDED
Binary file (6.63 kB). View file
 
blend2d/_bin/libblend2d.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:032b420c9360a7a735207cd91258b27ff1041553b63c028695c2c5266b1b0f57
3
+ size 2626560
blend2d/_bin/libblend2d.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff8935b2a8b28b17f87268c0c131a6118bf76d81f17733dc02449f8daa50a139
3
+ size 22254800
blend2d/_bin/libblend2d_fx.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b463e7dbefed6cee153c73de9df99c23f933d36b5b75c9b50ea7387a11f143de
3
+ size 263680
blend2d/_bin/libblend2d_fx.pdb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02dc6afeed6a2a66dd8c59d8b6d996269125027d92a3d1bbb9608f8d68879570
3
+ size 2179072
blend2d/_bin/libblend2d_fx.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:880923072fd29be23a5d9a861a8aaeeb402e60c44042e52e5ea4f10d19e79457
3
+ size 280744
blend2d/_bin/libblend2d_geo.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a712fb15f6d9b6ad6b92639a52eca852aff2e2e93a5ca06b58ffb3e30274915
3
+ size 232960
blend2d/_bin/libblend2d_geo.pdb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:847f5a8524710583c57702b09a2c25dd51166911f6a9bc28515792de32e14fd2
3
+ size 2367488
blend2d/_bin/libblend2d_geo.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dc040879f510da62a88ba22190ec7c5465a4e6d19b68227024f77779bb1e0669
3
+ size 278632
blend2d/_bin/libblend2d_license.dll ADDED
Binary file (22.5 kB). View file
 
blend2d/_bin/libblend2d_license.so ADDED
Binary file (8.3 kB). View file
 
blend2d/_bin/libblend2d_motion.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a2d336469f8afb6a2fa8fced6747dba0f8d969eb6fd337010d68ce01af27baf4
3
+ size 198656
blend2d/_bin/libblend2d_motion.pdb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b9a412c18ecd1a385f43fef6cf5cc900e0fcbc14f1bde22d465823f5c4d82ca9
3
+ size 2281472
blend2d/_bin/libblend2d_motion.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe128e202a83727182e5d006aed573cebc7b957859b0855c7a8fef3748f0a94e
3
+ size 246704
blend2d/_bin/libblend2d_perspective.dll ADDED
Binary file (39.4 kB). View file
 
blend2d/_bin/libblend2d_perspective.pdb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a4f9c4f44cba88ac0756df2f9cbb513e2a3ec89d16557314f816b43b0bc0cb16
3
+ size 925696
blend2d/_bin/libblend2d_perspective.so ADDED
Binary file (11.8 kB). View file
 
blend2d/_bin/libblend2d_video.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e34618c350a965062bab6db603921328e8671d4a7f006a9ac0d1a5fc66b669c
3
+ size 179712
blend2d/_bin/libblend2d_video.pdb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7f28c87b5171dde1ab40a29df17d28f41ff5c9218b2098eff5aeac9982929bc9
3
+ size 2129920
blend2d/_bin/libblend2d_video.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:668090817b4c23d2c35a78bad9d05f8509857ed5748c13561d70f23f6d8992d8
3
+ size 229824