agmon 0.1.1 → 0.1.3
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.
- package/.next/BUILD_ID +1 -0
- package/.next/app-path-routes-manifest.json +7 -0
- package/.next/build/chunks/[root-of-the-server]__05i36w1t4lzaf._.js +502 -0
- package/.next/build/chunks/[root-of-the-server]__05i36w1t4lzaf._.js.map +11 -0
- package/.next/build/chunks/[root-of-the-server]__1kki86fknkq7y._.js +190 -0
- package/.next/build/chunks/[root-of-the-server]__1kki86fknkq7y._.js.map +8 -0
- package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_1gfkiq9iz8yb8._.js +13 -0
- package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_1gfkiq9iz8yb8._.js.map +5 -0
- package/.next/build/chunks/[turbopack]_runtime.js +1056 -0
- package/.next/build/chunks/[turbopack]_runtime.js.map +11 -0
- package/.next/build/chunks/node_modules_20v-8wlfss9m1._.js +7314 -0
- package/.next/build/chunks/node_modules_20v-8wlfss9m1._.js.map +47 -0
- package/.next/build/chunks/pool_entry-[turbopack-node]_transforms_postcss_ts_0tp-k2vy8nj6i._.js +6 -0
- package/.next/build/chunks/pool_entry-[turbopack-node]_transforms_postcss_ts_0tp-k2vy8nj6i._.js.map +5 -0
- package/.next/build/package.json +1 -0
- package/.next/build-manifest.json +54 -0
- package/.next/export-marker.json +6 -0
- package/.next/fallback-build-manifest.json +15 -0
- package/.next/images-manifest.json +68 -0
- package/.next/next-minimal-server.js.nft.json +1 -0
- package/.next/next-server.js.nft.json +1 -0
- package/.next/package.json +1 -0
- package/.next/prerender-manifest.json +97 -0
- package/.next/required-server-files.js +366 -0
- package/.next/required-server-files.json +366 -0
- package/.next/routes-manifest.json +75 -0
- package/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_global-error/page/build-manifest.json +21 -0
- package/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
- package/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_global-error/page.js +10 -0
- package/.next/server/app/_global-error/page.js.map +5 -0
- package/.next/server/app/_global-error/page.js.nft.json +1 -0
- package/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_global-error.html +1 -0
- package/.next/server/app/_global-error.meta +30 -0
- package/.next/server/app/_global-error.rsc +18 -0
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +23 -0
- package/.next/server/app/_global-error.segments/_full.segment.rsc +18 -0
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +2 -0
- package/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_not-found/page/build-manifest.json +21 -0
- package/.next/server/app/_not-found/page/next-font-manifest.json +6 -0
- package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_not-found/page.js +12 -0
- package/.next/server/app/_not-found/page.js.map +5 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_not-found.html +1 -0
- package/.next/server/app/_not-found.meta +35 -0
- package/.next/server/app/_not-found.rsc +22 -0
- package/.next/server/app/_not-found.segments/_full.segment.rsc +22 -0
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +28 -0
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -0
- package/.next/server/app/api/traces/stream/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/traces/stream/route/build-manifest.json +12 -0
- package/.next/server/app/api/traces/stream/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/traces/stream/route.js +7 -0
- package/.next/server/app/api/traces/stream/route.js.map +5 -0
- package/.next/server/app/api/traces/stream/route.js.nft.json +1 -0
- package/.next/server/app/api/traces/stream/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/version/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/version/route/build-manifest.json +12 -0
- package/.next/server/app/api/version/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/version/route.js +7 -0
- package/.next/server/app/api/version/route.js.map +5 -0
- package/.next/server/app/api/version/route.js.nft.json +1 -0
- package/.next/server/app/api/version/route_client-reference-manifest.js +3 -0
- package/.next/server/app/index.html +1 -0
- package/.next/server/app/index.meta +29 -0
- package/.next/server/app/index.rsc +29 -0
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +34 -0
- package/.next/server/app/index.segments/_full.segment.rsc +29 -0
- package/.next/server/app/index.segments/_tree.segment.rsc +3 -0
- package/.next/server/app/page/app-paths-manifest.json +3 -0
- package/.next/server/app/page/build-manifest.json +21 -0
- package/.next/server/app/page/next-font-manifest.json +6 -0
- package/.next/server/app/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/page/server-reference-manifest.json +4 -0
- package/.next/server/app/page.js +13 -0
- package/.next/server/app/page.js.map +5 -0
- package/.next/server/app/page.js.nft.json +1 -0
- package/.next/server/app/page_client-reference-manifest.js +3 -0
- package/.next/server/app-paths-manifest.json +7 -0
- package/.next/server/chunks/[externals]__0bwf06g0pqv3h._.js +3 -0
- package/.next/server/chunks/[externals]__0bwf06g0pqv3h._.js.map +1 -0
- package/.next/server/chunks/[externals]__1p2j9_5g429uh._.js +3 -0
- package/.next/server/chunks/[externals]__1p2j9_5g429uh._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__04an4kw4xcc5l._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__04an4kw4xcc5l._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1s6v8mz-nanm-._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__1s6v8mz-nanm-._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__20xfs4y2ipcvv._.js +320 -0
- package/.next/server/chunks/[root-of-the-server]__20xfs4y2ipcvv._.js.map +1 -0
- package/.next/server/chunks/[turbopack]_runtime.js +937 -0
- package/.next/server/chunks/[turbopack]_runtime.js.map +10 -0
- package/.next/server/chunks/_next-internal_server_app_api_traces_stream_route_actions_07rmicxgds803.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_traces_stream_route_actions_07rmicxgds803.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_version_route_actions_0kbx30hro8e93.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_version_route_actions_0kbx30hro8e93.js.map +1 -0
- package/.next/server/chunks/ssr/1q96_modules_pixi_js_lib_rendering_renderers_canvas_CanvasRenderer_mjs_1xntzghggpb51._.js +3 -0
- package/.next/server/chunks/ssr/1q96_modules_pixi_js_lib_rendering_renderers_canvas_CanvasRenderer_mjs_1xntzghggpb51._.js.map +1 -0
- package/.next/server/chunks/ssr/1q96_modules_pixi_js_lib_rendering_renderers_gpu_WebGPURenderer_mjs_00tc9jrf-ft1_._.js +76 -0
- package/.next/server/chunks/ssr/1q96_modules_pixi_js_lib_rendering_renderers_gpu_WebGPURenderer_mjs_00tc9jrf-ft1_._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__08zgqq_38tv57._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__08zgqq_38tv57._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0aa2929udndo-._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0aa2929udndo-._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ayw3c9e93kvf._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ayw3c9e93kvf._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ojpb-dtuk3-q._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ojpb-dtuk3-q._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0py1t7q9ntzgc._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0py1t7q9ntzgc._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1cf6qt9agg_9-._.js +14 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1cf6qt9agg_9-._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1e1_fmeab1ca7._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1e1_fmeab1ca7._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1w2vu9hh0h02y._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1w2vu9hh0h02y._.js.map +1 -0
- package/.next/server/chunks/ssr/[turbopack]_runtime.js +937 -0
- package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +10 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-psc_d2.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-psc_d2.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yrisjoev.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yrisjoev.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1jew5ls7.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1jew5ls7.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_01xbj_9zg44kw._.js +33 -0
- package/.next/server/chunks/ssr/node_modules_01xbj_9zg44kw._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_0a548_llmwce7._.js +23 -0
- package/.next/server/chunks/ssr/node_modules_0a548_llmwce7._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_0gxlxpuufujz9._.js +33 -0
- package/.next/server/chunks/ssr/node_modules_0gxlxpuufujz9._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js +6 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_1hgv5i-pr1hza._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_1hgv5i-pr1hza._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j32_ibz4._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j32_ibz4._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9mbf-fh.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9mbf-fh.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892nagajq.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892nagajq.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0xky89qu.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0xky89qu.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0aymk_x8-bu4q.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0aymk_x8-bu4q.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19--w_z4y02i7.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19--w_z4y02i7.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1qjycfedgh109.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1qjycfedgh109.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0hcyh9uzlz7ci._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0hcyh9uzlz7ci._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0k3f3soanqdoq._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0k3f3soanqdoq._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0ovgsftn-uvbz._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0ovgsftn-uvbz._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0xa24fqr5c5qi._.js +5 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0xa24fqr5c5qi._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0zrftay3kjup7._.js +5 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0zrftay3kjup7._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_1z4lgkg_w-7fr._.js +208 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_1z4lgkg_w-7fr._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_1zjkoj2kc4hm-._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_1zjkoj2kc4hm-._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_environment-browser_browserAll_mjs_0xb_t3dj4ad1f._.js +16 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_environment-browser_browserAll_mjs_0xb_t3dj4ad1f._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_filters_Filter_mjs_0luksfw8ekifi._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_filters_Filter_mjs_0luksfw8ekifi._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_filters_init_mjs_1o5fmm_m60v_s._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_filters_init_mjs_1o5fmm_m60v_s._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_1fkio2phhfvow._.js +196 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_1fkio2phhfvow._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_1n1q7aum4i7zo._.js +196 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_1n1q7aum4i7zo._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_renderers_10vpvx1o7svnk._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_renderers_10vpvx1o7svnk._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_renderers_gl_WebGLRenderer_mjs_1hlux44jh7dk-._.js +153 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_renderers_gl_WebGLRenderer_mjs_1hlux44jh7dk-._.js.map +1 -0
- package/.next/server/chunks/ssr/src_app_page_1vqfk0-j72fp6.js +3 -0
- package/.next/server/chunks/ssr/src_app_page_1vqfk0-j72fp6.js.map +1 -0
- package/.next/server/functions-config-manifest.json +4 -0
- package/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/.next/server/middleware-build-manifest.js +54 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/next-font-manifest.js +1 -0
- package/.next/server/next-font-manifest.json +6 -0
- package/.next/server/pages/404.html +1 -0
- package/.next/server/pages/500.html +1 -0
- package/.next/server/pages-manifest.json +4 -0
- package/.next/server/prefetch-hints.json +34 -0
- package/.next/server/preview-props.json +5 -0
- package/.next/server/server-reference-manifest.js +1 -0
- package/.next/server/server-reference-manifest.json +5 -0
- package/.next/static/chunks/0_9x2udu0iodw.js +1 -0
- package/.next/static/chunks/0cz1d0mv5g_q7.js +1 -0
- package/.next/static/chunks/0umf92h1sb77c.js +1 -0
- package/.next/static/chunks/10om7oix6wjze.js +1 -0
- package/.next/static/chunks/1780fh11o7pze.js +1 -0
- package/.next/static/chunks/1cldmiyw3ya18.js +21 -0
- package/.next/static/chunks/1unuqfq-vfqtp.js +1 -0
- package/.next/static/chunks/2-vsu_pt58kse.js +3 -0
- package/.next/static/chunks/2drjv1ti9t4pg.js +1 -0
- package/.next/static/chunks/2hgsvrrwu57--.css +1 -0
- package/.next/static/chunks/2ogvir8krwwhf.js +1 -0
- package/.next/static/chunks/2tc54fmsk8v8q.js +1 -0
- package/.next/static/chunks/304ue7hvto0o0.js +206 -0
- package/.next/static/chunks/31gve42sn75--.js +1 -0
- package/.next/static/chunks/32kizm_7q94vd.js +194 -0
- package/.next/static/chunks/33bap0u4zwgab.js +74 -0
- package/.next/static/chunks/3c4xol65z2da2.js +22 -0
- package/.next/static/chunks/3cfn99dbrcvvp.js +31 -0
- package/.next/static/chunks/3d6xc1eemxy82.js +1 -0
- package/.next/static/chunks/3ycr8gfnsg-xv.js +151 -0
- package/.next/static/chunks/3ytt3vrdhke9u.js +14 -0
- package/.next/static/chunks/turbopack-3-ry682tkyiqk.js +1 -0
- package/.next/static/cy2F4S28h_-YWqCOuE_ul/_buildManifest.js +11 -0
- package/.next/static/cy2F4S28h_-YWqCOuE_ul/_clientMiddlewareManifest.js +1 -0
- package/.next/static/cy2F4S28h_-YWqCOuE_ul/_ssgManifest.js +1 -0
- package/.next/trace +1 -0
- package/.next/trace-build +1 -0
- package/.next/types/cache-life.d.ts +114 -0
- package/.next/types/root-params.d.ts +3 -0
- package/.next/types/routes.d.ts +74 -0
- package/.next/types/validator.ts +17 -0
- package/bin/cli.js +24 -6
- package/package.json +6 -6
- package/src/app/api/traces/stream/route.js +2 -2
- package/src/app/layout.js +1 -1
- package/src/app/page.js +6 -19
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../node_modules/pixi.js/src/maths/misc/getOrientationOfPoints.ts","../../../../node_modules/pixi.js/src/maths/misc/squaredDistanceToLineSegment.ts","../../../../node_modules/pixi.js/src/maths/shapes/RoundedRectangle.ts","../../../../node_modules/pixi.js/src/maths/shapes/Polygon.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/geometry/utils/buildUvs.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/geometry/utils/transformVertices.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/buildCommands/buildCircle.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/BatchableGraphics.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/utils/getMaxMiterRatio.ts","../../../../node_modules/pixi.js/src/scene/graphics/canvas/CanvasGraphicsPipe.ts","../../../../node_modules/pixi.js/src/scene/graphics/canvas/CanvasGraphicsContextSystem.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/Graphics.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/utils/convertFillInputToFillStyle.ts","../../../../node_modules/pixi.js/src/scene/graphics/init.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/GraphicsPipe.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/GraphicsContext.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/const.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/buildCommands/buildLine.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/fill/FillGradient.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/fill/FillPattern.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/svg/utils/fillOperations.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/buildCommands/buildArc.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/svg/utils/extractSvgUrlId.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/path/roundShape.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/svg/parseSVGFloatAttribute.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/svg/utils/pathOperations.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/buildCommands/buildArcToSvg.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/buildCommands/buildArcTo.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/buildCommands/buildAdaptiveQuadratic.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/buildCommands/buildAdaptiveBezier.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/svg/parseSVGDefinitions.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/svg/parseSVGStyle.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/svg/SVGParser.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/GraphicsContextSystem.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/path/GraphicsPath.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/path/ShapePath.ts","../../../../node_modules/parse-svg-path/dist/index.mjs","../../../../node_modules/pixi.js/src/maths/shapes/Ellipse.ts","../../../../node_modules/pixi.js/src/maths/shapes/Circle.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/svg/parseSVGPath.ts","../../../../node_modules/earcut/src/earcut.js","../../../../node_modules/pixi.js/src/scene/graphics/shared/buildCommands/buildTriangle.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/buildCommands/buildRectangle.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/buildCommands/buildPixelLine.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/utils/triangulateWithHoles.ts","../../../../node_modules/pixi.js/src/utils/utils.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/buildCommands/buildPolygon.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/utils/generateTextureFillMatrix.ts","../../../../node_modules/pixi.js/src/scene/graphics/shared/utils/buildContextBatches.ts"],"sourcesContent":["/**\n * Determines the winding order of a polygon's points.\n * @param points - Flat array of point coordinates [x1, y1, x2, y2, ...]\n * @returns 1 for clockwise, -1 for counter-clockwise winding\n * @category maths\n * @internal\n */\nexport function getOrientationOfPoints(points: number[]): number\n{\n const m = points.length;\n\n if (m < 6)\n {\n return 1;\n }\n\n let area = 0;\n\n for (let i = 0, x1 = points[m - 2], y1 = points[m - 1]; i < m; i += 2)\n {\n const x2 = points[i];\n const y2 = points[i + 1];\n\n area += (x2 - x1) * (y2 + y1);\n\n x1 = x2;\n y1 = y2;\n }\n\n if (area < 0)\n {\n return -1;\n }\n\n return 1;\n}\n","/**\n * Calculates the squared distance from a point to a line segment defined by two endpoints.\n * @param x - x coordinate of the point\n * @param y - y coordinate of the point\n * @param x1 - x coordinate of the first endpoint of the line segment\n * @param y1 - y coordinate of the first endpoint of the line segment\n * @param x2 - x coordinate of the second endpoint of the line segment\n * @param y2 - y coordinate of the second endpoint of the line segment\n * @returns The squared distance from the point to the line segment\n * @category maths\n * @internal\n */\nexport function squaredDistanceToLineSegment(\n x: number, y: number,\n x1: number, y1: number,\n x2: number, y2: number\n): number\n{\n const a = x - x1;\n const b = y - y1;\n const c = x2 - x1;\n const d = y2 - y1;\n\n const dot = (a * c) + (b * d);\n const lenSq = (c * c) + (d * d);\n let param = -1;\n\n if (lenSq !== 0)\n {\n param = dot / lenSq;\n }\n\n let xx; let\n yy;\n\n if (param < 0)\n {\n xx = x1;\n yy = y1;\n }\n else if (param > 1)\n {\n xx = x2;\n yy = y2;\n }\n\n else\n {\n xx = x1 + (param * c);\n yy = y1 + (param * d);\n }\n\n const dx = x - xx;\n const dy = y - yy;\n\n return (dx * dx) + (dy * dy);\n}\n","import { type SHAPE_PRIMITIVE } from '../misc/const';\nimport { Rectangle } from './Rectangle';\n\nimport type { ShapePrimitive } from './ShapePrimitive';\n\nconst isCornerWithinStroke = (\n pX: number,\n pY: number,\n cornerX: number,\n cornerY: number,\n radius: number,\n strokeWidthInner: number,\n strokeWidthOuter: number\n) =>\n{\n const dx = pX - cornerX;\n const dy = pY - cornerY;\n const distance = Math.sqrt((dx * dx) + (dy * dy));\n\n return distance >= radius - strokeWidthInner && distance <= radius + strokeWidthOuter;\n};\n\n/**\n * The `RoundedRectangle` object represents a rectangle with rounded corners.\n * Defined by position, dimensions and corner radius.\n * @example\n * ```ts\n * // Basic rectangle creation\n * const rect = new RoundedRectangle(100, 100, 200, 150, 20);\n * // Use as container hit area\n * container.hitArea = new RoundedRectangle(0, 0, 100, 100, 10);\n * // Check point containment\n * const isInside = rect.contains(mouseX, mouseY);\n * // Get bounds\n * const bounds = rect.getBounds();\n * ```\n * @remarks\n * - Position defined by top-left corner\n * - Radius clamped to half smallest dimension\n * - Common in UI elements\n * @see {@link Rectangle} For non-rounded rectangles\n * @category maths\n * @standard\n */\nexport class RoundedRectangle implements ShapePrimitive\n{\n /**\n * The X coordinate of the upper-left corner of the rounded rectangle\n * @example\n * ```ts\n * // Basic x position\n * const rect = new RoundedRectangle();\n * rect.x = 100;\n * ```\n * @default 0\n */\n public x: number;\n\n /**\n * The Y coordinate of the upper-left corner of the rounded rectangle\n * @example\n * ```ts\n * // Basic y position\n * const rect = new RoundedRectangle();\n * rect.y = 100;\n * ```\n * @default 0\n */\n public y: number;\n\n /**\n * The overall width of this rounded rectangle\n * @example\n * ```ts\n * // Basic width setting\n * const rect = new RoundedRectangle();\n * rect.width = 200; // Total width will be 200\n * ```\n * @default 0\n */\n public width: number;\n\n /**\n * The overall height of this rounded rectangle\n * @example\n * ```ts\n * // Basic height setting\n * const rect = new RoundedRectangle();\n * rect.height = 150; // Total height will be 150\n * ```\n * @default 0\n */\n public height: number;\n\n /**\n * Controls the radius of the rounded corners\n * @example\n * ```ts\n * // Basic radius setting\n * const rect = new RoundedRectangle(0, 0, 200, 150);\n * rect.radius = 20;\n *\n * // Clamp to maximum safe radius\n * rect.radius = Math.min(rect.width, rect.height) / 2;\n *\n * // Create pill shape\n * rect.radius = rect.height / 2;\n * ```\n * @remarks\n * - Automatically clamped to half of smallest dimension\n * - Common values: 0-20 for UI elements\n * - Higher values create more rounded corners\n * @default 20\n */\n public radius: number;\n\n /**\n * The type of the object, mainly used to avoid `instanceof` checks\n * @example\n * ```ts\n * // Check shape type\n * const shape = new RoundedRectangle(0, 0, 100, 100, 20);\n * console.log(shape.type); // 'roundedRectangle'\n *\n * // Use in type guards\n * if (shape.type === 'roundedRectangle') {\n * console.log(shape.radius);\n * }\n * ```\n * @readonly\n * @default 'roundedRectangle'\n * @see {@link SHAPE_PRIMITIVE} For all shape types\n */\n public readonly type: SHAPE_PRIMITIVE = 'roundedRectangle';\n\n /**\n * @param x - The X coordinate of the upper-left corner of the rounded rectangle\n * @param y - The Y coordinate of the upper-left corner of the rounded rectangle\n * @param width - The overall width of this rounded rectangle\n * @param height - The overall height of this rounded rectangle\n * @param radius - Controls the radius of the rounded corners\n */\n constructor(x = 0, y = 0, width = 0, height = 0, radius = 20)\n {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.radius = radius;\n }\n\n /**\n * Returns the framing rectangle of the rounded rectangle as a Rectangle object\n * @example\n * ```ts\n * // Basic bounds calculation\n * const rect = new RoundedRectangle(100, 100, 200, 150, 20);\n * const bounds = rect.getBounds();\n * // bounds: x=100, y=100, width=200, height=150\n *\n * // Reuse existing rectangle\n * const out = new Rectangle();\n * rect.getBounds(out);\n * ```\n * @remarks\n * - Rectangle matches outer dimensions\n * - Ignores corner radius\n * @param out - Optional rectangle to store the result\n * @returns The framing rectangle\n * @see {@link Rectangle} For rectangle properties\n * @see {@link RoundedRectangle.contains} For checking if a point is inside\n */\n public getBounds(out?: Rectangle): Rectangle\n {\n out ||= new Rectangle();\n\n out.x = this.x;\n out.y = this.y;\n out.width = this.width;\n out.height = this.height;\n\n return out;\n }\n\n /**\n * Creates a clone of this Rounded Rectangle.\n * @example\n * ```ts\n * // Basic cloning\n * const original = new RoundedRectangle(100, 100, 200, 150, 20);\n * const copy = original.clone();\n *\n * // Clone and modify\n * const modified = original.clone();\n * modified.radius = 30;\n * modified.width *= 2;\n *\n * // Verify independence\n * console.log(original.radius); // 20\n * console.log(modified.radius); // 30\n * ```\n * @returns A copy of the rounded rectangle\n * @see {@link RoundedRectangle.copyFrom} For copying into existing rectangle\n * @see {@link RoundedRectangle.copyTo} For copying to another rectangle\n */\n public clone(): RoundedRectangle\n {\n return new RoundedRectangle(this.x, this.y, this.width, this.height, this.radius);\n }\n\n /**\n * Copies another rectangle to this one.\n * @example\n * ```ts\n * // Basic copying\n * const source = new RoundedRectangle(100, 100, 200, 150, 20);\n * const target = new RoundedRectangle();\n * target.copyFrom(source);\n *\n * // Chain with other operations\n * const rect = new RoundedRectangle()\n * .copyFrom(source)\n * .getBounds(rect);\n * ```\n * @param rectangle - The rectangle to copy from\n * @returns Returns itself\n * @see {@link RoundedRectangle.copyTo} For copying to another rectangle\n * @see {@link RoundedRectangle.clone} For creating new rectangle copy\n */\n public copyFrom(rectangle: RoundedRectangle): this\n {\n this.x = rectangle.x;\n this.y = rectangle.y;\n this.width = rectangle.width;\n this.height = rectangle.height;\n this.radius = rectangle.radius;\n\n return this;\n }\n\n /**\n * Copies this rectangle to another one.\n * @example\n * ```ts\n * // Basic copying\n * const source = new RoundedRectangle(100, 100, 200, 150, 20);\n * const target = new RoundedRectangle();\n * source.copyTo(target);\n *\n * // Chain with other operations\n * const result = source\n * .copyTo(new RoundedRectangle())\n * .getBounds();\n * ```\n * @param rectangle - The rectangle to copy to\n * @returns Returns given parameter\n * @see {@link RoundedRectangle.copyFrom} For copying from another rectangle\n * @see {@link RoundedRectangle.clone} For creating new rectangle copy\n */\n public copyTo(rectangle: RoundedRectangle): RoundedRectangle\n {\n rectangle.copyFrom(this);\n\n return rectangle;\n }\n\n /**\n * Checks whether the x and y coordinates given are contained within this Rounded Rectangle\n * @example\n * ```ts\n * // Basic containment check\n * const rect = new RoundedRectangle(100, 100, 200, 150, 20);\n * const isInside = rect.contains(150, 125); // true\n * // Check corner radius\n * const corner = rect.contains(100, 100); // false if within corner curve\n * ```\n * @remarks\n * - Returns false if width/height is 0 or negative\n * - Handles rounded corners with radius check\n * @param x - The X coordinate of the point to test\n * @param y - The Y coordinate of the point to test\n * @returns Whether the x/y coordinates are within this Rounded Rectangle\n * @see {@link RoundedRectangle.strokeContains} For checking stroke intersection\n * @see {@link RoundedRectangle.getBounds} For getting containing rectangle\n */\n public contains(x: number, y: number): boolean\n {\n if (this.width <= 0 || this.height <= 0)\n {\n return false;\n }\n if (x >= this.x && x <= this.x + this.width)\n {\n if (y >= this.y && y <= this.y + this.height)\n {\n const radius = Math.max(0, Math.min(this.radius, Math.min(this.width, this.height) / 2));\n\n if ((y >= this.y + radius && y <= this.y + this.height - radius)\n || (x >= this.x + radius && x <= this.x + this.width - radius))\n {\n return true;\n }\n let dx = x - (this.x + radius);\n let dy = y - (this.y + radius);\n const radius2 = radius * radius;\n\n if ((dx * dx) + (dy * dy) <= radius2)\n {\n return true;\n }\n dx = x - (this.x + this.width - radius);\n if ((dx * dx) + (dy * dy) <= radius2)\n {\n return true;\n }\n dy = y - (this.y + this.height - radius);\n if ((dx * dx) + (dy * dy) <= radius2)\n {\n return true;\n }\n dx = x - (this.x + radius);\n if ((dx * dx) + (dy * dy) <= radius2)\n {\n return true;\n }\n }\n }\n\n return false;\n }\n\n /**\n * Checks whether the x and y coordinates given are contained within this rectangle including the stroke.\n * @example\n * ```ts\n * // Basic stroke check\n * const rect = new RoundedRectangle(100, 100, 200, 150, 20);\n * const isOnStroke = rect.strokeContains(150, 100, 4); // 4px line width\n *\n * // Check with different alignments\n * const innerStroke = rect.strokeContains(150, 100, 4, 1); // Inside\n * const centerStroke = rect.strokeContains(150, 100, 4, 0.5); // Centered\n * const outerStroke = rect.strokeContains(150, 100, 4, 0); // Outside\n * ```\n * @param pX - The X coordinate of the point to test\n * @param pY - The Y coordinate of the point to test\n * @param strokeWidth - The width of the line to check\n * @param alignment - The alignment of the stroke (1 = inner, 0.5 = centered, 0 = outer)\n * @returns Whether the x/y coordinates are within this rectangle's stroke\n * @see {@link RoundedRectangle.contains} For checking fill containment\n * @see {@link RoundedRectangle.getBounds} For getting stroke bounds\n */\n public strokeContains(pX: number, pY: number, strokeWidth: number, alignment: number = 0.5): boolean\n {\n const { x, y, width, height, radius } = this;\n\n const strokeWidthOuter = strokeWidth * (1 - alignment);\n const strokeWidthInner = strokeWidth - strokeWidthOuter;\n\n const innerX = x + radius;\n const innerY = y + radius;\n const innerWidth = width - (radius * 2);\n const innerHeight = height - (radius * 2);\n const rightBound = x + width;\n const bottomBound = y + height;\n\n // Check if point is within the vertical edges (excluding corners)\n if (((pX >= x - strokeWidthOuter && pX <= x + strokeWidthInner)\n || (pX >= rightBound - strokeWidthInner && pX <= rightBound + strokeWidthOuter))\n && pY >= innerY && pY <= innerY + innerHeight)\n {\n return true;\n }\n\n // Check if point is within the horizontal edges (excluding corners)\n if (((pY >= y - strokeWidthOuter && pY <= y + strokeWidthInner)\n || (pY >= bottomBound - strokeWidthInner && pY <= bottomBound + strokeWidthOuter))\n && pX >= innerX && pX <= innerX + innerWidth)\n {\n return true;\n }\n\n // Top-left, top-right, bottom-right, bottom-left corners\n return (\n // Top-left\n (pX < innerX && pY < innerY\n && isCornerWithinStroke(pX, pY, innerX, innerY,\n radius, strokeWidthInner, strokeWidthOuter))\n // top-right\n || (pX > rightBound - radius && pY < innerY\n && isCornerWithinStroke(pX, pY, rightBound - radius, innerY,\n radius, strokeWidthInner, strokeWidthOuter))\n // bottom-right\n || (pX > rightBound - radius && pY > bottomBound - radius\n && isCornerWithinStroke(pX, pY, rightBound - radius, bottomBound - radius,\n radius, strokeWidthInner, strokeWidthOuter))\n // bottom-left\n || (pX < innerX && pY > bottomBound - radius\n && isCornerWithinStroke(pX, pY, innerX, bottomBound - radius,\n radius, strokeWidthInner, strokeWidthOuter)));\n }\n\n // #if _DEBUG\n public toString(): string\n {\n return `[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}`\n + `width=${this.width} height=${this.height} radius=${this.radius}]`;\n }\n // #endif\n}\n","import { deprecation } from '../../utils/logging/deprecation';\nimport { getOrientationOfPoints } from '../misc/getOrientationOfPoints';\nimport { squaredDistanceToLineSegment } from '../misc/squaredDistanceToLineSegment';\nimport { Rectangle } from './Rectangle';\n\nimport type { SHAPE_PRIMITIVE } from '../misc/const';\nimport type { PointData } from '../point/PointData';\nimport type { ShapePrimitive } from './ShapePrimitive';\n\nlet tempRect: Rectangle;\nlet tempRect2: Rectangle;\n\n/**\n * A class to define a shape via user defined coordinates.\n * Used for creating complex shapes and hit areas with custom points.\n * @example\n * ```ts\n * // Create polygon from array of points\n * const polygon1 = new Polygon([\n * new Point(0, 0),\n * new Point(0, 100),\n * new Point(100, 100)\n * ]);\n *\n * // Create from array of coordinates\n * const polygon2 = new Polygon([0, 0, 0, 100, 100, 100]);\n *\n * // Create from sequence of points\n * const polygon3 = new Polygon(\n * new Point(0, 0),\n * new Point(0, 100),\n * new Point(100, 100)\n * );\n *\n * // Create from sequence of coordinates\n * const polygon4 = new Polygon(0, 0, 0, 100, 100, 100);\n *\n * // Use as container hit area\n * container.hitArea = new Polygon([0, 0, 100, 0, 50, 100]);\n * ```\n * @see {@link Point} For point objects used in construction\n * @category maths\n * @standard\n */\nexport class Polygon implements ShapePrimitive\n{\n /**\n * An array of the points of this polygon stored as a flat array of numbers.\n * @example\n * ```ts\n * // Access points directly\n * const polygon = new Polygon([0, 0, 100, 0, 50, 100]);\n * console.log(polygon.points); // [0, 0, 100, 0, 50, 100]\n *\n * // Modify points\n * polygon.points[0] = 10; // Move first x coordinate\n * polygon.points[1] = 10; // Move first y coordinate\n * ```\n * @remarks\n * - Stored as [x1, y1, x2, y2, ...]\n * - Each pair represents a vertex\n * - Length is always even\n * - Can be modified directly\n */\n public points: number[];\n\n /**\n * Indicates if the polygon path is closed.\n * @example\n * ```ts\n * // Create open polygon\n * const polygon = new Polygon([0, 0, 100, 0, 50, 100]);\n * polygon.closePath = false;\n *\n * // Check path state\n * if (polygon.closePath) {\n * // Last point connects to first\n * }\n * ```\n * @remarks\n * - True by default\n * - False after moveTo\n * - True after closePath\n * @default true\n */\n public closePath: boolean;\n\n /**\n * The type of the object, mainly used to avoid `instanceof` checks\n * @example\n * ```ts\n * // Check shape type\n * const shape = new Polygon([0, 0, 100, 0, 50, 100]);\n * console.log(shape.type); // 'polygon'\n *\n * // Use in type guards\n * if (shape.type === 'polygon') {\n * // TypeScript knows this is a Polygon\n * console.log(shape.points.length);\n * }\n * ```\n * @readonly\n * @default 'polygon'\n * @see {@link SHAPE_PRIMITIVE} For all shape types\n */\n public readonly type: SHAPE_PRIMITIVE = 'polygon';\n\n constructor(points: PointData[] | number[]);\n constructor(...points: PointData[] | number[]);\n /**\n * @param points - This can be an array of Points\n * that form the polygon, a flat array of numbers that will be interpreted as [x,y, x,y, ...], or\n * the arguments passed can be all the points of the polygon e.g.\n * `new Polygon(new Point(), new Point(), ...)`, or the arguments passed can be flat\n * x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are Numbers.\n */\n constructor(...points: (PointData[] | number[])[] | PointData[] | number[])\n {\n let flat = Array.isArray(points[0]) ? points[0] : points;\n\n // if this is an array of points, convert it to a flat array of numbers\n if (typeof flat[0] !== 'number')\n {\n const p: number[] = [];\n\n for (let i = 0, il = flat.length; i < il; i++)\n {\n p.push((flat[i] as PointData).x, (flat[i] as PointData).y);\n }\n\n flat = p;\n }\n\n this.points = flat as number[];\n\n this.closePath = true;\n }\n\n /**\n * Determines whether the polygon's points are arranged in a clockwise direction.\n * Uses the shoelace formula (surveyor's formula) to calculate the signed area.\n *\n * A positive area indicates clockwise winding, while negative indicates counter-clockwise.\n *\n * The formula sums up the cross products of adjacent vertices:\n * For each pair of adjacent points (x1,y1) and (x2,y2), we calculate (x1*y2 - x2*y1)\n * The final sum divided by 2 gives the signed area - positive for clockwise.\n * @example\n * ```ts\n * // Check polygon winding\n * const polygon = new Polygon([0, 0, 100, 0, 50, 100]);\n * console.log(polygon.isClockwise()); // Check direction\n *\n * // Use in path construction\n * const hole = new Polygon([25, 25, 75, 25, 75, 75, 25, 75]);\n * if (hole.isClockwise() === shape.isClockwise()) {\n * hole.points.reverse(); // Reverse for proper hole winding\n * }\n * ```\n * @returns `true` if the polygon's points are arranged clockwise, `false` if counter-clockwise\n */\n public isClockwise(): boolean\n {\n let area = 0;\n const points = this.points;\n const length = points.length;\n\n for (let i = 0; i < length; i += 2)\n {\n const x1 = points[i];\n const y1 = points[i + 1];\n const x2 = points[(i + 2) % length];\n const y2 = points[(i + 3) % length];\n\n area += (x2 - x1) * (y2 + y1);\n }\n\n return area < 0;\n }\n\n /**\n * Checks if this polygon completely contains another polygon.\n * Used for detecting holes in shapes, like when parsing SVG paths.\n * @example\n * ```ts\n * // Basic containment check\n * const outerSquare = new Polygon([0,0, 100,0, 100,100, 0,100]); // A square\n * const innerSquare = new Polygon([25,25, 75,25, 75,75, 25,75]); // A smaller square inside\n *\n * outerSquare.containsPolygon(innerSquare); // Returns true\n * innerSquare.containsPolygon(outerSquare); // Returns false\n * ```\n * @remarks\n * - Uses bounds check for quick rejection\n * - Tests all points for containment\n * @param polygon - The polygon to test for containment\n * @returns True if this polygon completely contains the other polygon\n * @see {@link Polygon.contains} For single point testing\n * @see {@link Polygon.getBounds} For bounds calculation\n */\n public containsPolygon(polygon: Polygon): boolean\n {\n // Quick early-out: bounds check\n const thisBounds = this.getBounds(tempRect);\n const otherBounds = polygon.getBounds(tempRect2);\n\n if (!thisBounds.containsRect(otherBounds))\n {\n return false; // If bounds aren't contained, the polygon cannot be a hole\n }\n\n // Full point containment check\n const points = polygon.points;\n\n for (let i = 0; i < points.length; i += 2)\n {\n const x = points[i];\n const y = points[i + 1];\n\n // Combine bounds and polygon checks for efficiency\n if (!this.contains(x, y))\n {\n return false;\n }\n }\n\n return true; // All points are contained within bounds and polygon\n }\n\n /**\n * Creates a clone of this polygon.\n * @example\n * ```ts\n * // Basic cloning\n * const original = new Polygon([0, 0, 100, 0, 50, 100]);\n * const copy = original.clone();\n *\n * // Clone and modify\n * const modified = original.clone();\n * modified.points[0] = 10; // Modify first x coordinate\n * ```\n * @returns A copy of the polygon\n * @see {@link Polygon.copyFrom} For copying into existing polygon\n * @see {@link Polygon.copyTo} For copying to another polygon\n */\n public clone(): Polygon\n {\n const points = this.points.slice();\n const polygon = new Polygon(points);\n\n polygon.closePath = this.closePath;\n\n return polygon;\n }\n\n /**\n * Checks whether the x and y coordinates passed to this function are contained within this polygon.\n * Uses raycasting algorithm for point-in-polygon testing.\n * @example\n * ```ts\n * // Basic containment check\n * const polygon = new Polygon([0, 0, 100, 0, 50, 100]);\n * const isInside = polygon.contains(25, 25); // true\n * ```\n * @param x - The X coordinate of the point to test\n * @param y - The Y coordinate of the point to test\n * @returns Whether the x/y coordinates are within this polygon\n * @see {@link Polygon.strokeContains} For checking stroke intersection\n * @see {@link Polygon.containsPolygon} For polygon-in-polygon testing\n */\n public contains(x: number, y: number): boolean\n {\n let inside = false;\n\n // use some raycasting to test hits\n // https://github.com/substack/point-in-polygon/blob/master/index.js\n const length = this.points.length / 2;\n\n for (let i = 0, j = length - 1; i < length; j = i++)\n {\n const xi = this.points[i * 2];\n const yi = this.points[(i * 2) + 1];\n const xj = this.points[j * 2];\n const yj = this.points[(j * 2) + 1];\n const intersect = ((yi > y) !== (yj > y)) && (x < ((xj - xi) * ((y - yi) / (yj - yi))) + xi);\n\n if (intersect)\n {\n inside = !inside;\n }\n }\n\n return inside;\n }\n\n /**\n * Checks whether the x and y coordinates given are contained within this polygon including the stroke.\n * @example\n * ```ts\n * // Basic stroke check\n * const polygon = new Polygon([0, 0, 100, 0, 50, 100]);\n * const isOnStroke = polygon.strokeContains(25, 25, 4); // 4px line width\n *\n * // Check with different alignments\n * const innerStroke = polygon.strokeContains(25, 25, 4, 1); // Inside\n * const centerStroke = polygon.strokeContains(25, 25, 4, 0.5); // Centered\n * const outerStroke = polygon.strokeContains(25, 25, 4, 0); // Outside\n * ```\n * @param x - The X coordinate of the point to test\n * @param y - The Y coordinate of the point to test\n * @param strokeWidth - The width of the line to check\n * @param alignment - The alignment of the stroke (1 = inner, 0.5 = centered, 0 = outer)\n * @returns Whether the x/y coordinates are within this polygon's stroke\n * @see {@link Polygon.contains} For checking fill containment\n * @see {@link Polygon.getBounds} For getting stroke bounds\n */\n public strokeContains(x: number, y: number, strokeWidth: number, alignment = 0.5): boolean\n {\n const { points } = this;\n\n // the stroke is built with the alignment flipped by the winding order, so the hit\n // area has to flip with it to stay on the same side of the edge as the drawn line\n const alignedByWinding = alignment === 0.5\n ? alignment\n : ((alignment - 0.5) * getOrientationOfPoints(points)) + 0.5;\n\n const outerWidth = strokeWidth * alignedByWinding;\n const innerWidth = strokeWidth - outerWidth;\n const outerWidthSquared = outerWidth * outerWidth;\n const innerWidthSquared = innerWidth * innerWidth;\n\n const iterationLength = points.length - (this.closePath ? 0 : 2);\n\n for (let i = 0; i < iterationLength; i += 2)\n {\n const x1 = points[i];\n const y1 = points[i + 1];\n const x2 = points[(i + 2) % points.length];\n const y2 = points[(i + 3) % points.length];\n\n const distanceSquared = squaredDistanceToLineSegment(x, y, x1, y1, x2, y2);\n\n const sign = Math.sign(((x2 - x1) * (y - y1)) - ((y2 - y1) * (x - x1)));\n\n if (distanceSquared <= (sign < 0 ? outerWidthSquared : innerWidthSquared))\n {\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Returns the framing rectangle of the polygon as a Rectangle object.\n * @example\n * ```ts\n * // Basic bounds calculation\n * const polygon = new Polygon([0, 0, 100, 0, 50, 100]);\n * const bounds = polygon.getBounds();\n * // bounds: x=0, y=0, width=100, height=100\n *\n * // Reuse existing rectangle\n * const rect = new Rectangle();\n * polygon.getBounds(rect);\n * ```\n * @param out - Optional rectangle to store the result\n * @returns The framing rectangle\n * @see {@link Rectangle} For rectangle properties\n * @see {@link Polygon.contains} For checking if a point is inside\n */\n public getBounds(out?: Rectangle): Rectangle\n {\n out ||= new Rectangle();\n\n const points = this.points;\n\n let minX = Infinity;\n let maxX = -Infinity;\n\n let minY = Infinity;\n let maxY = -Infinity;\n\n for (let i = 0, n = points.length; i < n; i += 2)\n {\n const x = points[i];\n const y = points[i + 1];\n\n minX = x < minX ? x : minX;\n maxX = x > maxX ? x : maxX;\n\n minY = y < minY ? y : minY;\n maxY = y > maxY ? y : maxY;\n }\n\n out.x = minX;\n out.width = maxX - minX;\n\n out.y = minY;\n out.height = maxY - minY;\n\n return out;\n }\n\n /**\n * Copies another polygon to this one.\n * @example\n * ```ts\n * // Basic copying\n * const source = new Polygon([0, 0, 100, 0, 50, 100]);\n * const target = new Polygon();\n * target.copyFrom(source);\n * ```\n * @param polygon - The polygon to copy from\n * @returns Returns itself\n * @see {@link Polygon.copyTo} For copying to another polygon\n * @see {@link Polygon.clone} For creating new polygon copy\n */\n public copyFrom(polygon: Polygon): this\n {\n this.points = polygon.points.slice();\n this.closePath = polygon.closePath;\n\n return this;\n }\n\n /**\n * Copies this polygon to another one.\n * @example\n * ```ts\n * // Basic copying\n * const source = new Polygon([0, 0, 100, 0, 50, 100]);\n * const target = new Polygon();\n * source.copyTo(target);\n * ```\n * @param polygon - The polygon to copy to\n * @returns Returns given parameter\n * @see {@link Polygon.copyFrom} For copying from another polygon\n * @see {@link Polygon.clone} For creating new polygon copy\n */\n public copyTo(polygon: Polygon): Polygon\n {\n polygon.copyFrom(this);\n\n return polygon;\n }\n\n // #if _DEBUG\n public toString(): string\n {\n return `[pixi.js/math:Polygon`\n + `closeStroke=${this.closePath}`\n + `points=${this.points.reduce((pointsDesc, currentPoint) => `${pointsDesc}, ${currentPoint}`, '')}]`;\n }\n // #endif\n\n /**\n * Get the last X coordinate of the polygon.\n * @example\n * ```ts\n * // Basic coordinate access\n * const polygon = new Polygon([0, 0, 100, 200, 300, 400]);\n * console.log(polygon.lastX); // 300\n * ```\n * @readonly\n * @returns The x-coordinate of the last vertex\n * @see {@link Polygon.lastY} For last Y coordinate\n * @see {@link Polygon.points} For raw points array\n */\n get lastX(): number\n {\n return this.points[this.points.length - 2];\n }\n\n /**\n * Get the last Y coordinate of the polygon.\n * @example\n * ```ts\n * // Basic coordinate access\n * const polygon = new Polygon([0, 0, 100, 200, 300, 400]);\n * console.log(polygon.lastY); // 400\n * ```\n * @readonly\n * @returns The y-coordinate of the last vertex\n * @see {@link Polygon.lastX} For last X coordinate\n * @see {@link Polygon.points} For raw points array\n */\n get lastY(): number\n {\n return this.points[this.points.length - 1];\n }\n\n /**\n * Get the last X coordinate of the polygon.\n * @readonly\n * @deprecated since 8.11.0, use {@link Polygon.lastX} instead.\n */\n get x(): number\n {\n // #if _DEBUG\n deprecation('8.11.0', 'Polygon.lastX is deprecated, please use Polygon.lastX instead.');\n // #endif\n\n return this.points[this.points.length - 2];\n }\n\n /**\n * Get the last Y coordinate of the polygon.\n * @readonly\n * @deprecated since 8.11.0, use {@link Polygon.lastY} instead.\n */\n get y(): number\n {\n // #if _DEBUG\n deprecation('8.11.0', 'Polygon.y is deprecated, please use Polygon.lastY instead.');\n // #endif\n\n return this.points[this.points.length - 1];\n }\n /**\n * Get the first X coordinate of the polygon.\n * @example\n * ```ts\n * // Basic coordinate access\n * const polygon = new Polygon([0, 0, 100, 200, 300, 400]);\n * console.log(polygon.x); // 0\n * ```\n * @readonly\n * @returns The x-coordinate of the first vertex\n * @see {@link Polygon.startY} For first Y coordinate\n * @see {@link Polygon.points} For raw points array\n */\n get startX(): number\n {\n return this.points[0];\n }\n\n /**\n * Get the first Y coordinate of the polygon.\n * @example\n * ```ts\n * // Basic coordinate access\n * const polygon = new Polygon([0, 0, 100, 200, 300, 400]);\n * console.log(polygon.y); // 0\n * ```\n * @readonly\n * @returns The y-coordinate of the first vertex\n * @see {@link Polygon.startX} For first X coordinate\n * @see {@link Polygon.points} For raw points array\n */\n get startY(): number\n {\n return this.points[1];\n }\n}\n\n","import type { Matrix } from '../../../../../maths/matrix/Matrix';\n\n/**\n * Takes a vertices array and a matrix and transforms the vertices based on the matrix.\n * this out put is written to the uvs array\n * @param vertices - the vertices to calculate uvs from\n * @param verticesStride - the stride of the vertice\n * @param verticesOffset - the offset of the vertices\n * @param uvs - the uvs to fill\n * @param uvsOffset - the offset of the uvs\n * @param uvsStride - the stride of the uvs\n * @param size - the size of the vertices\n * @param matrix - the matrix to apply to the uvs\n * @internal\n */\nexport function buildUvs(\n vertices: number[],\n verticesStride: number,\n verticesOffset: number,\n\n uvs: number[],\n uvsOffset: number,\n uvsStride: number,\n\n size: number,\n matrix: Matrix = null\n): void\n{\n let index = 0;\n\n verticesOffset *= verticesStride;\n uvsOffset *= uvsStride;\n\n const a = matrix.a;\n const b = matrix.b;\n const c = matrix.c;\n const d = matrix.d;\n const tx = matrix.tx;\n const ty = matrix.ty;\n\n while (index < size)\n {\n const x = vertices[verticesOffset];\n const y = vertices[verticesOffset + 1];\n\n uvs[uvsOffset] = (a * x) + (c * y) + tx;\n uvs[uvsOffset + 1] = (b * x) + (d * y) + ty;\n\n uvsOffset += uvsStride;\n\n verticesOffset += verticesStride;\n\n index++;\n }\n}\n/**\n * @param uvs\n * @param uvsOffset\n * @param uvsStride\n * @param size\n * @internal\n */\nexport function buildSimpleUvs(\n uvs: number[],\n uvsOffset: number,\n uvsStride: number,\n size: number,\n)\n{\n let index = 0;\n\n uvsOffset *= uvsStride;\n\n while (index < size)\n {\n uvs[uvsOffset] = 0;\n uvs[uvsOffset + 1] = 0;\n\n uvsOffset += uvsStride;\n\n index++;\n }\n}\n","import type { Matrix } from '../../../../../maths/matrix/Matrix';\n\n/**\n * Transforms the vertices in an array with the given matrix.\n * @param vertices - the vertices to transform\n * @param m - the matrix to apply to the vertices\n * @param offset - the offset of the vertices (defaults to 0)\n * @param stride - the stride of the vertices (defaults to 2)\n * @param size - the size of the vertices (defaults to vertices.length / stride - offset)\n * @category rendering\n * @internal\n */\nexport function transformVertices(vertices: number[], m: Matrix, offset?: number, stride?: number, size?: number)\n{\n const a = m.a;\n const b = m.b;\n const c = m.c;\n const d = m.d;\n const tx = m.tx;\n const ty = m.ty;\n\n offset ||= 0;\n stride ||= 2;\n size ||= (vertices.length / stride) - offset;\n\n let index = offset * stride;\n\n for (let i = 0; i < size; i++)\n {\n const x = vertices[index];\n const y = vertices[index + 1];\n\n vertices[index] = (a * x) + (c * y) + tx;\n vertices[index + 1] = (b * x) + (d * y) + ty;\n\n index += stride;\n }\n}\n","import { ExtensionType } from '../../../../extensions/Extensions';\n\nimport type { Circle } from '../../../../maths/shapes/Circle';\nimport type { Ellipse } from '../../../../maths/shapes/Ellipse';\nimport type { RoundedRectangle } from '../../../../maths/shapes/RoundedRectangle';\nimport type { ShapeBuildCommand } from './ShapeBuildCommand';\n\n/** @internal */\ntype RoundedShape = Circle | Ellipse | RoundedRectangle;\n\n/**\n * Builds a rectangle to draw\n *\n * Ignored from docs since it is not directly exposed.\n * @internal\n */\nexport const buildCircle: ShapeBuildCommand<RoundedShape> = {\n extension: {\n type: ExtensionType.ShapeBuilder,\n name: 'circle',\n },\n\n build(shape: RoundedShape, points: number[]): boolean\n {\n let x;\n let y;\n let dx;\n let dy;\n\n let rx;\n let ry;\n\n if (shape.type === 'circle')\n {\n const circle = shape as Circle;\n\n rx = ry = circle.radius;\n if (rx <= 0)\n {\n return false;\n }\n x = circle.x;\n y = circle.y;\n dx = dy = 0;\n }\n\n else if (shape.type === 'ellipse')\n {\n const ellipse = shape as Ellipse;\n\n rx = ellipse.halfWidth;\n ry = ellipse.halfHeight;\n if (rx <= 0 || ry <= 0)\n { // skip zero ellipse\n return false;\n }\n x = ellipse.x;\n y = ellipse.y;\n dx = dy = 0;\n }\n else\n {\n const roundedRect = shape as RoundedRectangle;\n const halfWidth = roundedRect.width / 2;\n const halfHeight = roundedRect.height / 2;\n\n x = roundedRect.x + halfWidth;\n y = roundedRect.y + halfHeight;\n rx = ry = Math.max(0, Math.min(roundedRect.radius, Math.min(halfWidth, halfHeight)));\n dx = halfWidth - rx;\n dy = halfHeight - ry;\n }\n\n if (dx < 0 || dy < 0)\n {\n return false;\n }\n\n // Choose a number of segments such that the maximum absolute deviation from the circle is approximately 0.029\n const n = Math.ceil(2.3 * Math.sqrt(rx + ry));\n const m = (n * 8) + (dx ? 4 : 0) + (dy ? 4 : 0);\n\n if (m === 0)\n {\n return false;\n }\n\n if (n === 0)\n {\n points[0] = points[6] = x + dx;\n points[1] = points[3] = y + dy;\n points[2] = points[4] = x - dx;\n points[5] = points[7] = y - dy;\n\n return true;\n }\n\n let j1 = 0;\n let j2 = (n * 4) + (dx ? 2 : 0) + 2;\n let j3 = j2;\n let j4 = m;\n\n let x0 = dx + rx;\n let y0 = dy;\n let x1 = x + x0;\n let x2 = x - x0;\n let y1 = y + y0;\n\n points[j1++] = x1;\n points[j1++] = y1;\n points[--j2] = y1;\n points[--j2] = x2;\n\n if (dy)\n {\n const y2 = y - y0;\n\n points[j3++] = x2;\n points[j3++] = y2;\n points[--j4] = y2;\n points[--j4] = x1;\n }\n\n for (let i = 1; i < n; i++)\n {\n const a = Math.PI / 2 * (i / n);\n const x0 = dx + (Math.cos(a) * rx);\n const y0 = dy + (Math.sin(a) * ry);\n const x1 = x + x0;\n const x2 = x - x0;\n const y1 = y + y0;\n const y2 = y - y0;\n\n points[j1++] = x1;\n points[j1++] = y1;\n points[--j2] = y1;\n points[--j2] = x2;\n points[j3++] = x2;\n points[j3++] = y2;\n points[--j4] = y2;\n points[--j4] = x1;\n }\n\n x0 = dx;\n y0 = dy + ry;\n x1 = x + x0;\n x2 = x - x0;\n y1 = y + y0;\n const y2 = y - y0;\n\n points[j1++] = x1;\n points[j1++] = y1;\n points[--j4] = y2;\n points[--j4] = x1;\n\n if (dx)\n {\n points[j1++] = x2;\n points[j1++] = y1;\n points[--j4] = y2;\n points[--j4] = x2;\n }\n\n return true;\n },\n\n triangulate(points, vertices, verticesStride, verticesOffset, indices, indicesOffset)\n {\n if (points.length === 0)\n {\n return;\n }\n\n // Compute center (average of all points)\n let centerX = 0; let\n centerY = 0;\n\n for (let i = 0; i < points.length; i += 2)\n {\n centerX += points[i];\n centerY += points[i + 1];\n }\n centerX /= (points.length / 2);\n centerY /= (points.length / 2);\n\n // Set center vertex\n let count = verticesOffset;\n\n vertices[count * verticesStride] = centerX;\n vertices[(count * verticesStride) + 1] = centerY;\n const centerIndex = count++;\n\n // Set edge vertices and indices\n for (let i = 0; i < points.length; i += 2)\n {\n vertices[count * verticesStride] = points[i];\n vertices[(count * verticesStride) + 1] = points[i + 1];\n\n if (i > 0)\n { // Skip first point for indices\n indices[indicesOffset++] = count;\n indices[indicesOffset++] = centerIndex;\n indices[indicesOffset++] = count - 1;\n }\n count++;\n }\n\n // Connect last point to the first edge point\n indices[indicesOffset++] = centerIndex + 1;\n indices[indicesOffset++] = centerIndex;\n indices[indicesOffset++] = count - 1;\n }\n\n};\n\n/** @internal */\nexport const buildEllipse = { ...buildCircle, extension: { ...buildCircle.extension, name: 'ellipse' } };\n/** @internal */\nexport const buildRoundedRectangle = { ...buildCircle, extension: { ...buildCircle.extension, name: 'roundedRectangle' } };\n","import { Matrix } from '../../../maths/matrix/Matrix';\nimport { multiplyHexColors } from '../../container/utils/multiplyHexColors';\n\nimport type { Batch, Batcher } from '../../../rendering/batcher/shared/Batcher';\nimport type { DefaultBatchableMeshElement } from '../../../rendering/batcher/shared/DefaultBatcher';\nimport type { Topology } from '../../../rendering/renderers/shared/geometry/const';\nimport type { Texture } from '../../../rendering/renderers/shared/texture/Texture';\nimport type { Graphics } from './Graphics';\n\nconst identityMatrix = new Matrix();\n\n/**\n * A batchable graphics object.\n * @ignore\n */\nexport class BatchableGraphics implements DefaultBatchableMeshElement\n{\n public readonly packAsQuad = false;\n public batcherName = 'default';\n\n public texture: Texture;\n\n public topology: Topology = 'triangle-list';\n public renderable: Graphics;\n public indexOffset: number;\n public indexSize: number;\n public attributeOffset: number;\n public attributeSize: number;\n public baseColor: number;\n public alpha: number;\n public applyTransform = true;\n public roundPixels: 0 | 1 = 0;\n\n public _indexStart: number;\n public _textureId: number;\n public _attributeStart: number;\n public _batcher: Batcher = null;\n public _batch: Batch = null;\n\n public geometryData: { vertices: number[]; uvs: number[]; indices: number[]; };\n\n get uvs()\n {\n return this.geometryData.uvs;\n }\n\n get positions()\n {\n return this.geometryData.vertices;\n }\n\n get indices()\n {\n return this.geometryData.indices;\n }\n\n get blendMode()\n {\n if (this.renderable && this.applyTransform)\n {\n return this.renderable.groupBlendMode;\n }\n\n return 'normal';\n }\n\n get color()\n {\n const rgb = this.baseColor;\n const bgr = (rgb >> 16) | (rgb & 0xff00) | ((rgb & 0xff) << 16);\n const renderable = this.renderable;\n\n if (renderable)\n {\n return multiplyHexColors(bgr, renderable.groupColor)\n + ((this.alpha * renderable.groupAlpha * 255) << 24);\n }\n\n return bgr + ((this.alpha * 255) << 24);\n }\n\n get transform()\n {\n return this.renderable?.groupTransform || identityMatrix;\n }\n\n public copyTo(gpuBuffer: BatchableGraphics)\n {\n gpuBuffer.indexOffset = this.indexOffset;\n gpuBuffer.indexSize = this.indexSize;\n\n gpuBuffer.attributeOffset = this.attributeOffset;\n gpuBuffer.attributeSize = this.attributeSize;\n\n gpuBuffer.baseColor = this.baseColor;\n gpuBuffer.alpha = this.alpha;\n\n gpuBuffer.texture = this.texture;\n gpuBuffer.geometryData = this.geometryData;\n\n gpuBuffer.topology = this.topology;\n }\n\n public reset()\n {\n this.applyTransform = true;\n this.renderable = null;\n this.topology = 'triangle-list';\n }\n\n public destroy()\n {\n this.renderable = null;\n this.texture = null;\n this.geometryData = null;\n this._batcher = null;\n this._batch = null;\n }\n}\n","import { type Polygon } from '../../../../maths/shapes/Polygon';\n\nimport type { GraphicsPath } from '../path/GraphicsPath';\n\n/**\n * Computes the maximum miter ratio from polygon corner angles in a graphics path.\n * The miter ratio determines how much the stroke padding must expand to contain miter joins\n * at sharp angles. Returns a value >= 1, clamped by the miterLimit.\n * @param path - The graphics path containing polygon shapes\n * @param miterLimit - The maximum allowed miter ratio\n * @returns The maximum miter ratio found in all polygon corners, clamped by miterLimit\n * @internal\n */\nexport function getMaxMiterRatio(path: GraphicsPath, miterLimit: number): number\n{\n let maxRatio = 1;\n\n const shapePrimitives = path.shapePath.shapePrimitives;\n\n for (let i = 0; i < shapePrimitives.length; i++)\n {\n const shape = shapePrimitives[i].shape;\n\n if (shape.type !== 'polygon') continue;\n\n const points = (shape as Polygon).points;\n const n = points.length;\n\n if (n < 6) continue;\n\n const closed = (shape as Polygon).closePath;\n\n for (let j = 0; j < n; j += 2)\n {\n // For open paths, skip first and last points (they use caps, not joins)\n if (!closed && (j === 0 || j === n - 2)) continue;\n\n const prevIdx = (j - 2 + n) % n;\n const nextIdx = (j + 2) % n;\n\n const x0 = points[prevIdx];\n const y0 = points[prevIdx + 1];\n const x1 = points[j];\n const y1 = points[j + 1];\n const x2 = points[nextIdx];\n const y2 = points[nextIdx + 1];\n\n const dx0 = x0 - x1;\n const dy0 = y0 - y1;\n const dx1 = x2 - x1;\n const dy1 = y2 - y1;\n\n const len0Sq = (dx0 * dx0) + (dy0 * dy0);\n const len1Sq = (dx1 * dx1) + (dy1 * dy1);\n\n if (len0Sq < 1e-12 || len1Sq < 1e-12) continue;\n\n const dot = (dx0 * dx1) + (dy0 * dy1);\n const cosAngle = dot / Math.sqrt(len0Sq * len1Sq);\n let clampedCos = cosAngle;\n\n if (clampedCos < -1) clampedCos = -1;\n else if (clampedCos > 1) clampedCos = 1;\n\n const sinHalfAngle = Math.sqrt((1 - clampedCos) * 0.5);\n\n if (sinHalfAngle < 1e-6) continue;\n\n const miterRatio = Math.min(1 / sinHalfAngle, miterLimit);\n\n if (miterRatio > maxRatio) maxRatio = miterRatio;\n }\n }\n\n return maxRatio;\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { State } from '../../../rendering/renderers/shared/state/State';\nimport { GCManagedHash } from '../../../utils/data/GCManagedHash';\n\nimport type { InstructionSet } from '../../../rendering/renderers/shared/instructions/InstructionSet';\nimport type { RenderPipe } from '../../../rendering/renderers/shared/instructions/RenderPipe';\nimport type { Renderer } from '../../../rendering/renderers/types';\nimport type { Graphics } from '../shared/Graphics';\nimport type { GraphicsAdaptor } from '../shared/GraphicsPipe';\n\n/** @internal */\nexport class CanvasGraphicsPipe implements RenderPipe<Graphics>\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.CanvasPipes,\n ],\n name: 'graphics',\n } as const;\n\n public renderer: Renderer;\n public state: State = State.for2d();\n private _adaptor: GraphicsAdaptor;\n private readonly _managedGraphics: GCManagedHash<Graphics>;\n\n constructor(renderer: Renderer, adaptor: GraphicsAdaptor)\n {\n this.renderer = renderer;\n this._adaptor = adaptor;\n this.renderer.runners.contextChange.add(this);\n this._managedGraphics = new GCManagedHash({ renderer, type: 'renderable', priority: -1, name: 'graphics' });\n }\n\n public contextChange(): void\n {\n this._adaptor.contextChange(this.renderer);\n }\n\n public validateRenderable(_graphics: Graphics): boolean\n {\n return false;\n }\n\n public addRenderable(graphics: Graphics, instructionSet: InstructionSet)\n {\n this._managedGraphics.add(graphics);\n this.renderer.renderPipes.batch.break(instructionSet);\n instructionSet.add(graphics);\n }\n\n public updateRenderable(_graphics: Graphics)\n {\n // no-op for canvas\n }\n\n public execute(graphics: Graphics)\n {\n if (!graphics.isRenderable) return;\n\n this._adaptor.execute(this, graphics);\n }\n\n public destroy()\n {\n this._managedGraphics.destroy();\n this.renderer = null;\n\n this._adaptor.destroy();\n this._adaptor = null;\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { InstructionSet } from '../../../rendering/renderers/shared/instructions/InstructionSet';\nimport { GCManagedHash } from '../../../utils/data/GCManagedHash';\nimport { type GPUData } from '../../view/ViewContainer';\n\nimport type { System } from '../../../rendering/renderers/shared/system/System';\nimport type { Renderer } from '../../../rendering/renderers/types';\nimport type { GraphicsContext } from '../shared/GraphicsContext';\nimport type { GraphicsContextSystemOptions } from '../shared/GraphicsContextSystem';\n\nclass CanvasGraphicsContext implements GPUData\n{\n /**\n * Whether this context can be batched.\n * @advanced\n */\n public isBatchable = false;\n /**\n * The source GraphicsContext.\n * @advanced\n */\n public context: GraphicsContext;\n /**\n * Render data for this context.\n * @advanced\n */\n public graphicsData: CanvasGraphicsContextRenderData;\n\n /**\n * Reset cached canvas data.\n * @advanced\n */\n public reset()\n {\n this.isBatchable = false;\n this.context = null;\n\n if (this.graphicsData)\n {\n this.graphicsData.destroy();\n this.graphicsData = null;\n }\n }\n\n /**\n * Destroy the cached data.\n * @advanced\n */\n public destroy()\n {\n this.reset();\n }\n}\n\nclass CanvasGraphicsContextRenderData\n{\n /**\n * Instructions for canvas rendering.\n * @advanced\n */\n public instructions = new InstructionSet();\n\n /**\n * Initialize render data.\n * @advanced\n */\n public init(): void\n {\n this.instructions.reset();\n }\n\n /**\n * Destroy render data.\n * @advanced\n */\n public destroy(): void\n {\n this.instructions.destroy();\n (this.instructions as null) = null;\n }\n}\n\n/**\n * A system that manages the rendering of GraphicsContexts for Canvas2D.\n * @category rendering\n * @advanced\n */\nexport class CanvasGraphicsContextSystem implements System<GraphicsContextSystemOptions>\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.CanvasSystem,\n ],\n name: 'graphicsContext'\n } as const;\n\n /** The default options for the GraphicsContextSystem. */\n public static readonly defaultOptions: GraphicsContextSystemOptions = {\n /**\n * A value from 0 to 1 that controls the smoothness of bezier curves (the higher the smoother)\n * @default 0.5\n */\n bezierSmoothness: 0.5,\n };\n\n private readonly _renderer: Renderer;\n private readonly _managedContexts: GCManagedHash<GraphicsContext>;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n this._managedContexts = new GCManagedHash({ renderer, type: 'resource', name: 'graphicsContext' });\n }\n\n /**\n * Runner init called, update the default options\n * @ignore\n */\n public init(options?: GraphicsContextSystemOptions)\n {\n CanvasGraphicsContextSystem.defaultOptions.bezierSmoothness = options?.bezierSmoothness\n ?? CanvasGraphicsContextSystem.defaultOptions.bezierSmoothness;\n }\n\n /**\n * Returns the render data for a given GraphicsContext.\n * @param context - The GraphicsContext to get the render data for.\n * @internal\n */\n public getContextRenderData(context: GraphicsContext): CanvasGraphicsContextRenderData\n {\n const gpuContext = this.getGpuContext(context);\n\n return gpuContext.graphicsData || this._initContextRenderData(context);\n }\n\n /**\n * Updates the GPU context for a given GraphicsContext.\n * @param context - The GraphicsContext to update.\n * @returns The updated CanvasGraphicsContext.\n * @internal\n */\n public updateGpuContext(context: GraphicsContext)\n {\n const gpuData = context._gpuData as unknown as Record<number | string, CanvasGraphicsContext>;\n const hasContext = !!gpuData[this._renderer.uid];\n const gpuContext = gpuData[this._renderer.uid] || this._initContext(context);\n\n if (context.dirty || !hasContext)\n {\n if (hasContext)\n {\n gpuContext.reset();\n }\n\n gpuContext.isBatchable = false;\n context.dirty = false;\n }\n\n return gpuContext;\n }\n\n /**\n * Returns the CanvasGraphicsContext for a given GraphicsContext.\n * If it does not exist, it will initialize a new one.\n * @param context - The GraphicsContext to get the CanvasGraphicsContext for.\n * @returns The CanvasGraphicsContext for the given GraphicsContext.\n * @internal\n */\n public getGpuContext(context: GraphicsContext): CanvasGraphicsContext\n {\n const gpuData = context._gpuData as unknown as Record<number | string, CanvasGraphicsContext>;\n\n return gpuData[this._renderer.uid] || this._initContext(context);\n }\n\n private _initContextRenderData(context: GraphicsContext): CanvasGraphicsContextRenderData\n {\n const renderData = new CanvasGraphicsContextRenderData();\n const gpuContext = this.getGpuContext(context);\n\n gpuContext.graphicsData = renderData;\n\n renderData.init();\n\n return renderData;\n }\n\n private _initContext(context: GraphicsContext): CanvasGraphicsContext\n {\n const gpuContext = new CanvasGraphicsContext();\n\n gpuContext.context = context;\n (context._gpuData as unknown as Record<number | string, CanvasGraphicsContext>)[this._renderer.uid] = gpuContext;\n\n this._managedContexts.add(context);\n\n return gpuContext;\n }\n\n public destroy()\n {\n this._managedContexts.destroy();\n (this._renderer as null) = null;\n }\n}\n","import { deprecation, v8_0_0 } from '../../../utils/logging/deprecation';\nimport { ViewContainer, type ViewContainerOptions } from '../../view/ViewContainer';\nimport { GraphicsContext } from './GraphicsContext';\nimport { type GraphicsGpuData } from './GraphicsPipe';\nimport '../init';\n\nimport type { ColorSource } from '../../../color/Color';\nimport type { Matrix } from '../../../maths/matrix/Matrix';\nimport type { PointData } from '../../../maths/point/PointData';\nimport type { Instruction } from '../../../rendering/renderers/shared/instructions/Instruction';\nimport type { Texture } from '../../../rendering/renderers/shared/texture/Texture';\nimport type { Bounds } from '../../container/bounds/Bounds';\nimport type { ContextDestroyOptions, DestroyOptions } from '../../container/destroyTypes';\nimport type { FillInput, FillStyle, StrokeStyle } from './FillTypes';\nimport type { GraphicsPath } from './path/GraphicsPath';\nimport type { RoundedPoint } from './path/roundShape';\n\n/**\n * Constructor options used for Graphics instances.\n * Configures the initial state and behavior of a Graphics object.\n * @example\n * ```ts\n * const graphics = new Graphics({\n * roundPixels: true,\n * position: { x: 100.5, y: 100.5 }\n * });\n *\n * // Reuse graphics context\n * const sharedContext = new GraphicsContext();\n * const graphics1 = new Graphics({ context: sharedContext });\n * const graphics2 = new Graphics({ context: sharedContext });\n * ```\n * @see {@link Graphics} For the graphics class implementation\n * @see {@link GraphicsContext} For the graphics context API\n * @category scene\n * @standard\n */\nexport interface GraphicsOptions extends PixiMixins.GraphicsOptions, ViewContainerOptions\n{\n /**\n * The GraphicsContext to use, useful for reuse and optimisation\n * If not provided, a new GraphicsContext will be created.\n * @example\n * ```ts\n * const sharedContext = new GraphicsContext();\n * const graphics1 = new Graphics({ context: sharedContext });\n * const graphics2 = new Graphics({ context: sharedContext });\n * ```\n */\n context?: GraphicsContext;\n /**\n * Whether or not to round the x/y position.\n * @default false\n * @example\n * ```ts\n * const graphics = new Graphics({ roundPixels: true });\n * ```\n */\n roundPixels?: boolean;\n}\n// eslint-disable-next-line requireExport/require-export-jsdoc, requireMemberAPI/require-member-api-doc\nexport interface Graphics extends PixiMixins.Graphics, ViewContainer<GraphicsGpuData> {}\n\n/**\n * The Graphics class is primarily used to render primitive shapes such as lines, circles and\n * rectangles to the display, and to color and fill them. It can also be used to create complex\n * masks and hit areas for interaction.\n * @example\n * ```ts\n * // Create a new graphics object\n * const graphics = new Graphics();\n *\n * // Draw a filled rectangle with a stroke\n * graphics\n * .rect(0, 0, 100, 100)\n * .fill({ color: 0xff0000 }) // Fill with red\n * .stroke({ width: 2, color: 0x000000 }); // Stroke with black\n *\n * // Draw a complex shape\n * graphics\n * .moveTo(50, 50)\n * .lineTo(100, 100)\n * .arc(100, 100, 50, 0, Math.PI)\n * .closePath()\n * .fill({ color: 0x00ff00, alpha: 0.5 }); // Fill the shape\n *\n * // Use as a mask\n * sprite.mask = graphics;\n * ```\n * @see {@link GraphicsContext} For the underlying drawing API\n * @see {@link GraphicsPath} For path creation\n * @category scene\n * @standard\n */\nexport class Graphics extends ViewContainer<GraphicsGpuData> implements Instruction\n{\n /** @internal */\n public override readonly renderPipeId: string = 'graphics';\n /** @internal */\n public batched: boolean;\n\n private _context: GraphicsContext;\n private readonly _ownedContext: GraphicsContext;\n\n /**\n * Creates a new Graphics object.\n * @param options - Options for the Graphics.\n */\n constructor(options?: GraphicsOptions | GraphicsContext)\n {\n if (options instanceof GraphicsContext)\n {\n options = { context: options };\n }\n\n const { context, roundPixels, ...rest } = options || {};\n\n super({\n label: 'Graphics',\n ...rest\n });\n\n if (!context)\n {\n this.context = this._ownedContext = new GraphicsContext();\n this.context.autoGarbageCollect = this.autoGarbageCollect;\n }\n else\n {\n this.context = context;\n }\n\n this.didViewUpdate = true;\n\n this.allowChildren = false;\n this.roundPixels = roundPixels ?? false;\n }\n\n set context(context: GraphicsContext)\n {\n if (context === this._context) return;\n\n if (this._context)\n {\n this._context.off('update', this.onViewUpdate, this);\n this._context.off('unload', this.unload, this);\n }\n\n this._context = context;\n\n // TODO store this bound function somewhere else..\n this._context.on('update', this.onViewUpdate, this);\n this._context.on('unload', this.unload, this);\n\n this.onViewUpdate();\n }\n\n /**\n * The underlying graphics context used for drawing operations.\n * Controls how shapes and paths are rendered.\n * @example\n * ```ts\n * // Create a shared context\n * const sharedContext = new GraphicsContext();\n *\n * // Create graphics objects sharing the same context\n * const graphics1 = new Graphics();\n * const graphics2 = new Graphics();\n *\n * // Assign shared context\n * graphics1.context = sharedContext;\n * graphics2.context = sharedContext;\n *\n * // Both graphics will show the same shapes\n * sharedContext\n * .rect(0, 0, 100, 100)\n * .fill({ color: 0xff0000 });\n * ```\n * @see {@link GraphicsContext} For drawing operations\n * @see {@link GraphicsOptions} For context configuration\n */\n get context(): GraphicsContext\n {\n return this._context;\n }\n\n /**\n * The local bounds of the graphics object.\n * Returns the boundaries after all graphical operations but before any transforms.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Draw a shape\n * graphics\n * .rect(0, 0, 100, 100)\n * .fill({ color: 0xff0000 });\n *\n * // Get bounds information\n * const bounds = graphics.bounds;\n * console.log(bounds.width); // 100\n * console.log(bounds.height); // 100\n * ```\n * @readonly\n * @see {@link Bounds} For bounds operations\n * @see {@link Container#getBounds} For transformed bounds\n */\n override get bounds(): Bounds\n {\n return this._context.bounds;\n }\n\n /**\n * Graphics objects do not need to update their bounds as the context handles this.\n * @private\n */\n protected updateBounds(): void { /** */ }\n\n /**\n * Checks if the object contains the given point.\n * Returns true if the point lies within the Graphics object's rendered area.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Draw a shape\n * graphics\n * .rect(0, 0, 100, 100)\n * .fill({ color: 0xff0000 });\n *\n * // Check point intersection\n * if (graphics.containsPoint({ x: 50, y: 50 })) {\n * console.log('Point is inside rectangle!');\n * }\n * ```\n * @param point - The point to check in local coordinates\n * @returns True if the point is inside the Graphics object\n * @see {@link Graphics#bounds} For bounding box checks\n * @see {@link PointData} For point data structure\n */\n public override containsPoint(point: PointData)\n {\n return this._context.containsPoint(point);\n }\n\n /**\n * Destroys this graphics renderable and optionally its context.\n * @param options - Options parameter. A boolean will act as if all options\n *\n * If the context was created by this graphics and `destroy(false)` or `destroy()` is called\n * then the context will still be destroyed.\n *\n * If you want to explicitly not destroy this context that this graphics created,\n * then you should pass destroy({ context: false })\n *\n * If the context was passed in as an argument to the constructor then it will not be destroyed\n * @example\n * ```ts\n * // Destroy the graphics and its context\n * graphics.destroy();\n * graphics.destroy(true);\n * graphics.destroy({ context: true, texture: true, textureSource: true });\n * ```\n */\n public override destroy(options?: DestroyOptions): void\n {\n if (this._ownedContext && !options)\n {\n this._ownedContext.destroy(options);\n }\n else if (options === true || (options as ContextDestroyOptions)?.context === true)\n {\n this._context.destroy(options);\n }\n\n this._context?.off('update', this.onViewUpdate, this);\n this._context?.off('unload', this.unload, this);\n\n (this._ownedContext as null) = null;\n this._context = null;\n\n super.destroy(options);\n }\n\n /**\n * @param now - The current time in milliseconds.\n * @internal\n */\n public _onTouch(now: number): void\n {\n this._gcLastUsed = now;\n this._context._gcLastUsed = now;\n }\n\n private _callContextMethod(method: keyof GraphicsContext, args: any[]): this\n {\n (this.context as any)[method](...args);\n\n return this;\n }\n\n // --------------------------------------- GraphicsContext methods ---------------------------------------\n /**\n * Sets the current fill style of the graphics context.\n * The fill style can be a color, gradient, pattern, or a complex style object.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Basic color fill\n * graphics\n * .setFillStyle({ color: 0xff0000 }) // Red fill\n * .rect(0, 0, 100, 100)\n * .fill();\n *\n * // Gradient fill\n * const gradient = new FillGradient({\n * end: { x: 1, y: 0 },\n * colorStops: [\n * { offset: 0, color: 0xff0000 }, // Red at start\n * { offset: 0.5, color: 0x00ff00 }, // Green at middle\n * { offset: 1, color: 0x0000ff }, // Blue at end\n * ],\n * });\n *\n * graphics\n * .setFillStyle(gradient)\n * .circle(100, 100, 50)\n * .fill();\n *\n * // Pattern fill\n * const pattern = new FillPattern(texture);\n * graphics\n * .setFillStyle({\n * fill: pattern,\n * alpha: 0.5\n * })\n * .rect(0, 0, 200, 200)\n * .fill();\n * ```\n * @param {FillInput} args - The fill style to apply\n * @returns The Graphics instance for chaining\n * @see {@link FillStyle} For fill style options\n * @see {@link FillGradient} For gradient fills\n * @see {@link FillPattern} For pattern fills\n */\n public setFillStyle(...args: Parameters<GraphicsContext['setFillStyle']>): this\n {\n return this._callContextMethod('setFillStyle', args);\n }\n\n /**\n * Sets the current stroke style of the graphics context.\n * Similar to fill styles, stroke styles can encompass colors, gradients, patterns, or more detailed configurations.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Basic color stroke\n * graphics\n * .setStrokeStyle({\n * width: 2,\n * color: 0x000000\n * })\n * .rect(0, 0, 100, 100)\n * .stroke();\n *\n * // Complex stroke style\n * graphics\n * .setStrokeStyle({\n * width: 4,\n * color: 0xff0000,\n * alpha: 0.5,\n * join: 'round',\n * cap: 'round',\n * alignment: 0.5\n * })\n * .circle(100, 100, 50)\n * .stroke();\n *\n * // Gradient stroke\n * const gradient = new FillGradient({\n * end: { x: 1, y: 0 },\n * colorStops: [\n * { offset: 0, color: 0xff0000 }, // Red at start\n * { offset: 0.5, color: 0x00ff00 }, // Green at middle\n * { offset: 1, color: 0x0000ff }, // Blue at end\n * ],\n * });\n *\n * graphics\n * .setStrokeStyle({\n * width: 10,\n * fill: gradient\n * })\n * .poly([0,0, 100,50, 0,100])\n * .stroke();\n * ```\n * @param {StrokeInput} args - The stroke style to apply\n * @returns The Graphics instance for chaining\n * @see {@link StrokeStyle} For stroke style options\n * @see {@link FillGradient} For gradient strokes\n * @see {@link FillPattern} For pattern strokes\n */\n public setStrokeStyle(...args: Parameters<GraphicsContext['setStrokeStyle']>): this\n {\n return this._callContextMethod('setStrokeStyle', args);\n }\n\n /**\n * Fills the current or given path with the current fill style or specified style.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Fill with direct color\n * graphics\n * .circle(50, 50, 25)\n * .fill('red'); // Red fill\n *\n * // Fill with texture\n * graphics\n * .rect(0, 0, 100, 100)\n * .fill(myTexture); // Fill with texture\n *\n * // Fill with complex style\n * graphics\n * .rect(0, 0, 100, 100)\n * .fill({\n * color: 0x00ff00,\n * alpha: 0.5,\n * texture: myTexture,\n * matrix: new Matrix()\n * });\n *\n * // Fill with gradient\n * const gradient = new FillGradient({\n * end: { x: 1, y: 0 },\n * colorStops: [\n * { offset: 0, color: 0xff0000 },\n * { offset: 0.5, color: 0x00ff00 },\n * { offset: 1, color: 0x0000ff },\n * ],\n * });\n *\n * graphics\n * .circle(100, 100, 50)\n * .fill(gradient);\n * ```\n * @param {FillInput} style - The style to fill the path with. Can be:\n * - A ColorSource\n * - A gradient\n * - A pattern\n * - A complex style object\n * If omitted, uses current fill style.\n * @returns The Graphics instance for chaining\n * @see {@link FillStyle} For fill style options\n * @see {@link FillGradient} For gradient fills\n * @see {@link FillPattern} For pattern fills\n */\n public fill(style?: FillInput): this;\n /** @deprecated 8.0.0 */\n public fill(color: ColorSource, alpha?: number): this;\n public fill(...args: [FillStyle | ColorSource, number?]): this\n {\n return this._callContextMethod('fill', args);\n }\n /**\n * Strokes the current path with the current stroke style or specified style.\n * Outlines the shape using the stroke settings.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Stroke with direct color\n * graphics\n * .circle(50, 50, 25)\n * .stroke({\n * width: 2,\n * color: 0xff0000\n * }); // 2px red stroke\n *\n * // Fill with texture\n * graphics\n * .rect(0, 0, 100, 100)\n * .stroke(myTexture); // Fill with texture\n *\n * // Stroke with gradient\n * const gradient = new FillGradient({\n * end: { x: 1, y: 0 },\n * colorStops: [\n * { offset: 0, color: 0xff0000 },\n * { offset: 0.5, color: 0x00ff00 },\n * { offset: 1, color: 0x0000ff },\n * ],\n * });\n *\n * graphics\n * .rect(0, 0, 100, 100)\n * .stroke({\n * width: 4,\n * fill: gradient,\n * alignment: 0.5,\n * join: 'round'\n * });\n * ```\n * @param {StrokeStyle} args - Optional stroke style to apply. Can be:\n * - A stroke style object with width, color, etc.\n * - A gradient\n * - A pattern\n * If omitted, uses current stroke style.\n * @returns The Graphics instance for chaining\n * @see {@link StrokeStyle} For stroke style options\n * @see {@link FillGradient} For gradient strokes\n * @see {@link setStrokeStyle} For setting default stroke style\n */\n public stroke(...args: Parameters<GraphicsContext['stroke']>): this\n {\n return this._callContextMethod('stroke', args);\n }\n /**\n * Adds a texture to the graphics context. This method supports multiple ways to draw textures\n * including basic textures, tinted textures, and textures with custom dimensions.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Basic texture drawing\n * graphics.texture(myTexture);\n *\n * // Tinted texture with position\n * graphics.texture(myTexture, 0xff0000); // Red tint\n *\n * // Texture with custom position and dimensions\n * graphics\n * .texture(\n * myTexture, // texture\n * 0xffffff, // white tint\n * 100, 100, // position\n * 200, 150 // dimensions\n * );\n * ```\n * Basic texture drawing:\n * @param texture - The Texture object to use.\n * @returns The instance of the current Graphics for chaining.\n *\n * Extended texture drawing:\n * @param texture - The Texture object to use.\n * tint - A ColorSource to tint the texture (defaults to white).\n * dx - The x-coordinate for the texture placement.\n * dy - The y-coordinate for the texture placement.\n * dw - The width to draw the texture (defaults to texture width).\n * dh - The height to draw the texture (defaults to texture height).\n * @returns The instance of the current Graphics for chaining.\n * @see {@link Texture} For texture creation\n * @see {@link FillPattern} For pattern fills\n */\n public texture(texture: Texture): this;\n public texture(texture: Texture, tint?: ColorSource, dx?: number, dy?: number, dw?: number, dh?: number): this;\n public texture(...args: [Texture, number?, number?, number?, number?, number?]): this\n {\n return this._callContextMethod('texture', args);\n }\n /**\n * Resets the current path. Any previous path and its commands are discarded and a new path is\n * started. This is typically called before beginning a new shape or series of drawing commands.\n * @example\n * ```ts\n * const graphics = new Graphics();\n * graphics\n * .circle(150, 150, 50)\n * .fill({ color: 0x00ff00 })\n * .beginPath() // Starts a new path\n * .circle(250, 150, 50)\n * .fill({ color: 0x0000ff });\n * ```\n * @returns The Graphics instance for chaining\n * @see {@link Graphics#moveTo} For starting a new subpath\n * @see {@link Graphics#closePath} For closing the current path\n */\n public beginPath(): this\n {\n return this._callContextMethod('beginPath', []);\n }\n /**\n * Applies a cutout to the last drawn shape. This is used to create holes or complex shapes by\n * subtracting a path from the previously drawn path.\n *\n * If a hole is not completely in a shape, it will fail to cut correctly.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Draw outer circle\n * graphics\n * .circle(100, 100, 50)\n * .fill({ color: 0xff0000 });\n * .circle(100, 100, 25) // Inner circle\n * .cut() // Cuts out the inner circle from the outer circle\n * ```\n */\n public cut(): this\n {\n return this._callContextMethod('cut', []);\n }\n /**\n * Adds an arc to the current path, which is centered at (x, y) with the specified radius,\n * starting and ending angles, and direction.\n * @example\n * ```ts\n * // Draw a simple arc (quarter circle)\n * const graphics = new Graphics();\n * graphics\n * .arc(100, 100, 50, 0, Math.PI/2)\n * .stroke({ width: 2, color: 0xff0000 });\n *\n * // Draw a full circle using an arc\n * graphics\n * .arc(200, 200, 30, 0, Math.PI * 2)\n * .stroke({ color: 0x00ff00 });\n *\n * // Draw a counterclockwise arc\n * graphics\n * .arc(150, 150, 40, Math.PI, 0, true)\n * .stroke({ width: 2, color: 0x0000ff });\n * ```\n * @param x - The x-coordinate of the arc's center\n * @param y - The y-coordinate of the arc's center\n * @param radius - The arc's radius (must be positive)\n * @param startAngle - The starting point of the arc, in radians\n * @param endAngle - The end point of the arc, in radians\n * @param counterclockwise - Optional. If true, draws the arc counterclockwise.\n * If false (default), draws clockwise.\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#circle} For drawing complete circles\n * @see {@link Graphics#arcTo} For drawing arcs between points\n * @see {@link Graphics#arcToSvg} For SVG-style arc drawing\n */\n public arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): this;\n public arc(...args: Parameters<GraphicsContext['arc']>): this\n {\n return this._callContextMethod('arc', args);\n }\n /**\n * Adds an arc to the current path that connects two points using a radius.\n * The arc is drawn between the current point and the specified end point,\n * using the given control point to determine the curve of the arc.\n * @example\n * ```ts\n * // Draw a simple curved corner\n * const graphics = new Graphics();\n * graphics\n * .moveTo(50, 50)\n * .arcTo(100, 50, 100, 100, 20) // Rounded corner with 20px radius\n * .stroke({ width: 2, color: 0xff0000 });\n *\n * // Create a rounded rectangle using arcTo\n * graphics\n * .moveTo(150, 150)\n * .arcTo(250, 150, 250, 250, 30) // Top right corner\n * .arcTo(250, 250, 150, 250, 30) // Bottom right corner\n * .arcTo(150, 250, 150, 150, 30) // Bottom left corner\n * .arcTo(150, 150, 250, 150, 30) // Top left corner\n * .fill({ color: 0x00ff00 });\n * ```\n * @param x1 - The x-coordinate of the control point\n * @param y1 - The y-coordinate of the control point\n * @param x2 - The x-coordinate of the end point\n * @param y2 - The y-coordinate of the end point\n * @param radius - The radius of the arc in pixels (must be positive)\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#arc} For drawing arcs using center point and angles\n * @see {@link Graphics#arcToSvg} For SVG-style arc drawing\n * @see {@link Graphics#roundRect} For drawing rectangles with rounded corners\n */\n public arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): this;\n public arcTo(...args: Parameters<GraphicsContext['arcTo']>): this\n {\n return this._callContextMethod('arcTo', args);\n }\n /**\n * Adds an SVG-style arc to the path, allowing for elliptical arcs based on the SVG spec.\n * This is particularly useful when converting SVG paths to Graphics or creating complex curved shapes.\n * @example\n * ```ts\n * // Draw a simple elliptical arc\n * const graphics = new Graphics();\n * graphics\n * .moveTo(100, 100)\n * .arcToSvg(50, 30, 0, 0, 1, 200, 100)\n * .stroke({ width: 2, color: 0xff0000 });\n *\n * // Create a complex path with rotated elliptical arc\n * graphics\n * .moveTo(150, 150)\n * .arcToSvg(\n * 60, // rx\n * 30, // ry\n * 45, // x-axis rotation (45 degrees)\n * 1, // large arc flag\n * 0, // sweep flag\n * 250, // end x\n * 200 // end y\n * )\n * .stroke({ width: 4, color: 0x00ff00 });\n *\n * // Chain multiple arcs for complex shapes\n * graphics\n * .moveTo(300, 100)\n * .arcToSvg(40, 20, 0, 0, 1, 350, 150)\n * .arcToSvg(40, 20, 0, 0, 1, 300, 200)\n * .fill({ color: 0x0000ff, alpha: 0.5 });\n * ```\n * @param rx - The x-radius of the ellipse (must be non-negative)\n * @param ry - The y-radius of the ellipse (must be non-negative)\n * @param xAxisRotation - The rotation of the ellipse's x-axis relative to the x-axis, in degrees\n * @param largeArcFlag - Either 0 or 1, determines if the larger of the two possible arcs is chosen (1) or not (0)\n * @param sweepFlag - Either 0 or 1, determines if the arc should be swept in\n * a positive angle direction (1) or negative (0)\n * @param x - The x-coordinate of the arc's end point\n * @param y - The y-coordinate of the arc's end point\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#arc} For simple circular arcs\n * @see {@link Graphics#arcTo} For connecting points with circular arcs\n * @see {@link Graphics#svg} For parsing complete SVG paths\n */\n public arcToSvg(\n rx: number, ry: number, xAxisRotation: number, largeArcFlag: number, sweepFlag: number, x: number, y: number\n ): this;\n public arcToSvg(...args: Parameters<GraphicsContext['arcToSvg']>): this\n {\n return this._callContextMethod('arcToSvg', args);\n }\n /**\n * Adds a cubic Bézier curve to the path, from the current point to the specified end point.\n * The curve is influenced by two control points that define its shape and curvature.\n * @example\n * ```ts\n * // Draw a simple curved line\n * const graphics = new Graphics();\n * graphics\n * .moveTo(50, 50)\n * .bezierCurveTo(\n * 100, 25, // First control point\n * 150, 75, // Second control point\n * 200, 50 // End point\n * )\n * .stroke({ width: 2, color: 0xff0000 });\n *\n * // Adjust curve smoothness\n * graphics\n * .moveTo(50, 200)\n * .bezierCurveTo(\n * 100, 150,\n * 200, 250,\n * 250, 200,\n * 0.5 // Smoothness factor\n * )\n * .stroke({ width: 4, color: 0x0000ff });\n * ```\n * @param cp1x - The x-coordinate of the first control point\n * @param cp1y - The y-coordinate of the first control point\n * @param cp2x - The x-coordinate of the second control point\n * @param cp2y - The y-coordinate of the second control point\n * @param x - The x-coordinate of the end point\n * @param y - The y-coordinate of the end point\n * @param smoothness - Optional parameter to adjust the curve's smoothness (0-1)\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#quadraticCurveTo} For simpler curves with one control point\n * @see {@link Graphics#arc} For circular arcs\n * @see {@link Graphics#arcTo} For connecting points with circular arcs\n */\n public bezierCurveTo(\n cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number, smoothness?: number\n ): this;\n public bezierCurveTo(...args: Parameters<GraphicsContext['bezierCurveTo']>): this\n {\n return this._callContextMethod('bezierCurveTo', args);\n }\n /**\n * Closes the current path by drawing a straight line back to the start point.\n *\n * This is useful for completing shapes and ensuring they are properly closed for fills.\n * @example\n * ```ts\n * // Create a triangle with closed path\n * const graphics = new Graphics();\n * graphics\n * .moveTo(50, 50)\n * .lineTo(100, 100)\n * .lineTo(0, 100)\n * .closePath()\n * ```\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#beginPath} For starting a new path\n * @see {@link Graphics#fill} For filling closed paths\n * @see {@link Graphics#stroke} For stroking paths\n */\n public closePath(): this\n {\n return this._callContextMethod('closePath', []);\n }\n /**\n * Draws an ellipse at the specified location and with the given x and y radii.\n * An optional transformation can be applied, allowing for rotation, scaling, and translation.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Draw a basic ellipse\n * graphics\n * .ellipse(100, 100, 50, 30)\n * .fill({ color: 0xff0000 });\n *\n * // Draw an ellipse with stroke\n * graphics\n * .ellipse(200, 100, 70, 40)\n * .stroke({ width: 2, color: 0x00ff00 });\n * ```\n * @param x - The x-coordinate of the center of the ellipse\n * @param y - The y-coordinate of the center of the ellipse\n * @param radiusX - The horizontal radius of the ellipse\n * @param radiusY - The vertical radius of the ellipse\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#circle} For drawing perfect circles\n * @see {@link Graphics#arc} For drawing partial circular arcs\n */\n public ellipse(x: number, y: number, radiusX: number, radiusY: number): this;\n public ellipse(...args: Parameters<GraphicsContext['ellipse']>): this\n {\n return this._callContextMethod('ellipse', args);\n }\n /**\n * Draws a circle shape at the specified location with the given radius.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Draw a simple filled circle\n * graphics\n * .circle(100, 100, 50)\n * .fill({ color: 0xff0000 });\n *\n * // Draw a circle with gradient fill\n * const gradient = new FillGradient({\n * end: { x: 1, y: 0 },\n * colorStops: [\n * { offset: 0, color: 0xff0000 }, // Red at start\n * { offset: 0.5, color: 0x00ff00 }, // Green at middle\n * { offset: 1, color: 0x0000ff }, // Blue at end\n * ],\n * });\n *\n * graphics\n * .circle(250, 100, 40)\n * .fill({ fill: gradient });\n * ```\n * @param x - The x-coordinate of the center of the circle\n * @param y - The y-coordinate of the center of the circle\n * @param radius - The radius of the circle\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#ellipse} For drawing ellipses\n * @see {@link Graphics#arc} For drawing partial circles\n */\n public circle(x: number, y: number, radius: number): this;\n public circle(...args: Parameters<GraphicsContext['circle']>): this\n {\n return this._callContextMethod('circle', args);\n }\n /**\n * Adds another `GraphicsPath` to this path, optionally applying a transformation.\n * This allows for reuse of complex paths and shapes across different graphics instances.\n * @example\n * ```ts\n * const graphics = new Graphics();\n * // Create a reusable path\n * const heartPath = new GraphicsPath()\n * .moveTo(0, 0)\n * .bezierCurveTo(-50, -25, -50, -75, 0, -100)\n * .bezierCurveTo(50, -75, 50, -25, 0, 0);\n *\n * // Use the path multiple times\n * graphics\n * .path(heartPath)\n * .fill({ color: 0xff0000 })\n * .translateTransform(200, 200)\n * .path(heartPath)\n * .fill({ color: 0xff0000, alpha: 0.5 });\n * ```\n * @param path - The `GraphicsPath` to add to the current path\n * @returns The Graphics instance for method chaining\n * @see {@link GraphicsPath} For creating reusable paths\n * @see {@link Matrix} For creating transformations\n * @see {@link Graphics#transform} For applying transformations\n */\n public path(path: GraphicsPath): this;\n public path(...args: Parameters<GraphicsContext['path']>): this\n {\n return this._callContextMethod('path', args);\n }\n /**\n * Connects the current point to a new point with a straight line.\n * Any subsequent drawing commands will start from this new point.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Draw a triangle\n * graphics\n * .moveTo(50, 50)\n * .lineTo(100, 100)\n * .lineTo(0, 100)\n * .fill({ color: 0xff0000 });\n *\n * // Create a complex shape with multiple lines\n * graphics\n * .moveTo(200, 50)\n * .lineTo(250, 50)\n * .lineTo(250, 100)\n * .lineTo(200, 100)\n * .stroke({ width: 2, color: 0x00ff00 });\n * ```\n * @param x - The x-coordinate of the line's end point\n * @param y - The y-coordinate of the line's end point\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#moveTo} For starting a new sub-path\n */\n public lineTo(x: number, y: number): this;\n public lineTo(...args: Parameters<GraphicsContext['lineTo']>): this\n {\n return this._callContextMethod('lineTo', args);\n }\n /**\n * Sets the starting point for a new sub-path.\n *\n * Moves the \"pen\" to a new location without drawing a line.\n * Any subsequent drawing commands will start from this point.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Create multiple separate lines\n * graphics\n * .moveTo(50, 50)\n * .lineTo(100, 50)\n * .moveTo(50, 100) // Start a new line\n * .lineTo(100, 100)\n * .stroke({ width: 2, color: 0xff0000 });\n *\n * // Create disconnected shapes\n * graphics\n * .moveTo(150, 50)\n * .rect(150, 50, 50, 50)\n * .fill({ color: 0x00ff00 })\n * .moveTo(250, 50) // Start a new shape\n * .circle(250, 75, 25)\n * .fill({ color: 0x0000ff });\n *\n * // Position before curved paths\n * graphics\n * .moveTo(300, 50)\n * .bezierCurveTo(\n * 350, 25, // Control point 1\n * 400, 75, // Control point 2\n * 450, 50 // End point\n * )\n * .stroke({ width: 3, color: 0xff00ff });\n * ```\n * @param x - The x-coordinate to move to\n * @param y - The y-coordinate to move to\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#lineTo} For drawing lines\n * @see {@link Graphics#beginPath} For starting a completely new path\n */\n public moveTo(x: number, y: number): this;\n public moveTo(...args: Parameters<GraphicsContext['moveTo']>): this\n {\n return this._callContextMethod('moveTo', args);\n }\n /**\n * Adds a quadratic curve to the path. It requires two points: the control point and the end point.\n * The starting point is the last point in the current path.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Draw a simple curve\n * graphics\n * .moveTo(50, 50)\n * .quadraticCurveTo(100, 25, 150, 50)\n * .stroke({ width: 2, color: 0xff0000 });\n *\n * // Adjust curve smoothness\n * graphics\n * .moveTo(50, 200)\n * .quadraticCurveTo(\n * 150, 150, // Control point\n * 250, 200, // End point\n * 0.5 // Smoothness factor\n * )\n * .stroke({\n * width: 4,\n * color: 0x0000ff,\n * alpha: 0.7\n * });\n * ```\n * @param cpx - The x-coordinate of the control point\n * @param cpy - The y-coordinate of the control point\n * @param x - The x-coordinate of the end point\n * @param y - The y-coordinate of the end point\n * @param smoothness - Optional parameter to adjust the curve's smoothness (0-1)\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#bezierCurveTo} For curves with two control points\n * @see {@link Graphics#arc} For circular arcs\n * @see {@link Graphics#arcTo} For connecting points with circular arcs\n */\n public quadraticCurveTo(cpx: number, cpy: number, x: number, y: number, smoothness?: number): this;\n public quadraticCurveTo(...args: Parameters<GraphicsContext['quadraticCurveTo']>): this\n {\n return this._callContextMethod('quadraticCurveTo', args);\n }\n /**\n * Draws a rectangle shape.\n *\n * This method adds a new rectangle path to the current drawing.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Draw a simple filled rectangle\n * graphics\n * .rect(50, 50, 100, 75)\n * .fill({ color: 0xff0000 });\n *\n * // Rectangle with stroke\n * graphics\n * .rect(200, 50, 100, 75)\n * .stroke({ width: 2, color: 0x00ff00 });\n * ```\n * @param x - The x-coordinate of the top-left corner of the rectangle\n * @param y - The y-coordinate of the top-left corner of the rectangle\n * @param w - The width of the rectangle\n * @param h - The height of the rectangle\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#roundRect} For drawing rectangles with rounded corners\n * @see {@link Graphics#filletRect} For drawing rectangles with filleted corners\n * @see {@link Graphics#chamferRect} For drawing rectangles with chamfered corners\n */\n\n public rect(x: number, y: number, w: number, h: number): this;\n public rect(...args: Parameters<GraphicsContext['rect']>): this\n {\n return this._callContextMethod('rect', args);\n }\n /**\n * Draws a rectangle with rounded corners. The corner radius can be specified to\n * determine how rounded the corners should be.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Basic rounded rectangle\n * graphics\n * .roundRect(50, 50, 100, 75, 15)\n * .fill({ color: 0xff0000 });\n * ```\n * @param x - The x-coordinate of the top-left corner of the rectangle\n * @param y - The y-coordinate of the top-left corner of the rectangle\n * @param w - The width of the rectangle\n * @param h - The height of the rectangle\n * @param radius - The radius of the rectangle's corners (must be non-negative)\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#rect} For drawing rectangles with sharp corners\n * @see {@link Graphics#filletRect} For drawing rectangles with filleted corners\n * @see {@link Graphics#chamferRect} For drawing rectangles with chamfered corners\n */\n public roundRect(x: number, y: number, w: number, h: number, radius?: number): this;\n public roundRect(...args: Parameters<GraphicsContext['roundRect']>): this\n {\n return this._callContextMethod('roundRect', args);\n }\n /**\n * Draws a polygon shape by specifying a sequence of points. This method allows for the creation of complex polygons,\n * which can be both open and closed.\n *\n * An optional transformation can be applied, enabling the polygon to be scaled,\n * rotated, or translated as needed.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Draw a triangle using array of numbers [x1,y1, x2,y2, x3,y3]\n * graphics\n * .poly([50,50, 100,100, 0,100], true)\n * .fill({ color: 0xff0000 });\n *\n * // Draw a polygon using point objects\n * graphics\n * .poly([\n * { x: 200, y: 50 },\n * { x: 250, y: 100 },\n * { x: 200, y: 150 },\n * { x: 150, y: 100 }\n * ])\n * .fill({ color: 0x00ff00 });\n *\n * // Draw an open polygon with stroke\n * graphics\n * .poly([300,50, 350,50, 350,100, 300,100], false)\n * .stroke({\n * width: 2,\n * color: 0x0000ff,\n * join: 'round'\n * });\n * ```\n * @param points - An array of numbers [x1,y1, x2,y2, ...] or an array of point objects [{x,y}, ...]\n * representing the vertices of the polygon in sequence\n * @param close - Whether to close the polygon path by connecting the last point to the first.\n * Default is true.\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#regularPoly} For drawing regular polygons\n * @see {@link Graphics#roundPoly} For drawing polygons with rounded corners\n * @see {@link Graphics#star} For drawing star shapes\n */\n public poly(points: number[] | PointData[], close?: boolean): this;\n public poly(...args: Parameters<GraphicsContext['poly']>): this\n {\n return this._callContextMethod('poly', args);\n }\n /**\n * Draws a regular polygon with a specified number of sides. All sides and angles are equal,\n * making shapes like triangles, squares, pentagons, etc.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Draw a simple triangle (3 sides)\n * graphics\n * .regularPoly(100, 100, 50, 3)\n * .fill({ color: 0xff0000 });\n *\n * // Draw a hexagon (6 sides) with rotation\n * graphics\n * .regularPoly(\n * 250, 100, // center position\n * 40, // radius\n * 6, // sides\n * Math.PI / 6 // rotation (30 degrees)\n * )\n * .fill({ color: 0x00ff00 })\n * .stroke({ width: 2, color: 0x000000 });\n *\n * // Draw an octagon (8 sides) with transform\n * const transform = new Matrix()\n * .scale(1.5, 1) // stretch horizontally\n * .rotate(Math.PI/4); // rotate 45 degrees\n *\n * graphics\n * .regularPoly(400, 100, 30, 8, 0, transform)\n * .fill({ color: 0x0000ff, alpha: 0.5 });\n * ```\n * @param x - The x-coordinate of the center of the polygon\n * @param y - The y-coordinate of the center of the polygon\n * @param radius - The radius of the circumscribed circle of the polygon\n * @param sides - The number of sides of the polygon (must be 3 or more)\n * @param rotation - The rotation angle of the polygon in radians (default: 0)\n * @param transform - Optional Matrix to transform the polygon's shape\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#poly} For drawing custom polygons\n * @see {@link Graphics#roundPoly} For drawing polygons with rounded corners\n * @see {@link Graphics#star} For drawing star shapes\n */\n public regularPoly(x: number, y: number, radius: number, sides: number, rotation?: number, transform?: Matrix): this;\n public regularPoly(...args: Parameters<GraphicsContext['regularPoly']>): this\n {\n return this._callContextMethod('regularPoly', args);\n }\n /**\n * Draws a polygon with rounded corners.\n *\n * Similar to `regularPoly` but with the ability to round the corners of the polygon.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Draw a basic rounded triangle\n * graphics\n * .roundPoly(100, 100, 50, 3, 10)\n * .fill({ color: 0xff0000 });\n *\n * // Draw a rounded hexagon with rotation\n * graphics\n * .roundPoly(\n * 250, 150, // center position\n * 40, // radius\n * 6, // sides\n * 8, // corner radius\n * Math.PI / 6 // rotation (30 degrees)\n * )\n * .fill({ color: 0x00ff00 })\n * .stroke({ width: 2, color: 0x000000 });\n * ```\n * @param x - The x-coordinate of the center of the polygon\n * @param y - The y-coordinate of the center of the polygon\n * @param radius - The radius of the circumscribed circle of the polygon\n * @param sides - The number of sides of the polygon (must be 3 or more)\n * @param corner - The radius of the corner rounding (must be non-negative)\n * @param rotation - The rotation angle of the polygon in radians (default: 0)\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#regularPoly} For drawing polygons without rounded corners\n * @see {@link Graphics#poly} For drawing custom polygons\n * @see {@link Graphics#roundRect} For drawing rectangles with rounded corners\n */\n public roundPoly(x: number, y: number, radius: number, sides: number, corner: number, rotation?: number): this;\n public roundPoly(...args: Parameters<GraphicsContext['roundPoly']>): this\n {\n return this._callContextMethod('roundPoly', args);\n }\n /**\n * Draws a shape with rounded corners. This function supports custom radius for each corner of the shape.\n * Optionally, corners can be rounded using a quadratic curve instead of an arc, providing a different aesthetic.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Draw a custom shape with rounded corners\n * graphics\n * .roundShape([\n * { x: 100, y: 100, radius: 20 },\n * { x: 200, y: 100, radius: 10 },\n * { x: 200, y: 200, radius: 15 },\n * { x: 100, y: 200, radius: 5 }\n * ], 10)\n * .fill({ color: 0xff0000 });\n *\n * // Using quadratic curves for corners\n * graphics\n * .roundShape([\n * { x: 250, y: 100 },\n * { x: 350, y: 100 },\n * { x: 350, y: 200 },\n * { x: 250, y: 200 }\n * ], 15, true, 0.5)\n * .fill({ color: 0x00ff00 })\n * .stroke({ width: 2, color: 0x000000 });\n *\n * // Shape with varying corner radii\n * graphics\n * .roundShape([\n * { x: 400, y: 100, radius: 30 },\n * { x: 500, y: 100, radius: 5 },\n * { x: 450, y: 200, radius: 15 }\n * ], 10)\n * .fill({ color: 0x0000ff, alpha: 0.5 });\n * ```\n * @param points - An array of `RoundedPoint` representing the corners of the shape.\n * Each point can have its own radius or use the default.\n * A minimum of 3 points is required.\n * @param radius - The default radius for corners without a specific radius defined.\n * Applied to any point that doesn't specify its own radius.\n * @param useQuadratic - When true, corners are drawn using quadratic curves instead\n * of arcs, creating a different visual style. Defaults to false.\n * @param smoothness - Controls the smoothness of quadratic corners when useQuadratic\n * is true. Values range from 0-1, higher values create smoother curves.\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#roundRect} For drawing rectangles with rounded corners\n * @see {@link Graphics#roundPoly} For drawing regular polygons with rounded corners\n */\n public roundShape(points: RoundedPoint[], radius: number, useQuadratic?: boolean, smoothness?: number): this;\n public roundShape(...args: Parameters<GraphicsContext['roundShape']>): this\n {\n return this._callContextMethod('roundShape', args);\n }\n /**\n * Draws a rectangle with fillet corners. Unlike rounded rectangles, this supports negative corner\n * radii which create external rounded corners rather than internal ones.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Draw a rectangle with internal fillets\n * graphics\n * .filletRect(50, 50, 100, 80, 15)\n * .fill({ color: 0xff0000 });\n *\n * // Draw a rectangle with external fillets\n * graphics\n * .filletRect(200, 50, 100, 80, -20)\n * .fill({ color: 0x00ff00 })\n * .stroke({ width: 2, color: 0x000000 });\n * ```\n * @param x - The x-coordinate of the top-left corner of the rectangle\n * @param y - The y-coordinate of the top-left corner of the rectangle\n * @param width - The width of the rectangle\n * @param height - The height of the rectangle\n * @param fillet - The radius of the corner fillets (can be positive or negative)\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#roundRect} For standard rounded corners\n * @see {@link Graphics#chamferRect} For angled corners\n */\n public filletRect(x: number, y: number, width: number, height: number, fillet: number): this;\n public filletRect(...args: Parameters<GraphicsContext['filletRect']>): this\n {\n return this._callContextMethod('filletRect', args);\n }\n /**\n * Draws a rectangle with chamfered (angled) corners. Each corner is cut off at\n * a 45-degree angle based on the chamfer size.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Draw a basic chamfered rectangle\n * graphics\n * .chamferRect(50, 50, 100, 80, 15)\n * .fill({ color: 0xff0000 });\n *\n * // Add transform and stroke\n * const transform = new Matrix()\n * .rotate(Math.PI / 4); // 45 degrees\n *\n * graphics\n * .chamferRect(200, 50, 100, 80, 20, transform)\n * .fill({ color: 0x00ff00 })\n * .stroke({ width: 2, color: 0x000000 });\n * ```\n * @param x - The x-coordinate of the top-left corner of the rectangle\n * @param y - The y-coordinate of the top-left corner of the rectangle\n * @param width - The width of the rectangle\n * @param height - The height of the rectangle\n * @param chamfer - The size of the corner chamfers (must be non-zero)\n * @param transform - Optional Matrix to transform the rectangle\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#roundRect} For rounded corners\n * @see {@link Graphics#filletRect} For rounded corners with negative radius support\n */\n public chamferRect(x: number, y: number, width: number, height: number, chamfer: number, transform?: Matrix): this;\n public chamferRect(...args: Parameters<GraphicsContext['chamferRect']>): this\n {\n return this._callContextMethod('chamferRect', args);\n }\n /**\n * Draws a star shape centered at a specified location. This method allows for the creation\n * of stars with a variable number of points, outer radius, optional inner radius, and rotation.\n *\n * The star is drawn as a closed polygon with alternating outer and inner vertices to create the star's points.\n * An optional transformation can be applied to scale, rotate, or translate the star as needed.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Draw a basic 5-pointed star\n * graphics\n * .star(100, 100, 5, 50)\n * .fill({ color: 0xff0000 });\n *\n * // Star with custom inner radius\n * graphics\n * .star(250, 100, 6, 50, 20)\n * .fill({ color: 0x00ff00 })\n * .stroke({ width: 2, color: 0x000000 });\n * ```\n * @param x - The x-coordinate of the center of the star\n * @param y - The y-coordinate of the center of the star\n * @param points - The number of points on the star (must be >= 3)\n * @param radius - The outer radius of the star (distance from center to point tips)\n * @param innerRadius - Optional. The inner radius of the star (distance from center to inner vertices).\n * If not specified, defaults to half of the outer radius\n * @param rotation - Optional. The rotation of the star in radians. Default is 0,\n * which aligns one point straight up\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#regularPoly} For drawing regular polygons\n * @see {@link Graphics#poly} For drawing custom polygons\n * @see {@link Graphics#path} For creating custom shapes\n */\n public star(x: number, y: number, points: number, radius: number, innerRadius?: number, rotation?: number): this;\n public star(...args: Parameters<GraphicsContext['star']>): this\n {\n return this._callContextMethod('star', args);\n }\n /**\n * Parses and renders an SVG string into the graphics context. This allows for complex shapes\n * and paths defined in SVG format to be drawn within the graphics context.\n * @example\n * ```ts\n * const graphics = new Graphics();\n * graphics\n * .svg(`\n * <path d=\"M 50,50 L 100,50 L 100,100 L 50,100 Z\"\n * fill=\"blue\" />\n * <circle cx=\"150\" cy=\"75\" r=\"25\"\n * fill=\"green\" />\n * `)\n * .stroke({ width: 2, color: 0x000000 });\n * ```\n * @param svg - The SVG string to be parsed and rendered\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#path} For adding custom paths\n * @see {@link Graphics#fill} For filling shapes after SVG parsing\n * @see {@link Graphics#stroke} For stroking shapes after SVG parsing\n */\n public svg(svg: string): this;\n public svg(...args: Parameters<GraphicsContext['svg']>): this\n {\n return this._callContextMethod('svg', args);\n }\n /**\n * Restores the most recently saved graphics state by popping the top of the graphics state stack.\n * This includes transformations, fill styles, and stroke styles.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Save current state\n * graphics.save();\n *\n * // Make temporary changes\n * graphics\n * .translateTransform(100, 100)\n * .setFillStyle({ color: 0xff0000 })\n * .circle(0, 0, 50)\n * .fill();\n *\n * // Restore to previous state\n * graphics.restore();\n *\n * // Draw with original transform and styles\n * graphics\n * .circle(50, 50, 30)\n * .fill();\n * ```\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#save} For saving the current state\n */\n public restore(): this;\n public restore(...args: Parameters<GraphicsContext['restore']>): this\n {\n return this._callContextMethod('restore', args);\n }\n /**\n * Saves the current graphics state onto a stack. The state includes:\n * - Current transformation matrix\n * - Current fill style\n * - Current stroke style\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Save state before complex operations\n * graphics.save();\n *\n * // Create transformed and styled shape\n * graphics\n * .translateTransform(100, 100)\n * .rotateTransform(Math.PI / 4)\n * .setFillStyle({\n * color: 0xff0000,\n * alpha: 0.5\n * })\n * .rect(-25, -25, 50, 50)\n * .fill();\n *\n * // Restore to original state\n * graphics.restore();\n *\n * // Continue drawing with previous state\n * graphics\n * .circle(50, 50, 25)\n * .fill();\n * ```\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#restore} For restoring the saved state\n * @see {@link Graphics#setTransform} For setting transformations\n */\n public save(): this\n {\n return this._callContextMethod('save', []);\n }\n /**\n * Returns the current transformation matrix of the graphics context.\n * This matrix represents all accumulated transformations including translate, scale, and rotate.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Apply some transformations\n * graphics\n * .translateTransform(100, 100)\n * .rotateTransform(Math.PI / 4);\n *\n * // Get the current transform matrix\n * const matrix = graphics.getTransform();\n * console.log(matrix.tx, matrix.ty); // 100, 100\n *\n * // Use the matrix for other operations\n * graphics\n * .setTransform(matrix)\n * .circle(0, 0, 50)\n * .fill({ color: 0xff0000 });\n * ```\n * @returns The current transformation matrix.\n * @see {@link Graphics#setTransform} For setting the transform matrix\n * @see {@link Matrix} For matrix operations\n */\n public getTransform(): Matrix\n {\n return this.context.getTransform();\n }\n /**\n * Resets the current transformation matrix to the identity matrix, effectively removing\n * any transformations (rotation, scaling, translation) previously applied.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Apply transformations\n * graphics\n * .translateTransform(100, 100)\n * .scaleTransform(2, 2)\n * .circle(0, 0, 25)\n * .fill({ color: 0xff0000 });\n * // Reset transform to default state\n * graphics\n * .resetTransform()\n * .circle(50, 50, 25) // Will draw at actual coordinates\n * .fill({ color: 0x00ff00 });\n * ```\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#getTransform} For getting the current transform\n * @see {@link Graphics#setTransform} For setting a specific transform\n * @see {@link Graphics#save} For saving the current transform state\n * @see {@link Graphics#restore} For restoring a previous transform state\n */\n public resetTransform(): this\n {\n return this._callContextMethod('resetTransform', []);\n }\n /**\n * Applies a rotation transformation to the graphics context around the current origin.\n * Positive angles rotate clockwise, while negative angles rotate counterclockwise.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Rotate 45 degrees clockwise\n * graphics\n * .rotateTransform(Math.PI / 4)\n * .rect(-25, -25, 50, 50)\n * .fill({ color: 0xff0000 });\n * ```\n * @param angle - The angle of rotation in radians\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#scaleTransform} For scaling transformations\n * @see {@link Graphics#translateTransform} For position transformations\n */\n public rotateTransform(angle: number): this;\n public rotateTransform(...args: Parameters<GraphicsContext['rotate']>): this\n {\n return this._callContextMethod('rotate', args);\n }\n /**\n * Applies a scaling transformation to the graphics context, scaling drawings by x horizontally\n * and by y vertically relative to the current origin.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Uniform scaling\n * graphics\n * .scaleTransform(2) // Scale both dimensions by 2\n * .circle(0, 0, 25)\n * .fill({ color: 0xff0000 });\n *\n * // Non-uniform scaling\n * graphics\n * .scaleTransform(0.5, 2) // Half width, double height\n * .rect(100, 100, 50, 50)\n * .fill({ color: 0x00ff00 });\n * ```\n * @param x - The scale factor in the horizontal direction\n * @param y - The scale factor in the vertical direction. If omitted, equals x\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#rotateTransform} For rotation transformations\n * @see {@link Graphics#translateTransform} For position transformations\n */\n public scaleTransform(x: number, y?: number): this;\n public scaleTransform(...args: Parameters<GraphicsContext['scale']>): this\n {\n return this._callContextMethod('scale', args);\n }\n /**\n * Sets the current transformation matrix of the graphics context.\n *\n * This method can either\n * take a Matrix object or individual transform values to create a new transformation matrix.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Using a Matrix object\n * const matrix = new Matrix()\n * .translate(100, 100)\n * .rotate(Math.PI / 4);\n *\n * graphics\n * .setTransform(matrix)\n * .rect(0, 0, 50, 50)\n * .fill({ color: 0xff0000 });\n *\n * // Using individual transform values\n * graphics\n * .setTransform(\n * 2, 0, // scale x by 2\n * 0, 1, // no skew\n * 100, 100 // translate x,y by 100\n * )\n * .circle(0, 0, 25)\n * .fill({ color: 0x00ff00 });\n * ```\n * @param transform - The matrix to set as the current transformation matrix.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public setTransform(transform: Matrix): this;\n /**\n * Sets the current transformation matrix of the graphics context to the specified matrix or values.\n * This replaces the current transformation matrix.\n * @param a - The value for the a property of the matrix, or a Matrix object to use directly.\n * @param b - The value for the b property of the matrix.\n * @param c - The value for the c property of the matrix.\n * @param d - The value for the d property of the matrix.\n * @param dx - The value for the tx (translate x) property of the matrix.\n * @param dy - The value for the ty (translate y) property of the matrix.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public setTransform(a: number, b: number, c: number, d: number, dx: number, dy: number): this;\n public setTransform(a: number | Matrix, b?: number, c?: number, d?: number, dx?: number, dy?: number): this;\n public setTransform(...args: [Matrix] | [number, number, number, number, number, number]): this\n {\n return this._callContextMethod('setTransform', args);\n }\n /**\n * Applies a transformation matrix to the current graphics context by multiplying\n * the current matrix with the specified matrix. This allows for complex transformations\n * combining multiple operations.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Using a Matrix object\n * const matrix = new Matrix()\n * .scale(2, 1) // Scale horizontally\n * .rotate(Math.PI/6); // Rotate 30 degrees\n *\n * graphics\n * .transform(matrix)\n * .rect(0, 0, 50, 50)\n * .fill({ color: 0xff0000 });\n *\n * // Using individual transform values\n * graphics\n * .transform(\n * 1, 0.5, // Skew horizontally\n * 0, 1, // No vertical skew\n * 100, 100 // Translate\n * )\n * .circle(0, 0, 25)\n * .fill({ color: 0x00ff00 });\n * ```\n * @param transform - The matrix to apply to the current transformation.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public transform(transform: Matrix): this;\n /**\n * Applies the specified transformation matrix to the current graphics context by multiplying\n * the current matrix with the specified matrix.\n * @param a - The value for the a property of the matrix, or a Matrix object to use directly.\n * @param b - The value for the b property of the matrix.\n * @param c - The value for the c property of the matrix.\n * @param d - The value for the d property of the matrix.\n * @param dx - The value for the tx (translate x) property of the matrix.\n * @param dy - The value for the ty (translate y) property of the matrix.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public transform(a: number, b: number, c: number, d: number, dx: number, dy: number): this;\n public transform(a: number | Matrix, b?: number, c?: number, d?: number, dx?: number, dy?: number): this;\n public transform(...args: [Matrix] | [number, number, number, number, number, number]): this\n {\n return this._callContextMethod('transform', args);\n }\n /**\n * Applies a translation transformation to the graphics context, moving the origin by the specified amounts.\n * This affects all subsequent drawing operations.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Basic translation\n * graphics\n * .translateTransform(100, 100)\n * .circle(0, 0, 25)\n * .fill({ color: 0xff0000 });\n * ```\n * @param x - The amount to translate in the horizontal direction\n * @param y - The amount to translate in the vertical direction. If omitted, equals x\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#setTransform} For setting absolute transformations\n * @see {@link Graphics#transform} For applying complex transformations\n * @see {@link Graphics#save} For saving the current transform state\n */\n public translateTransform(x: number, y?: number): this;\n public translateTransform(...args: Parameters<GraphicsContext['translate']>): this\n {\n return this._callContextMethod('translate', args);\n }\n /**\n * Clears all drawing commands from the graphics context, effectively resetting it.\n * This includes clearing the current path, fill style, stroke style, and transformations.\n *\n * > [!NOTE] Graphics objects are not designed to be continuously cleared and redrawn.\n * > Instead, they are intended to be used for static or semi-static graphics that\n * > can be redrawn as needed. Frequent clearing and redrawing may lead to performance issues.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Draw some shapes\n * graphics\n * .circle(100, 100, 50)\n * .fill({ color: 0xff0000 })\n * .rect(200, 100, 100, 50)\n * .fill({ color: 0x00ff00 });\n *\n * // Clear all graphics\n * graphics.clear();\n *\n * // Start fresh with new shapes\n * graphics\n * .circle(150, 150, 30)\n * .fill({ color: 0x0000ff });\n * ```\n * @returns The Graphics instance for method chaining\n * @see {@link Graphics#beginPath} For starting a new path without clearing styles\n * @see {@link Graphics#save} For saving the current state\n * @see {@link Graphics#restore} For restoring a previous state\n */\n public clear(): this\n {\n return this._callContextMethod('clear', []);\n }\n /**\n * Gets or sets the current fill style for the graphics context. The fill style determines\n * how shapes are filled when using the fill() method.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Basic color fill\n * graphics.fillStyle = {\n * color: 0xff0000, // Red\n * alpha: 1\n * };\n *\n * // Using gradients\n * const gradient = new FillGradient({\n * end: { x: 0, y: 1 }, // Vertical gradient\n * stops: [\n * { offset: 0, color: 0xff0000, alpha: 1 }, // Start color\n * { offset: 1, color: 0x0000ff, alpha: 1 } // End color\n * ]\n * });\n *\n * graphics.fillStyle = {\n * fill: gradient,\n * alpha: 0.8\n * };\n *\n * // Using patterns\n * graphics.fillStyle = {\n * texture: myTexture,\n * alpha: 1,\n * matrix: new Matrix()\n * .scale(0.5, 0.5)\n * .rotate(Math.PI / 4)\n * };\n * ```\n * @type {ConvertedFillStyle}\n * @see {@link FillStyle} For all available fill style options\n * @see {@link FillGradient} For creating gradient fills\n * @see {@link Graphics#fill} For applying the fill to paths\n */\n get fillStyle(): GraphicsContext['fillStyle']\n {\n return this._context.fillStyle;\n }\n set fillStyle(value: FillInput)\n {\n this._context.fillStyle = value;\n }\n /**\n * Gets or sets the current stroke style for the graphics context. The stroke style determines\n * how paths are outlined when using the stroke() method.\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Basic stroke style\n * graphics.strokeStyle = {\n * width: 2,\n * color: 0xff0000,\n * alpha: 1\n * };\n *\n * // Using with gradients\n * const gradient = new FillGradient({\n * end: { x: 0, y: 1 },\n * stops: [\n * { offset: 0, color: 0xff0000, alpha: 1 },\n * { offset: 1, color: 0x0000ff, alpha: 1 }\n * ]\n * });\n *\n * graphics.strokeStyle = {\n * width: 4,\n * fill: gradient,\n * alignment: 0.5,\n * join: 'round',\n * cap: 'round'\n * };\n *\n * // Complex stroke settings\n * graphics.strokeStyle = {\n * width: 6,\n * color: 0x00ff00,\n * alpha: 0.5,\n * join: 'miter',\n * miterLimit: 10,\n * };\n * ```\n * @see {@link StrokeStyle} For all available stroke style options\n * @see {@link Graphics#stroke} For applying the stroke to paths\n */\n get strokeStyle(): GraphicsContext['strokeStyle']\n {\n return this._context.strokeStyle;\n }\n set strokeStyle(value: StrokeStyle)\n {\n this._context.strokeStyle = value;\n }\n\n /**\n * Creates a new Graphics object that copies the current graphics content.\n * The clone can either share the same context (shallow clone) or have its own independent\n * context (deep clone).\n * @example\n * ```ts\n * const graphics = new Graphics();\n *\n * // Create original graphics content\n * graphics\n * .circle(100, 100, 50)\n * .fill({ color: 0xff0000 });\n *\n * // Create a shallow clone (shared context)\n * const shallowClone = graphics.clone();\n *\n * // Changes to original affect the clone\n * graphics\n * .circle(200, 100, 30)\n * .fill({ color: 0x00ff00 });\n *\n * // Create a deep clone (independent context)\n * const deepClone = graphics.clone(true);\n *\n * // Modify deep clone independently\n * deepClone\n * .translateTransform(100, 100)\n * .circle(0, 0, 40)\n * .fill({ color: 0x0000ff });\n * ```\n * @param deep - Whether to create a deep clone of the graphics object.\n * If false (default), the context will be shared between objects.\n * If true, creates an independent copy of the context.\n * @returns A new Graphics instance with either shared or copied context\n * @see {@link Graphics#context} For accessing the underlying graphics context\n * @see {@link GraphicsContext} For understanding the shared context behavior\n */\n public clone(deep = false): Graphics\n {\n if (deep)\n {\n return new Graphics(this._context.clone());\n }\n\n (this._ownedContext as null) = null;\n const clone = new Graphics(this._context);\n\n return clone;\n }\n\n // -------- v7 deprecations ---------\n\n /**\n * @param width\n * @param color\n * @param alpha\n * @deprecated since 8.0.0 Use {@link Graphics#setStrokeStyle} instead\n */\n public lineStyle(width?: number, color?: ColorSource, alpha?: number): this\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'Graphics#lineStyle is no longer needed. Use Graphics#setStrokeStyle to set the stroke style.');\n // #endif\n\n const strokeStyle: Partial<StrokeStyle> = {};\n\n // avoid undefined assignment\n width && (strokeStyle.width = width);\n color && (strokeStyle.color = color);\n alpha && (strokeStyle.alpha = alpha);\n\n this.context.strokeStyle = strokeStyle;\n\n return this;\n }\n\n /**\n * @param color\n * @param alpha\n * @deprecated since 8.0.0 Use {@link Graphics#fill} instead\n */\n public beginFill(color: ColorSource, alpha?: number)\n {\n // #if _DEBUG\n // eslint-disable-next-line max-len\n deprecation(v8_0_0, 'Graphics#beginFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.');\n // #endif\n\n const fillStyle: Partial<FillStyle> = {};\n\n // avoid undefined assignment\n if (color !== undefined) fillStyle.color = color;\n if (alpha !== undefined) fillStyle.alpha = alpha;\n\n this.context.fillStyle = fillStyle;\n\n return this;\n }\n\n /**\n * @deprecated since 8.0.0 Use {@link Graphics#fill} instead\n */\n public endFill()\n {\n // #if _DEBUG\n // eslint-disable-next-line max-len\n deprecation(v8_0_0, 'Graphics#endFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.');\n // #endif\n\n this.context.fill();\n const strokeStyle = this.context.strokeStyle;\n\n if (strokeStyle.width !== GraphicsContext.defaultStrokeStyle.width\n || strokeStyle.color !== GraphicsContext.defaultStrokeStyle.color\n || strokeStyle.alpha !== GraphicsContext.defaultStrokeStyle.alpha)\n {\n this.context.stroke();\n }\n\n return this;\n }\n\n /**\n * @param {...any} args\n * @deprecated since 8.0.0 Use {@link Graphics#circle} instead\n */\n public drawCircle(...args: Parameters<GraphicsContext['circle']>): this\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'Graphics#drawCircle has been renamed to Graphics#circle');\n // #endif\n\n return this._callContextMethod('circle', args);\n }\n\n /**\n * @param {...any} args\n * @deprecated since 8.0.0 Use {@link Graphics#ellipse} instead\n */\n public drawEllipse(...args: Parameters<GraphicsContext['ellipse']>): this\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'Graphics#drawEllipse has been renamed to Graphics#ellipse');\n // #endif\n\n return this._callContextMethod('ellipse', args);\n }\n\n /**\n * @param {...any} args\n * @deprecated since 8.0.0 Use {@link Graphics#poly} instead\n */\n public drawPolygon(...args: Parameters<GraphicsContext['poly']>): this\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'Graphics#drawPolygon has been renamed to Graphics#poly');\n // #endif\n\n return this._callContextMethod('poly', args);\n }\n\n /**\n * @param {...any} args\n * @deprecated since 8.0.0 Use {@link Graphics#rect} instead\n */\n public drawRect(...args: Parameters<GraphicsContext['rect']>): this\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'Graphics#drawRect has been renamed to Graphics#rect');\n // #endif\n\n return this._callContextMethod('rect', args);\n }\n\n /**\n * @param {...any} args\n * @deprecated since 8.0.0 Use {@link Graphics#roundRect} instead\n */\n public drawRoundedRect(...args: Parameters<GraphicsContext['roundRect']>): this\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'Graphics#drawRoundedRect has been renamed to Graphics#roundRect');\n // #endif\n\n return this._callContextMethod('roundRect', args);\n }\n\n /**\n * @param {...any} args\n * @deprecated since 8.0.0 Use {@link Graphics#star} instead\n */\n public drawStar(...args: Parameters<GraphicsContext['star']>): this\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'Graphics#drawStar has been renamed to Graphics#star');\n // #endif\n\n return this._callContextMethod('star', args);\n }\n}\n","import { Color } from '../../../../color/Color';\nimport { Texture } from '../../../../rendering/renderers/shared/texture/Texture';\nimport { FillGradient } from '../fill/FillGradient';\nimport { FillPattern } from '../fill/FillPattern';\n\nimport type { ColorSource } from '../../../../color/Color';\nimport type {\n ConvertedFillStyle,\n ConvertedStrokeStyle,\n FillInput,\n FillStyle,\n StrokeInput,\n} from '../FillTypes';\n\nfunction isColorLike(value: unknown): value is ColorSource\n{\n return Color.isColorLike(value as ColorSource);\n}\n\nfunction isFillPattern(value: unknown): value is FillPattern\n{\n return value instanceof FillPattern;\n}\n\nfunction isFillGradient(value: unknown): value is FillGradient\n{\n return value instanceof FillGradient;\n}\n\nfunction isTexture(value: unknown): value is Texture\n{\n return value instanceof Texture;\n}\n\n/**\n * Handles the case where the value is a ColorLike\n * @param fill\n * @param value\n * @param defaultStyle\n * @example\n * graphics.fill(0xff0000)\n * graphics.fill(new Color(0xff0000))\n * graphics.fill({ r: 255, g: 0, b: 0 })\n */\nfunction handleColorLike(\n fill: FillStyle,\n value: ColorSource,\n defaultStyle: ConvertedFillStyle\n): ConvertedFillStyle\n{\n const temp = Color.shared.setValue(value ?? 0);\n\n fill.color = temp.toNumber();\n fill.alpha = temp.alpha === 1 ? defaultStyle.alpha : temp.alpha;\n fill.texture = Texture.WHITE;\n\n return { ...defaultStyle, ...fill } as ConvertedFillStyle;\n}\n\n/**\n * Handles the case where the value is a Texture\n * @param fill\n * @param value\n * @param defaultStyle\n * @example\n * graphics.fill(new Texture(0xff0000))\n */\nfunction handleTexture(fill: FillStyle, value: Texture, defaultStyle: ConvertedFillStyle): ConvertedFillStyle\n{\n fill.texture = value;\n\n return { ...defaultStyle, ...fill } as ConvertedFillStyle;\n}\n\n/**\n * Handles the case where the value is a FillPattern\n * @param fill\n * @param value\n * @param defaultStyle\n * @example\n * graphics.fill(new FillPattern(0xff0000))\n */\nfunction handleFillPattern(\n fill: FillStyle,\n value: FillPattern,\n defaultStyle: ConvertedFillStyle\n): ConvertedFillStyle\n{\n fill.fill = value;\n fill.color = 0xffffff;\n fill.texture = value.texture;\n fill.matrix = value.transform;\n fill.textureSpace = value.textureSpace;\n\n return { ...defaultStyle, ...fill } as ConvertedFillStyle;\n}\n\n/**\n * Handles the case where the value is a FillGradient\n * @param fill\n * @param value\n * @param defaultStyle\n * @example\n * graphics.fill(new FillGradient(0, 0, 200, 0))\n */\nfunction handleFillGradient(\n fill: FillStyle,\n value: FillGradient,\n defaultStyle: ConvertedFillStyle\n): ConvertedFillStyle\n{\n value.buildGradient();\n fill.fill = value;\n fill.color = 0xffffff;\n fill.texture = value.texture;\n fill.matrix = value.transform;\n fill.textureSpace = value.textureSpace;\n\n return { ...defaultStyle, ...fill } as ConvertedFillStyle;\n}\n\n/**\n * Handles the case where the value is not a direct Pixi Color, PatternFill, or GradientFill but instead\n * an object with potentially `color`\n * @example\n * {\n * color: new Color(0xff0000)\n * alpha: 0.5,\n * texture?: null,\n * matrix?: null,\n * }\n * @param value\n * @param defaultStyle\n */\nfunction handleFillObject(value: FillStyle, defaultStyle: ConvertedFillStyle): ConvertedFillStyle\n{\n const style = { ...defaultStyle, ...(value as FillStyle) };\n\n const color = Color.shared.setValue(style.color);\n\n style.alpha *= color.alpha;\n style.color = color.toNumber();\n\n return style as ConvertedFillStyle;\n}\n\n/**\n * Converts a value to a fill style, we do this as PixiJS has a number of ways to define a fill style\n * They can be a direct color, a texture, a gradient, or an object with these values in them\n * This function will take any of these input types and convert them into a single object\n * that PixiJS can understand and use internally.\n * @param value - The value to convert to a fill style\n * @param defaultStyle - The default fill style to use\n * @private\n */\nexport function toFillStyle<T extends FillInput>(\n value: T,\n defaultStyle: ConvertedFillStyle\n): ConvertedFillStyle\n{\n if (value === undefined || value === null)\n {\n return null;\n }\n\n const fill: ConvertedFillStyle = {} as ConvertedFillStyle;\n const objectStyle = value as FillStyle;\n\n if (isColorLike(value))\n {\n return handleColorLike(fill, value, defaultStyle);\n }\n else if (isTexture(value))\n {\n return handleTexture(fill, value, defaultStyle);\n }\n else if (isFillPattern(value))\n {\n return handleFillPattern(fill, value, defaultStyle);\n }\n else if (isFillGradient(value))\n {\n return handleFillGradient(fill, value, defaultStyle);\n }\n else if (objectStyle.fill && isFillPattern(objectStyle.fill))\n {\n return handleFillPattern(objectStyle, objectStyle.fill, defaultStyle);\n }\n else if (objectStyle.fill && isFillGradient(objectStyle.fill))\n {\n return handleFillGradient(objectStyle, objectStyle.fill, defaultStyle);\n }\n\n return handleFillObject(objectStyle, defaultStyle);\n}\n\n/**\n * Converts a value to a stroke style, similar to `toFillStyle` but for strokes\n * @param value - The value to convert to a stroke style\n * @param defaultStyle - The default stroke style to use\n * @private\n */\nexport function toStrokeStyle(value: StrokeInput, defaultStyle: ConvertedStrokeStyle): ConvertedStrokeStyle\n{\n const { width, alignment, miterLimit, cap, join, pixelLine, ...rest } = defaultStyle;\n const fill = toFillStyle(value, rest);\n\n if (!fill)\n {\n return null;\n }\n\n return {\n width,\n alignment,\n miterLimit,\n cap,\n join,\n pixelLine,\n ...fill,\n };\n}\n","import { extensions } from '../../extensions/Extensions';\nimport { CanvasGraphicsContextSystem } from './canvas/CanvasGraphicsContextSystem';\nimport { CanvasGraphicsPipe } from './canvas/CanvasGraphicsPipe';\nimport { GraphicsContextSystem } from './shared/GraphicsContextSystem';\nimport { GraphicsPipe } from './shared/GraphicsPipe';\n\nextensions.add(CanvasGraphicsPipe);\nextensions.add(GraphicsPipe);\nextensions.add(CanvasGraphicsContextSystem);\nextensions.add(GraphicsContextSystem);\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { State } from '../../../rendering/renderers/shared/state/State';\nimport { type Renderer } from '../../../rendering/renderers/types';\nimport { GCManagedHash } from '../../../utils/data/GCManagedHash';\nimport { BigPool } from '../../../utils/pool/PoolGroup';\nimport { type GPUData } from '../../view/ViewContainer';\nimport { color32BitToUniform } from '../gpu/colorToUniform';\nimport { BatchableGraphics } from './BatchableGraphics';\n\nimport type { InstructionSet } from '../../../rendering/renderers/shared/instructions/InstructionSet';\nimport type { RenderPipe } from '../../../rendering/renderers/shared/instructions/RenderPipe';\nimport type { Shader } from '../../../rendering/renderers/shared/shader/Shader';\nimport type { PoolItem } from '../../../utils/pool/Pool';\nimport type { Graphics } from './Graphics';\nimport type { GpuGraphicsContext, GraphicsContextSystem } from './GraphicsContextSystem';\n\n/** @internal */\nexport interface GraphicsPipeLike\n{\n renderer: Renderer;\n state: State;\n}\n\n/** @internal */\nexport interface GraphicsAdaptor\n{\n shader: Shader;\n contextChange(renderer: Renderer): void;\n execute(graphicsPipe: GraphicsPipeLike, renderable: Graphics): void;\n destroy(): void;\n}\n\n/** @internal */\nexport class GraphicsGpuData implements GPUData\n{\n public batches: BatchableGraphics[] = [];\n public batched = false;\n public destroy()\n {\n this.batches.forEach((batch) =>\n {\n BigPool.return(batch as PoolItem);\n });\n\n this.batches.length = 0;\n }\n}\n\n/** @internal */\nexport class GraphicsPipe implements RenderPipe<Graphics>\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ],\n name: 'graphics',\n } as const;\n\n public renderer: Renderer;\n public state: State = State.for2d();\n\n private _adaptor: GraphicsAdaptor;\n private readonly _managedGraphics: GCManagedHash<Graphics>;\n\n constructor(renderer: Renderer, adaptor: GraphicsAdaptor)\n {\n this.renderer = renderer;\n this._adaptor = adaptor;\n this.renderer.runners.contextChange.add(this);\n this._managedGraphics = new GCManagedHash({ renderer, type: 'renderable', priority: -1, name: 'graphics' });\n }\n\n public contextChange(): void\n {\n this._adaptor.contextChange(this.renderer);\n }\n\n public validateRenderable(graphics: Graphics): boolean\n {\n // assume context is dirty..\n const context = graphics.context;\n\n const wasBatched = !!graphics._gpuData;\n\n const contextSystem = this.renderer.graphicsContext as GraphicsContextSystem;\n const gpuContext = contextSystem.updateGpuContext(context);\n\n if (gpuContext.isBatchable || wasBatched !== gpuContext.isBatchable)\n {\n // TODO what if they are the same size??\n return true;\n }\n\n return false;\n }\n\n public addRenderable(graphics: Graphics, instructionSet: InstructionSet)\n {\n const contextSystem = this.renderer.graphicsContext as GraphicsContextSystem;\n const gpuContext = contextSystem.updateGpuContext(graphics.context);\n\n // need to get batches here.. as we need to know if we can batch or not..\n // this also overrides the current batches..\n // also rebuild when this renderer has no batches yet, e.g. the graphics was first rendered elsewhere\n if (graphics.didViewUpdate || !graphics._gpuData[this.renderer.uid])\n {\n this._rebuild(graphics);\n }\n\n if (gpuContext.isBatchable)\n {\n this._addToBatcher(graphics, instructionSet);\n }\n else\n {\n this.renderer.renderPipes.batch.break(instructionSet);\n instructionSet.add(graphics);\n }\n }\n\n public updateRenderable(graphics: Graphics)\n {\n const gpuData = this._getGpuDataForRenderable(graphics);\n\n const batches = gpuData.batches;\n\n for (let i = 0; i < batches.length; i++)\n {\n const batch = batches[i];\n\n batch._batcher.updateElement(batch);\n }\n }\n\n public execute(graphics: Graphics)\n {\n if (!graphics.isRenderable) return;\n\n const renderer = this.renderer;\n const context = graphics.context;\n const contextSystem = renderer.graphicsContext as GraphicsContextSystem;\n\n // early out if there is no actual visual stuff...\n if (!contextSystem.getGpuContext(context).batches.length)\n { return; }\n\n const shader = context.customShader || this._adaptor.shader;\n\n this.state.blendMode = graphics.groupBlendMode;\n\n const localUniforms = shader.resources.localUniforms.uniforms;\n\n localUniforms.uTransformMatrix = graphics.groupTransform;\n localUniforms.uRound = renderer._roundPixels | graphics._roundPixels;\n\n color32BitToUniform(\n graphics.groupColorAlpha,\n localUniforms.uColor,\n 0,\n );\n\n this._adaptor.execute(this, graphics);\n }\n\n private _rebuild(graphics: Graphics)\n {\n const gpuData = this._getGpuDataForRenderable(graphics);\n\n const contextSystem = this.renderer.graphicsContext as GraphicsContextSystem;\n const gpuContext = contextSystem.updateGpuContext(graphics.context);\n\n // free up the batches..\n gpuData.destroy();\n\n if (gpuContext.isBatchable)\n {\n this._updateBatchesForRenderable(graphics, gpuData);\n }\n }\n\n private _addToBatcher(graphics: Graphics, instructionSet: InstructionSet)\n {\n const batchPipe = this.renderer.renderPipes.batch;\n\n const batches = this._getGpuDataForRenderable(graphics).batches;\n\n for (let i = 0; i < batches.length; i++)\n {\n const batch = batches[i];\n\n batchPipe.addToBatch(batch, instructionSet);\n }\n }\n\n private _getGpuDataForRenderable(graphics: Graphics): GraphicsGpuData\n {\n return graphics._gpuData[this.renderer.uid] || this._initGpuDataForRenderable(graphics);\n }\n\n private _initGpuDataForRenderable(graphics: Graphics): GraphicsGpuData\n {\n const gpuData = new GraphicsGpuData();\n\n graphics._gpuData[this.renderer.uid] = gpuData;\n\n this._managedGraphics.add(graphics);\n\n return gpuData;\n }\n\n private _updateBatchesForRenderable(graphics: Graphics, gpuData: GraphicsGpuData)\n {\n const context = graphics.context;\n const contextSystem = this.renderer.graphicsContext as GraphicsContextSystem;\n const gpuContext: GpuGraphicsContext = contextSystem.getGpuContext(context);\n\n const roundPixels = (this.renderer._roundPixels | graphics._roundPixels) as 0 | 1;\n\n gpuData.batches = gpuContext.batches.map((batch) =>\n {\n const batchClone = BigPool.get(BatchableGraphics);\n\n batch.copyTo(batchClone);\n\n batchClone.renderable = graphics;\n\n batchClone.roundPixels = roundPixels;\n\n return batchClone;\n });\n }\n\n public destroy()\n {\n this._managedGraphics.destroy();\n this.renderer = null;\n\n this._adaptor.destroy();\n this._adaptor = null;\n this.state = null;\n }\n}\n","/* eslint-disable max-len */\nimport EventEmitter from 'eventemitter3';\nimport { Color, type ColorSource } from '../../../color/Color';\nimport { Matrix } from '../../../maths/matrix/Matrix';\nimport { Point } from '../../../maths/point/Point';\nimport { type GCable, type GCData } from '../../../rendering/renderers/shared/GCSystem';\nimport { Texture } from '../../../rendering/renderers/shared/texture/Texture';\nimport { uid } from '../../../utils/data/uid';\nimport { deprecation, v8_0_0 } from '../../../utils/logging/deprecation';\nimport { Bounds } from '../../container/bounds/Bounds';\nimport { type GpuGraphicsContext } from './GraphicsContextSystem';\nimport { GraphicsPath } from './path/GraphicsPath';\nimport { SVGParser } from './svg/SVGParser';\nimport { toFillStyle, toStrokeStyle } from './utils/convertFillInputToFillStyle';\nimport { getMaxMiterRatio } from './utils/getMaxMiterRatio';\n\nimport type { PointData } from '../../../maths/point/PointData';\nimport type { Shader } from '../../../rendering/renderers/shared/shader/Shader';\nimport type { TextureDestroyOptions, TypeOrBool } from '../../container/destroyTypes';\nimport type { ConvertedFillStyle, ConvertedStrokeStyle, FillInput, StrokeInput } from './FillTypes';\nimport type { RoundedPoint } from './path/roundShape';\n\nconst tmpPoint = new Point();\n\n/**\n * The mode for batching graphics instructions.\n *\n * It can be:\n * - 'auto': Automatically determines whether to batch based on the number of instructions.\n * - 'batch': Forces batching of all instructions.\n * - 'no-batch': Disables batching, processing each instruction individually.\n * @category scene\n * @advanced\n */\nexport type BatchMode = 'auto' | 'batch' | 'no-batch';\n\n/** @internal */\nexport interface FillInstruction\n{\n action: 'fill' | 'cut'\n data: { style: ConvertedFillStyle, path: GraphicsPath, hole?: GraphicsPath }\n}\n\n/** @internal */\nexport interface StrokeInstruction\n{\n action: 'stroke'\n data: { style: ConvertedStrokeStyle, path: GraphicsPath, hole?: GraphicsPath }\n}\n\n/** @internal */\nexport interface TextureInstruction\n{\n action: 'texture'\n data: {\n image: Texture,\n\n dx: number\n dy: number\n\n dw: number\n dh: number\n\n transform: Matrix\n alpha: number\n style: number,\n }\n}\n\n/** @internal */\nexport type GraphicsInstructions = FillInstruction | StrokeInstruction | TextureInstruction;\n\nconst tempMatrix = new Matrix();\n\n/**\n * The GraphicsContext class allows for the creation of lightweight objects that contain instructions for drawing shapes and paths.\n * It is used internally by the Graphics class to draw shapes and paths, and can be used directly and shared between Graphics objects,\n *\n * This sharing of a `GraphicsContext` means that the intensive task of converting graphics instructions into GPU-ready geometry is done once, and the results are reused,\n * much like sprites reusing textures.\n * @category scene\n * @standard\n */\nexport class GraphicsContext extends EventEmitter<{\n update: GraphicsContext\n destroy: GraphicsContext\n unload: GraphicsContext\n}> implements GCable\n{\n /** @internal */\n public _gpuData: Record<number | string, GpuGraphicsContext> = Object.create(null);\n /** @internal */\n public _gcData?: GCData;\n /** If set to true, the resource will be garbage collected automatically when it is not used. */\n public autoGarbageCollect = true;\n /** @internal */\n public _gcLastUsed = -1;\n\n /** The default fill style to use when none is provided. */\n public static defaultFillStyle: ConvertedFillStyle = {\n /** The color to use for the fill. */\n color: 0xffffff,\n /** The alpha value to use for the fill. */\n alpha: 1,\n /** The texture to use for the fill. */\n texture: Texture.WHITE,\n /** The matrix to apply. */\n matrix: null,\n /** The fill pattern to use. */\n fill: null,\n /** Whether coordinates are 'global' or 'local' */\n textureSpace: 'local',\n };\n\n /** The default stroke style to use when none is provided. */\n public static defaultStrokeStyle: ConvertedStrokeStyle = {\n /** The width of the stroke. */\n width: 1,\n /** The color to use for the stroke. */\n color: 0xffffff,\n /** The alpha value to use for the stroke. */\n alpha: 1,\n /** The alignment of the stroke. */\n alignment: 0.5,\n /** The miter limit to use. */\n miterLimit: 10,\n /** The line cap style to use. */\n cap: 'butt',\n /** The line join style to use. */\n join: 'miter',\n /** The texture to use for the fill. */\n texture: Texture.WHITE,\n /** The matrix to apply. */\n matrix: null,\n /** The fill pattern to use. */\n fill: null,\n /** Whether coordinates are 'global' or 'local' */\n textureSpace: 'local',\n /** If the stroke is a pixel line. */\n pixelLine: false,\n };\n\n /**\n * unique id for this graphics context\n * @internal\n */\n public readonly uid: number = uid('graphicsContext');\n /**\n * Indicates whether content is updated and have to be re-rendered.\n * @internal\n */\n public dirty = true;\n /** The batch mode for this graphics context. It can be 'auto', 'batch', or 'no-batch'. */\n public batchMode: BatchMode = 'auto';\n /** @internal */\n public instructions: GraphicsInstructions[] = [];\n /**\n * Custom shader to apply to the graphics when rendering.\n * @advanced\n */\n public customShader?: Shader;\n\n /** Whether the graphics context has been destroyed. */\n public destroyed = false;\n\n private _activePath: GraphicsPath = new GraphicsPath();\n private _transform: Matrix = new Matrix();\n\n private _fillStyle: ConvertedFillStyle = { ...GraphicsContext.defaultFillStyle };\n private _strokeStyle: ConvertedStrokeStyle = { ...GraphicsContext.defaultStrokeStyle };\n private _stateStack: { fillStyle: ConvertedFillStyle; strokeStyle: ConvertedStrokeStyle, transform: Matrix }[] = [];\n\n private _tick = 0;\n\n private _bounds = new Bounds();\n private _boundsDirty = true;\n\n /**\n * Creates a new GraphicsContext object that is a clone of this instance, copying all properties,\n * including the current drawing state, transformations, styles, and instructions.\n * @returns A new GraphicsContext instance with the same properties and state as this one.\n */\n public clone(): GraphicsContext\n {\n const clone = new GraphicsContext();\n\n clone.batchMode = this.batchMode;\n clone.instructions = this.instructions.slice();\n clone._activePath = this._activePath.clone();\n clone._transform = this._transform.clone();\n clone._fillStyle = { ...this._fillStyle };\n clone._strokeStyle = { ...this._strokeStyle };\n clone._stateStack = this._stateStack.slice();\n clone._bounds = this._bounds.clone();\n clone._boundsDirty = true;\n\n return clone;\n }\n\n /**\n * The current fill style of the graphics context. This can be a color, gradient, pattern, or a more complex style defined by a FillStyle object.\n */\n get fillStyle(): ConvertedFillStyle\n {\n return this._fillStyle;\n }\n\n set fillStyle(value: FillInput)\n {\n this._fillStyle = toFillStyle(value, GraphicsContext.defaultFillStyle);\n }\n\n /**\n * The current stroke style of the graphics context. Similar to fill styles, stroke styles can encompass colors, gradients, patterns, or more detailed configurations via a StrokeStyle object.\n */\n get strokeStyle(): ConvertedStrokeStyle\n {\n return this._strokeStyle;\n }\n\n set strokeStyle(value: FillInput)\n {\n this._strokeStyle = toStrokeStyle(value, GraphicsContext.defaultStrokeStyle);\n }\n\n /**\n * Sets the current fill style of the graphics context. The fill style can be a color, gradient,\n * pattern, or a more complex style defined by a FillStyle object.\n * @param style - The fill style to apply. This can be a simple color, a gradient or pattern object,\n * or a FillStyle or ConvertedFillStyle object.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public setFillStyle(style: FillInput): this\n {\n this._fillStyle = toFillStyle(style, GraphicsContext.defaultFillStyle);\n\n return this;\n }\n\n /**\n * Sets the current stroke style of the graphics context. Similar to fill styles, stroke styles can\n * encompass colors, gradients, patterns, or more detailed configurations via a StrokeStyle object.\n * @param style - The stroke style to apply. Can be defined as a color, a gradient or pattern,\n * or a StrokeStyle or ConvertedStrokeStyle object.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public setStrokeStyle(style: StrokeInput): this\n {\n this._strokeStyle = toFillStyle(style, GraphicsContext.defaultStrokeStyle) as ConvertedStrokeStyle;\n\n return this;\n }\n\n /**\n * Adds a texture to the graphics context. This method supports multiple overloads for specifying the texture.\n * If only a texture is provided, it uses the texture's width and height for drawing.\n * @param texture - The Texture object to use.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public texture(texture: Texture): this;\n /**\n * Adds a texture to the graphics context. This method supports multiple overloads for specifying the texture,\n * tint, and dimensions. If only a texture is provided, it uses the texture's width and height for drawing.\n * Additional parameters allow for specifying a tint color, and custom dimensions for the texture drawing area.\n * @param texture - The Texture object to use.\n * @param tint - (Optional) A ColorSource to tint the texture. If not provided, defaults to white (0xFFFFFF).\n * @param dx - (Optional) The x-coordinate in the destination canvas at which to place the top-left corner of\n * the source image.\n * @param dy - (Optional) The y-coordinate in the destination canvas at which to place the top-left corner of\n * the source image.\n * @param dw - (Optional) The width of the rectangle within the source image to draw onto the destination canvas.\n * If not provided, uses the texture's frame width.\n * @param dh - (Optional) The height of the rectangle within the source image to draw onto the destination canvas.\n * If not provided, uses the texture's frame height.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public texture(texture: Texture, tint?: ColorSource, dx?: number, dy?: number, dw?: number, dh?: number): this;\n public texture(texture: Texture, tint?: ColorSource, dx?: number, dy?: number, dw?: number, dh?: number): this\n {\n this.instructions.push({\n action: 'texture',\n data: {\n image: texture,\n\n dx: dx || 0,\n dy: dy || 0,\n\n dw: dw || texture.frame.width,\n dh: dh || texture.frame.height,\n\n transform: this._transform.clone(),\n alpha: this._fillStyle.alpha,\n style: (tint || tint === 0) ? Color.shared.setValue(tint).toNumber() : 0xFFFFFF,\n }\n });\n\n this.onUpdate();\n\n return this;\n }\n\n /**\n * Resets the current path. Any previous path and its commands are discarded and a new path is\n * started. This is typically called before beginning a new shape or series of drawing commands.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public beginPath(): this\n {\n this._activePath = new GraphicsPath();\n\n return this;\n }\n\n /**\n * Fills the current or given path with the current fill style. This method can optionally take\n * a color and alpha for a simple fill, or a more complex FillInput object for advanced fills.\n * @param style - (Optional) The style to fill the path with. Can be a color, gradient, pattern, or a complex style object. If omitted, uses the current fill style.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public fill(style?: FillInput): this;\n /** @deprecated 8.0.0 */\n public fill(color: ColorSource, alpha: number): this;\n public fill(style?: FillInput, alpha?: number): this\n {\n let path: GraphicsPath;\n\n const lastInstruction = this.instructions[this.instructions.length - 1];\n\n if (this._tick === 0 && lastInstruction?.action === 'stroke')\n {\n path = lastInstruction.data.path;\n }\n else\n {\n path = this._activePath.clone();\n }\n\n if (!path) return this;\n\n // eslint-disable-next-line no-eq-null, eqeqeq\n if (style != null)\n {\n if (alpha !== undefined && typeof style === 'number')\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead');\n // #endif\n\n style = { color: style, alpha };\n }\n this._fillStyle = toFillStyle(style, GraphicsContext.defaultFillStyle);\n }\n\n // TODO not a fan of the clone!!\n this.instructions.push({\n action: 'fill',\n // TODO copy fill style!\n data: { style: this.fillStyle, path }\n });\n\n this.onUpdate();\n\n this._initNextPathLocation();\n this._tick = 0;\n\n return this;\n }\n\n private _initNextPathLocation()\n {\n // Reset the _activePath with the last point of the current path\n const { x, y } = this._activePath.getLastPoint(Point.shared);\n\n this._activePath.clear();\n this._activePath.moveTo(x, y);\n }\n\n /**\n * Strokes the current path with the current stroke style. This method can take an optional\n * FillInput parameter to define the stroke's appearance, including its color, width, and other properties.\n * @param style - (Optional) The stroke style to apply. Can be defined as a simple color or a more complex style object. If omitted, uses the current stroke style.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public stroke(style?: StrokeInput): this\n {\n let path: GraphicsPath;\n\n const lastInstruction = this.instructions[this.instructions.length - 1];\n\n if (this._tick === 0 && lastInstruction?.action === 'fill')\n {\n path = lastInstruction.data.path;\n }\n else\n {\n path = this._activePath.clone();\n }\n\n if (!path) return this;\n\n // eslint-disable-next-line no-eq-null, eqeqeq\n if (style != null)\n {\n this._strokeStyle = toStrokeStyle(style, GraphicsContext.defaultStrokeStyle);\n }\n\n // TODO not a fan of the clone!!\n this.instructions.push({\n action: 'stroke',\n // TODO copy fill style!\n data: { style: this.strokeStyle, path }\n });\n\n this.onUpdate();\n\n this._initNextPathLocation();\n this._tick = 0;\n\n return this;\n }\n\n /**\n * Applies a cutout to the last drawn shape. This is used to create holes or complex shapes by\n * subtracting a path from the previously drawn path. If a hole is not completely in a shape, it will\n * fail to cut correctly!\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public cut(): this\n {\n for (let i = 0; i < 2; i++)\n {\n const lastInstruction = this.instructions[this.instructions.length - 1 - i];\n\n const holePath = this._activePath.clone();\n\n if (lastInstruction)\n {\n if (lastInstruction.action === 'stroke' || lastInstruction.action === 'fill')\n {\n if (lastInstruction.data.hole)\n {\n lastInstruction.data.hole.addPath(holePath);\n }\n else\n {\n lastInstruction.data.hole = holePath;\n break;\n }\n }\n }\n }\n\n this._initNextPathLocation();\n\n return this;\n }\n\n /**\n * Adds an arc to the current path, which is centered at (x, y) with the specified radius,\n * starting and ending angles, and direction.\n * @param x - The x-coordinate of the arc's center.\n * @param y - The y-coordinate of the arc's center.\n * @param radius - The arc's radius.\n * @param startAngle - The starting angle, in radians.\n * @param endAngle - The ending angle, in radians.\n * @param counterclockwise - (Optional) Specifies whether the arc is drawn counterclockwise (true) or clockwise (false). Defaults to false.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): this\n {\n this._tick++;\n\n const t = this._transform;\n\n this._activePath.arc(\n (t.a * x) + (t.c * y) + t.tx,\n (t.b * x) + (t.d * y) + t.ty,\n radius,\n startAngle,\n endAngle,\n counterclockwise,\n );\n\n return this;\n }\n\n /**\n * Adds an arc to the current path with the given control points and radius, connected to the previous point\n * by a straight line if necessary.\n * @param x1 - The x-coordinate of the first control point.\n * @param y1 - The y-coordinate of the first control point.\n * @param x2 - The x-coordinate of the second control point.\n * @param y2 - The y-coordinate of the second control point.\n * @param radius - The arc's radius.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): this\n {\n this._tick++;\n\n const t = this._transform;\n\n this._activePath.arcTo(\n (t.a * x1) + (t.c * y1) + t.tx,\n (t.b * x1) + (t.d * y1) + t.ty,\n (t.a * x2) + (t.c * y2) + t.tx,\n (t.b * x2) + (t.d * y2) + t.ty,\n radius,\n );\n\n return this;\n }\n\n /**\n * Adds an SVG-style arc to the path, allowing for elliptical arcs based on the SVG spec.\n * @param rx - The x-radius of the ellipse.\n * @param ry - The y-radius of the ellipse.\n * @param xAxisRotation - The rotation of the ellipse's x-axis relative\n * to the x-axis of the coordinate system, in degrees.\n * @param largeArcFlag - Determines if the arc should be greater than or less than 180 degrees.\n * @param sweepFlag - Determines if the arc should be swept in a positive angle direction.\n * @param x - The x-coordinate of the arc's end point.\n * @param y - The y-coordinate of the arc's end point.\n * @returns The instance of the current object for chaining.\n */\n public arcToSvg(\n rx: number, ry: number,\n xAxisRotation: number,\n largeArcFlag: number,\n sweepFlag: number,\n x: number, y: number\n ): this\n {\n this._tick++;\n\n const t = this._transform;\n\n this._activePath.arcToSvg(\n rx, ry,\n xAxisRotation, // should we rotate this with transform??\n largeArcFlag,\n sweepFlag,\n (t.a * x) + (t.c * y) + t.tx,\n (t.b * x) + (t.d * y) + t.ty,\n );\n\n return this;\n }\n\n /**\n * Adds a cubic Bezier curve to the path.\n * It requires three points: the first two are control points and the third one is the end point.\n * The starting point is the last point in the current path.\n * @param cp1x - The x-coordinate of the first control point.\n * @param cp1y - The y-coordinate of the first control point.\n * @param cp2x - The x-coordinate of the second control point.\n * @param cp2y - The y-coordinate of the second control point.\n * @param x - The x-coordinate of the end point.\n * @param y - The y-coordinate of the end point.\n * @param smoothness - Optional parameter to adjust the smoothness of the curve.\n * @returns The instance of the current object for chaining.\n */\n public bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number, smoothness?: number): this\n {\n this._tick++;\n\n // TODO optimize for no transform\n const t = this._transform;\n\n this._activePath.bezierCurveTo(\n (t.a * cp1x) + (t.c * cp1y) + t.tx,\n (t.b * cp1x) + (t.d * cp1y) + t.ty,\n (t.a * cp2x) + (t.c * cp2y) + t.tx,\n (t.b * cp2x) + (t.d * cp2y) + t.ty,\n (t.a * x) + (t.c * y) + t.tx,\n (t.b * x) + (t.d * y) + t.ty,\n smoothness,\n );\n\n return this;\n }\n\n /**\n * Closes the current path by drawing a straight line back to the start.\n * If the shape is already closed or there are no points in the path, this method does nothing.\n * @returns The instance of the current object for chaining.\n */\n public closePath(): this\n {\n this._tick++;\n\n this._activePath?.closePath();\n\n return this;\n }\n\n /**\n * Draws an ellipse at the specified location and with the given x and y radii.\n * An optional transformation can be applied, allowing for rotation, scaling, and translation.\n * @param x - The x-coordinate of the center of the ellipse.\n * @param y - The y-coordinate of the center of the ellipse.\n * @param radiusX - The horizontal radius of the ellipse.\n * @param radiusY - The vertical radius of the ellipse.\n * @returns The instance of the current object for chaining.\n */\n public ellipse(x: number, y: number, radiusX: number, radiusY: number): this\n {\n this._tick++;\n\n this._activePath.ellipse(x, y, radiusX, radiusY, this._transform.clone());\n\n return this;\n }\n\n /**\n * Draws a circle shape. This method adds a new circle path to the current drawing.\n * @param x - The x-coordinate of the center of the circle.\n * @param y - The y-coordinate of the center of the circle.\n * @param radius - The radius of the circle.\n * @returns The instance of the current object for chaining.\n */\n public circle(x: number, y: number, radius: number): this\n {\n this._tick++;\n\n this._activePath.circle(x, y, radius, this._transform.clone());\n\n return this;\n }\n\n /**\n * Adds another `GraphicsPath` to this path, optionally applying a transformation.\n * @param path - The `GraphicsPath` to add.\n * @returns The instance of the current object for chaining.\n */\n public path(path: GraphicsPath): this\n {\n this._tick++;\n\n this._activePath.addPath(path, this._transform.clone());\n\n return this;\n }\n\n /**\n * Connects the current point to a new point with a straight line. This method updates the current path.\n * @param x - The x-coordinate of the new point to connect to.\n * @param y - The y-coordinate of the new point to connect to.\n * @returns The instance of the current object for chaining.\n */\n public lineTo(x: number, y: number): this\n {\n this._tick++;\n\n const t = this._transform;\n\n this._activePath.lineTo(\n (t.a * x) + (t.c * y) + t.tx,\n (t.b * x) + (t.d * y) + t.ty\n );\n\n return this;\n }\n\n /**\n * Sets the starting point for a new sub-path. Any subsequent drawing commands are considered part of this path.\n * @param x - The x-coordinate for the starting point.\n * @param y - The y-coordinate for the starting point.\n * @returns The instance of the current object for chaining.\n */\n public moveTo(x: number, y: number): this\n {\n this._tick++;\n\n const t = this._transform;\n\n const instructions = this._activePath.instructions;\n\n const transformedX = (t.a * x) + (t.c * y) + t.tx;\n const transformedY = (t.b * x) + (t.d * y) + t.ty;\n\n if (instructions.length === 1 && instructions[0].action === 'moveTo')\n {\n instructions[0].data[0] = transformedX;\n instructions[0].data[1] = transformedY;\n\n return this;\n }\n this._activePath.moveTo(\n transformedX,\n transformedY\n );\n\n return this;\n }\n\n /**\n * Adds a quadratic curve to the path. It requires two points: the control point and the end point.\n * The starting point is the last point in the current path.\n * @param cpx - The x-coordinate of the control point.\n * @param cpy - The y-coordinate of the control point.\n * @param x - The x-coordinate of the end point.\n * @param y - The y-coordinate of the end point.\n * @param smoothness - Optional parameter to adjust the smoothness of the curve.\n * @returns The instance of the current object for chaining.\n */\n public quadraticCurveTo(cpx: number, cpy: number, x: number, y: number, smoothness?: number): this\n {\n this._tick++;\n\n const t = this._transform;\n\n this._activePath.quadraticCurveTo(\n (t.a * cpx) + (t.c * cpy) + t.tx,\n (t.b * cpx) + (t.d * cpy) + t.ty,\n (t.a * x) + (t.c * y) + t.tx,\n (t.b * x) + (t.d * y) + t.ty,\n smoothness,\n );\n\n return this;\n }\n\n /**\n * Draws a rectangle shape. This method adds a new rectangle path to the current drawing.\n * @param x - The x-coordinate of the top-left corner of the rectangle.\n * @param y - The y-coordinate of the top-left corner of the rectangle.\n * @param w - The width of the rectangle.\n * @param h - The height of the rectangle.\n * @returns The instance of the current object for chaining.\n */\n public rect(x: number, y: number, w: number, h: number): this\n {\n this._tick++;\n\n this._activePath.rect(x, y, w, h, this._transform.clone());\n\n return this;\n }\n\n /**\n * Draws a rectangle with rounded corners.\n * The corner radius can be specified to determine how rounded the corners should be.\n * An optional transformation can be applied, which allows for rotation, scaling, and translation of the rectangle.\n * @param x - The x-coordinate of the top-left corner of the rectangle.\n * @param y - The y-coordinate of the top-left corner of the rectangle.\n * @param w - The width of the rectangle.\n * @param h - The height of the rectangle.\n * @param radius - The radius of the rectangle's corners. If not specified, corners will be sharp.\n * @returns The instance of the current object for chaining.\n */\n public roundRect(x: number, y: number, w: number, h: number, radius?: number): this\n {\n this._tick++;\n\n this._activePath.roundRect(x, y, w, h, radius, this._transform.clone());\n\n return this;\n }\n\n /**\n * Draws a polygon shape by specifying a sequence of points. This method allows for the creation of complex polygons,\n * which can be both open and closed. An optional transformation can be applied, enabling the polygon to be scaled,\n * rotated, or translated as needed.\n * @param points - An array of numbers, or an array of PointData objects eg [{x,y}, {x,y}, {x,y}]\n * representing the x and y coordinates, of the polygon's vertices, in sequence.\n * @param close - A boolean indicating whether to close the polygon path. True by default.\n */\n public poly(points: number[] | PointData[], close?: boolean): this\n {\n this._tick++;\n\n this._activePath.poly(points, close, this._transform.clone());\n\n return this;\n }\n\n /**\n * Draws a regular polygon with a specified number of sides. All sides and angles are equal.\n * @param x - The x-coordinate of the center of the polygon.\n * @param y - The y-coordinate of the center of the polygon.\n * @param radius - The radius of the circumscribed circle of the polygon.\n * @param sides - The number of sides of the polygon. Must be 3 or more.\n * @param rotation - The rotation angle of the polygon, in radians. Zero by default.\n * @param transform - An optional `Matrix` object to apply a transformation to the polygon.\n * @returns The instance of the current object for chaining.\n */\n public regularPoly(x: number, y: number, radius: number, sides: number, rotation = 0, transform?: Matrix): this\n {\n this._tick++;\n this._activePath.regularPoly(x, y, radius, sides, rotation, transform);\n\n return this;\n }\n\n /**\n * Draws a polygon with rounded corners.\n * Similar to `regularPoly` but with the ability to round the corners of the polygon.\n * @param x - The x-coordinate of the center of the polygon.\n * @param y - The y-coordinate of the center of the polygon.\n * @param radius - The radius of the circumscribed circle of the polygon.\n * @param sides - The number of sides of the polygon. Must be 3 or more.\n * @param corner - The radius of the rounding of the corners.\n * @param rotation - The rotation angle of the polygon, in radians. Zero by default.\n * @returns The instance of the current object for chaining.\n */\n public roundPoly(x: number, y: number, radius: number, sides: number, corner: number, rotation?: number): this\n {\n this._tick++;\n this._activePath.roundPoly(x, y, radius, sides, corner, rotation);\n\n return this;\n }\n\n /**\n * Draws a shape with rounded corners. This function supports custom radius for each corner of the shape.\n * Optionally, corners can be rounded using a quadratic curve instead of an arc, providing a different aesthetic.\n * @param points - An array of `RoundedPoint` representing the corners of the shape to draw.\n * A minimum of 3 points is required.\n * @param radius - The default radius for the corners.\n * This radius is applied to all corners unless overridden in `points`.\n * @param useQuadratic - If set to true, rounded corners are drawn using a quadraticCurve\n * method instead of an arc method. Defaults to false.\n * @param smoothness - Specifies the smoothness of the curve when `useQuadratic` is true.\n * Higher values make the curve smoother.\n * @returns The instance of the current object for chaining.\n */\n public roundShape(points: RoundedPoint[], radius: number, useQuadratic?: boolean, smoothness?: number): this\n {\n this._tick++;\n this._activePath.roundShape(points, radius, useQuadratic, smoothness);\n\n return this;\n }\n\n /**\n * Draw Rectangle with fillet corners. This is much like rounded rectangle\n * however it support negative numbers as well for the corner radius.\n * @param x - Upper left corner of rect\n * @param y - Upper right corner of rect\n * @param width - Width of rect\n * @param height - Height of rect\n * @param fillet - accept negative or positive values\n */\n public filletRect(x: number, y: number, width: number, height: number, fillet: number): this\n {\n this._tick++;\n this._activePath.filletRect(x, y, width, height, fillet);\n\n return this;\n }\n\n /**\n * Draw Rectangle with chamfer corners. These are angled corners.\n * @param x - Upper left corner of rect\n * @param y - Upper right corner of rect\n * @param width - Width of rect\n * @param height - Height of rect\n * @param chamfer - non-zero real number, size of corner cutout\n * @param transform\n */\n public chamferRect(x: number, y: number, width: number, height: number, chamfer: number, transform?: Matrix): this\n {\n this._tick++;\n this._activePath.chamferRect(x, y, width, height, chamfer, transform);\n\n return this;\n }\n\n /**\n * Draws a star shape centered at a specified location. This method allows for the creation\n * of stars with a variable number of points, outer radius, optional inner radius, and rotation.\n * The star is drawn as a closed polygon with alternating outer and inner vertices to create the star's points.\n * An optional transformation can be applied to scale, rotate, or translate the star as needed.\n * @param x - The x-coordinate of the center of the star.\n * @param y - The y-coordinate of the center of the star.\n * @param points - The number of points of the star.\n * @param radius - The outer radius of the star (distance from the center to the outer points).\n * @param innerRadius - Optional. The inner radius of the star\n * (distance from the center to the inner points between the outer points).\n * If not provided, defaults to half of the `radius`.\n * @param rotation - Optional. The rotation of the star in radians, where 0 is aligned with the y-axis.\n * Defaults to 0, meaning one point is directly upward.\n * @returns The instance of the current object for chaining further drawing commands.\n */\n public star(x: number, y: number, points: number, radius: number, innerRadius = 0, rotation = 0): this\n {\n this._tick++;\n\n this._activePath.star(x, y, points, radius, innerRadius, rotation, this._transform.clone());\n\n return this;\n }\n\n /**\n * Parses and renders an SVG string into the graphics context. This allows for complex shapes and paths\n * defined in SVG format to be drawn within the graphics context.\n * @param svg - The SVG string to be parsed and rendered.\n */\n public svg(svg: string): this\n {\n this._tick++;\n\n SVGParser(svg, this);\n\n return this;\n }\n\n /**\n * Restores the most recently saved graphics state by popping the top of the graphics state stack.\n * This includes transformations, fill styles, and stroke styles.\n */\n public restore(): this\n {\n const state = this._stateStack.pop();\n\n if (state)\n {\n this._transform = state.transform;\n this._fillStyle = state.fillStyle;\n this._strokeStyle = state.strokeStyle;\n }\n\n return this;\n }\n\n /** Saves the current graphics state, including transformations, fill styles, and stroke styles, onto a stack. */\n public save(): this\n {\n this._stateStack.push({\n transform: this._transform.clone(),\n fillStyle: { ...this._fillStyle },\n strokeStyle: { ...this._strokeStyle },\n });\n\n return this;\n }\n\n /**\n * Returns the current transformation matrix of the graphics context.\n * @returns The current transformation matrix.\n */\n public getTransform(): Matrix\n {\n return this._transform;\n }\n\n /**\n * Resets the current transformation matrix to the identity matrix, effectively removing any transformations (rotation, scaling, translation) previously applied.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public resetTransform(): this\n {\n this._transform.identity();\n\n return this;\n }\n\n /**\n * Applies a rotation transformation to the graphics context around the current origin.\n * @param angle - The angle of rotation in radians.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public rotate(angle: number): this\n {\n this._transform.rotate(angle);\n\n return this;\n }\n\n /**\n * Applies a scaling transformation to the graphics context, scaling drawings by x horizontally and by y vertically.\n * @param x - The scale factor in the horizontal direction.\n * @param y - (Optional) The scale factor in the vertical direction. If not specified, the x value is used for both directions.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public scale(x: number, y: number = x): this\n {\n this._transform.scale(x, y);\n\n return this;\n }\n\n /**\n * Sets the current transformation matrix of the graphics context to the specified matrix or values.\n * This replaces the current transformation matrix.\n * @param transform - The matrix to set as the current transformation matrix.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public setTransform(transform: Matrix): this;\n /**\n * Sets the current transformation matrix of the graphics context to the specified matrix or values.\n * This replaces the current transformation matrix.\n * @param a - The value for the a property of the matrix, or a Matrix object to use directly.\n * @param b - The value for the b property of the matrix.\n * @param c - The value for the c property of the matrix.\n * @param d - The value for the d property of the matrix.\n * @param dx - The value for the tx (translate x) property of the matrix.\n * @param dy - The value for the ty (translate y) property of the matrix.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public setTransform(a: number, b: number, c: number, d: number, dx: number, dy: number): this;\n public setTransform(a: number | Matrix, b?: number, c?: number, d?: number, dx?: number, dy?: number): this\n {\n if (a instanceof Matrix)\n {\n this._transform.set(a.a, a.b, a.c, a.d, a.tx, a.ty);\n\n return this;\n }\n\n this._transform.set(a, b, c, d, dx, dy);\n\n return this;\n }\n\n /**\n * Applies the specified transformation matrix to the current graphics context by multiplying\n * the current matrix with the specified matrix.\n * @param transform - The matrix to apply to the current transformation.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public transform(transform: Matrix): this;\n /**\n * Applies the specified transformation matrix to the current graphics context by multiplying\n * the current matrix with the specified matrix.\n * @param a - The value for the a property of the matrix, or a Matrix object to use directly.\n * @param b - The value for the b property of the matrix.\n * @param c - The value for the c property of the matrix.\n * @param d - The value for the d property of the matrix.\n * @param dx - The value for the tx (translate x) property of the matrix.\n * @param dy - The value for the ty (translate y) property of the matrix.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public transform(a: number, b: number, c: number, d: number, dx: number, dy: number): this;\n public transform(a: number | Matrix, b?: number, c?: number, d?: number, dx?: number, dy?: number): this\n {\n if (a instanceof Matrix)\n {\n this._transform.append(a);\n\n return this;\n }\n\n tempMatrix.set(a, b, c, d, dx, dy);\n this._transform.append(tempMatrix);\n\n return this;\n }\n\n /**\n * Applies a translation transformation to the graphics context, moving the origin by the specified amounts.\n * @param x - The amount to translate in the horizontal direction.\n * @param y - (Optional) The amount to translate in the vertical direction. If not specified, the x value is used for both directions.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public translate(x: number, y: number = x): this\n {\n this._transform.translate(x, y);\n\n return this;\n }\n\n /**\n * Clears all drawing commands from the graphics context, effectively resetting it. This includes clearing the path,\n * and optionally resetting transformations to the identity matrix.\n * @returns The instance of the current GraphicsContext for method chaining.\n */\n public clear(): this\n {\n this._activePath.clear();\n this.instructions.length = 0;\n this.resetTransform();\n\n this.onUpdate();\n\n return this;\n }\n\n protected onUpdate(): void\n {\n this._boundsDirty = true;\n this.dirty = true;\n this.emit('update', this, 0x10);\n }\n\n /** The bounds of the graphic shape. */\n get bounds(): Bounds\n {\n if (!this._boundsDirty) return this._bounds;\n\n this._boundsDirty = false;\n\n // TODO switch to idy dirty with tick..\n const bounds = this._bounds;\n\n bounds.clear();\n\n for (let i = 0; i < this.instructions.length; i++)\n {\n const instruction = this.instructions[i];\n const action = instruction.action;\n\n if (action === 'fill')\n {\n const data = instruction.data as FillInstruction['data'];\n\n bounds.addBounds(data.path.bounds);\n }\n else if (action === 'texture')\n {\n const data = instruction.data as TextureInstruction['data'];\n\n bounds.addFrame(data.dx, data.dy, data.dx + data.dw, data.dy + data.dh, data.transform);\n }\n if (action === 'stroke')\n {\n const data = instruction.data as StrokeInstruction['data'];\n\n const alignment = data.style.alignment;\n\n let outerPadding = (data.style.width * (1 - alignment));\n\n if (data.style.join === 'miter')\n {\n outerPadding *= getMaxMiterRatio(data.path, data.style.miterLimit);\n }\n\n const _bounds = data.path.bounds;\n\n bounds.addFrame(\n _bounds.minX - outerPadding,\n _bounds.minY - outerPadding,\n _bounds.maxX + outerPadding,\n _bounds.maxY + outerPadding\n );\n }\n }\n\n if (!bounds.isValid)\n {\n bounds.set(0, 0, 0, 0);\n }\n\n return bounds;\n }\n\n /**\n * Check to see if a point is contained within this geometry.\n * @param point - Point to check if it's contained.\n * @returns {boolean} `true` if the point is contained within geometry.\n */\n public containsPoint(point: PointData): boolean\n {\n // early out if the bounding box is not hit\n if (!this.bounds.containsPoint(point.x, point.y)) return false;\n\n const instructions = this.instructions;\n let hasHit = false;\n\n for (let k = 0; k < instructions.length; k++)\n {\n const instruction = instructions[k];\n\n const data = instruction.data as FillInstruction['data'];\n const path = data.path;\n\n if (!instruction.action || !path) continue;\n\n const style = data.style;\n const shapes = path.shapePath.shapePrimitives;\n\n for (let i = 0; i < shapes.length; i++)\n {\n const shape = shapes[i].shape;\n\n if (!style || !shape) continue;\n\n const transform = shapes[i].transform;\n\n const transformedPoint = transform ? transform.applyInverse(point, tmpPoint) : point;\n\n if (instruction.action === 'fill')\n {\n hasHit = shape.contains(transformedPoint.x, transformedPoint.y);\n }\n else\n {\n const strokeStyle = (style as ConvertedStrokeStyle);\n\n hasHit = shape.strokeContains(transformedPoint.x, transformedPoint.y, strokeStyle.width, strokeStyle.alignment);\n }\n\n const holes = data.hole;\n\n if (holes)\n {\n const holeShapes = holes.shapePath?.shapePrimitives;\n\n if (holeShapes)\n {\n for (let j = 0; j < holeShapes.length; j++)\n {\n if (holeShapes[j].shape.contains(transformedPoint.x, transformedPoint.y))\n {\n hasHit = false;\n }\n }\n }\n }\n\n if (hasHit)\n {\n return true;\n }\n }\n }\n\n return hasHit;\n }\n\n /** Unloads the GPU data from the graphics context. */\n public unload(): void\n {\n this.emit('unload', this);\n for (const key in this._gpuData)\n {\n this._gpuData[key]?.destroy();\n }\n this._gpuData = Object.create(null);\n }\n\n /**\n * Destroys the GraphicsData object.\n * @param options - Options parameter. A boolean will act as if all options\n * have been set to that value\n * @example\n * context.destroy();\n * context.destroy(true);\n * context.destroy({ texture: true, textureSource: true });\n */\n public destroy(options: TypeOrBool<TextureDestroyOptions> = false): void\n {\n if (this.destroyed) return;\n this.destroyed = true;\n this._stateStack.length = 0;\n this._transform = null;\n\n this.unload();\n this.emit('destroy', this);\n this.removeAllListeners();\n\n const destroyTexture = typeof options === 'boolean' ? options : options?.texture;\n\n if (destroyTexture)\n {\n const destroyTextureSource = typeof options === 'boolean' ? options : options?.textureSource;\n\n if (this._fillStyle.texture)\n {\n this._fillStyle.fill && 'uid' in this._fillStyle.fill\n ? this._fillStyle.fill.destroy()\n : this._fillStyle.texture.destroy(destroyTextureSource);\n }\n\n if (this._strokeStyle.texture)\n {\n this._strokeStyle.fill && 'uid' in this._strokeStyle.fill\n ? this._strokeStyle.fill.destroy()\n : this._strokeStyle.texture.destroy(destroyTextureSource);\n }\n }\n\n this._fillStyle = null;\n this._strokeStyle = null;\n\n this.instructions = null;\n this._activePath = null;\n this._bounds = null;\n this._stateStack = null;\n this.customShader = null;\n this._transform = null;\n }\n}\n","/**\n * The line cap styles for strokes.\n *\n * It can be:\n * - `butt`: The ends of the stroke are squared off at the endpoints.\n * - `round`: The ends of the stroke are rounded.\n * @category scene\n * @standard\n */\nexport type LineCap = 'butt' | 'round' | 'square';\n/**\n * The line join styles for strokes.\n *\n * It can be:\n * - `round`: The corners of the stroke are rounded.\n * - `bevel`: The corners of the stroke are squared off.\n * - `miter`: The corners of the stroke are extended to meet at a point.\n * @category scene\n * @standard\n */\nexport type LineJoin = 'round' | 'bevel' | 'miter';\n\n/** @internal */\nexport const closePointEps = 1e-4;\n/** @internal */\nexport const curveEps = 0.0001;\n","import { getOrientationOfPoints } from '../../../../maths/misc/getOrientationOfPoints';\nimport { Point } from '../../../../maths/point/Point';\nimport { closePointEps, curveEps } from '../const';\n\nimport type { StrokeAttributes } from '../FillTypes';\n\n/**\n * Buffers vertices to draw a square cap.\n *\n * Ignored from docs since it is not directly exposed.\n * @ignore\n * @private\n * @param {number} x - X-coord of end point\n * @param {number} y - Y-coord of end point\n * @param {number} nx - X-coord of line normal pointing inside\n * @param {number} ny - Y-coord of line normal pointing inside\n * @param {number} innerWeight - Weight of inner points\n * @param {number} outerWeight - Weight of outer points\n * @param {boolean} clockwise - Whether the cap is drawn clockwise\n * @param {Array<number>} verts - vertex buffer\n * @returns {number} - no. of vertices pushed\n */\nfunction square(\n x: number,\n y: number,\n nx: number,\n ny: number,\n innerWeight: number,\n outerWeight: number,\n clockwise: boolean, /* rotation for square (true at left end, false at right end) */\n verts: Array<number>\n): number\n{\n const ix = x - (nx * innerWeight);\n const iy = y - (ny * innerWeight);\n const ox = x + (nx * outerWeight);\n const oy = y + (ny * outerWeight);\n\n /* Rotate nx,ny for extension vector */\n let exx; let\n eyy;\n\n if (clockwise)\n {\n exx = ny;\n eyy = -nx;\n }\n else\n {\n exx = -ny;\n eyy = nx;\n }\n\n /* [i|0]x,y extended at cap */\n const eix = ix + exx;\n const eiy = iy + eyy;\n const eox = ox + exx;\n const eoy = oy + eyy;\n\n /* Square itself must be inserted clockwise*/\n verts.push(eix, eiy);\n verts.push(eox, eoy);\n\n return 2;\n}\n\n/**\n * Buffers vertices to draw an arc at the line joint or cap.\n *\n * Ignored from docs since it is not directly exposed.\n * @ignore\n * @private\n * @param {number} cx - X-coord of center\n * @param {number} cy - Y-coord of center\n * @param {number} sx - X-coord of arc start\n * @param {number} sy - Y-coord of arc start\n * @param {number} ex - X-coord of arc end\n * @param {number} ey - Y-coord of arc end\n * @param {Array[]} verts - buffer of vertices\n * @param {boolean} clockwise - orientation of vertices\n * @returns {number} - no. of vertices pushed\n */\nfunction round(\n cx: number,\n cy: number,\n sx: number,\n sy: number,\n ex: number,\n ey: number,\n verts: number[],\n clockwise: boolean, /* if not cap, then clockwise is turn of joint, otherwise rotation from angle0 to angle1 */\n): number\n{\n const cx2p0x = sx - cx;\n const cy2p0y = sy - cy;\n\n let angle0 = Math.atan2(cx2p0x, cy2p0y);\n let angle1 = Math.atan2(ex - cx, ey - cy);\n\n if (clockwise && angle0 < angle1)\n {\n angle0 += Math.PI * 2;\n }\n else if (!clockwise && angle0 > angle1)\n {\n angle1 += Math.PI * 2;\n }\n\n let startAngle = angle0;\n const angleDiff = angle1 - angle0;\n const absAngleDiff = Math.abs(angleDiff);\n\n const radius = Math.sqrt((cx2p0x * cx2p0x) + (cy2p0y * cy2p0y));\n const segCount = ((15 * absAngleDiff * Math.sqrt(radius) / Math.PI) >> 0) + 1;\n const angleInc = angleDiff / segCount;\n\n startAngle += angleInc;\n\n if (clockwise)\n {\n verts.push(cx, cy);\n verts.push(sx, sy);\n\n for (let i = 1, angle = startAngle; i < segCount; i++, angle += angleInc)\n {\n verts.push(cx, cy);\n verts.push(cx + ((Math.sin(angle) * radius)),\n cy + ((Math.cos(angle) * radius)));\n }\n\n verts.push(cx, cy);\n verts.push(ex, ey);\n }\n else\n {\n verts.push(sx, sy);\n verts.push(cx, cy);\n\n for (let i = 1, angle = startAngle; i < segCount; i++, angle += angleInc)\n {\n verts.push(cx + ((Math.sin(angle) * radius)),\n cy + ((Math.cos(angle) * radius)));\n verts.push(cx, cy);\n }\n\n verts.push(ex, ey);\n verts.push(cx, cy);\n }\n\n return segCount * 2;\n}\n\n/**\n * Builds a line to draw using the polygon method.\n * @param points\n * @param lineStyle\n * @param flipAlignment\n * @param closed\n * @param vertices\n * @param indices\n * @internal\n */\nexport function buildLine(\n points: number[],\n lineStyle: StrokeAttributes,\n flipAlignment: boolean,\n closed: boolean,\n vertices: number[],\n indices: number[],\n): void\n{\n // const shape = graphicsData.shape as Polygon;\n // let points = graphicsData.points || shape.points.slice();\n const eps = closePointEps;\n\n if (points.length === 0)\n {\n return;\n }\n\n const style = lineStyle;\n\n let alignment = style.alignment;\n\n if (lineStyle.alignment !== 0.5)\n {\n // rotate the points!\n let orientation = getOrientationOfPoints(points);\n\n if (flipAlignment)orientation *= -1;\n\n alignment = ((alignment - 0.5) * orientation) + 0.5;\n }\n\n // get first and last point.. figure out the middle!\n const firstPoint = new Point(points[0], points[1]);\n const lastPoint = new Point(points[points.length - 2], points[points.length - 1]);\n const closedShape = closed;\n const closedPath = Math.abs(firstPoint.x - lastPoint.x) < eps\n && Math.abs(firstPoint.y - lastPoint.y) < eps;\n\n // if the first point is the last point - gonna have issues :)\n if (closedShape)\n {\n // need to clone as we are going to slightly modify the shape..\n points = points.slice();\n\n if (closedPath)\n {\n points.pop();\n points.pop();\n lastPoint.set(points[points.length - 2], points[points.length - 1]);\n }\n\n const midPointX = (firstPoint.x + lastPoint.x) * 0.5;\n const midPointY = (lastPoint.y + firstPoint.y) * 0.5;\n\n points.unshift(midPointX, midPointY);\n points.push(midPointX, midPointY);\n }\n\n const verts = vertices;\n\n const length = points.length / 2;\n let indexCount = points.length;\n const indexStart = verts.length / 2;\n\n // Max. inner and outer width\n const width = style.width / 2;\n const widthSquared = width * width;\n const miterLimitSquared = style.miterLimit * style.miterLimit;\n\n /* Line segments of interest where (x1,y1) forms the corner. */\n let x0 = points[0];\n let y0 = points[1];\n let x1 = points[2];\n let y1 = points[3];\n let x2 = 0;\n let y2 = 0;\n\n /* perp[?](x|y) = the line normal with magnitude lineWidth. */\n let perpX = -(y0 - y1);\n let perpY = x0 - x1;\n let perp1x = 0;\n let perp1y = 0;\n\n let dist = Math.sqrt((perpX * perpX) + (perpY * perpY));\n\n perpX /= dist;\n perpY /= dist;\n perpX *= width;\n perpY *= width;\n\n const ratio = alignment;// 0.5;\n const innerWeight = (1 - ratio) * 2;\n const outerWeight = ratio * 2;\n\n if (!closedShape)\n {\n if (style.cap === 'round')\n {\n indexCount += round(\n x0 - (perpX * (innerWeight - outerWeight) * 0.5),\n y0 - (perpY * (innerWeight - outerWeight) * 0.5),\n x0 - (perpX * innerWeight),\n y0 - (perpY * innerWeight),\n x0 + (perpX * outerWeight),\n y0 + (perpY * outerWeight),\n verts,\n true,\n ) + 2;\n }\n else if (style.cap === 'square')\n {\n indexCount += square(x0, y0, perpX, perpY, innerWeight, outerWeight, true, verts);\n }\n }\n\n // Push first point (below & above vertices)\n verts.push(\n x0 - (perpX * innerWeight),\n y0 - (perpY * innerWeight));\n verts.push(\n x0 + (perpX * outerWeight),\n y0 + (perpY * outerWeight));\n\n for (let i = 1; i < length - 1; ++i)\n {\n x0 = points[(i - 1) * 2];\n y0 = points[((i - 1) * 2) + 1];\n\n x1 = points[i * 2];\n y1 = points[(i * 2) + 1];\n\n x2 = points[(i + 1) * 2];\n y2 = points[((i + 1) * 2) + 1];\n\n perpX = -(y0 - y1);\n perpY = x0 - x1;\n\n dist = Math.sqrt((perpX * perpX) + (perpY * perpY));\n perpX /= dist;\n perpY /= dist;\n perpX *= width;\n perpY *= width;\n\n perp1x = -(y1 - y2);\n perp1y = x1 - x2;\n\n dist = Math.sqrt((perp1x * perp1x) + (perp1y * perp1y));\n perp1x /= dist;\n perp1y /= dist;\n perp1x *= width;\n perp1y *= width;\n\n /* d[x|y](0|1) = the component displacement between points p(0,1|1,2) */\n const dx0 = x1 - x0;\n const dy0 = y0 - y1;\n const dx1 = x1 - x2;\n const dy1 = y2 - y1;\n\n /* +ve if internal angle < 90 degree, -ve if internal angle > 90 degree. */\n const dot = (dx0 * dx1) + (dy0 * dy1);\n /* +ve if internal angle counterclockwise, -ve if internal angle clockwise. */\n const cross = (dy0 * dx1) - (dy1 * dx0);\n const clockwise = (cross < 0);\n\n /* Going nearly parallel? */\n /* atan(0.001) ~= 0.001 rad ~= 0.057 degree */\n if (Math.abs(cross) < 0.001 * Math.abs(dot))\n {\n verts.push(\n x1 - (perpX * innerWeight),\n y1 - (perpY * innerWeight));\n verts.push(\n x1 + (perpX * outerWeight),\n y1 + (perpY * outerWeight));\n\n /* 180 degree corner? */\n if (dot >= 0)\n {\n if (style.join === 'round')\n {\n indexCount += round(\n x1, y1,\n x1 - (perpX * innerWeight), y1 - (perpY * innerWeight),\n x1 - (perp1x * innerWeight), y1 - (perp1y * innerWeight),\n verts, false) + 4;\n }\n else\n {\n indexCount += 2;\n }\n\n verts.push(\n x1 - (perp1x * outerWeight),\n y1 - (perp1y * outerWeight));\n verts.push(\n x1 + (perp1x * innerWeight),\n y1 + (perp1y * innerWeight));\n }\n\n continue;\n }\n\n /* p[x|y] is the miter point. pDist is the distance between miter point and p1. */\n const c1 = ((-perpX + x0) * (-perpY + y1)) - ((-perpX + x1) * (-perpY + y0));\n const c2 = ((-perp1x + x2) * (-perp1y + y1)) - ((-perp1x + x1) * (-perp1y + y2));\n const px = ((dx0 * c2) - (dx1 * c1)) / cross;\n const py = ((dy1 * c1) - (dy0 * c2)) / cross;\n const pDist = ((px - x1) * (px - x1)) + ((py - y1) * (py - y1));\n\n /* Inner miter point */\n const imx = x1 + ((px - x1) * innerWeight);\n const imy = y1 + ((py - y1) * innerWeight);\n /* Outer miter point */\n const omx = x1 - ((px - x1) * outerWeight);\n const omy = y1 - ((py - y1) * outerWeight);\n\n /* Is the inside miter point too far away, creating a spike? */\n const smallerInsideSegmentSq = Math.min((dx0 * dx0) + (dy0 * dy0), (dx1 * dx1) + (dy1 * dy1));\n const insideWeight = clockwise ? innerWeight : outerWeight;\n const smallerInsideDiagonalSq = smallerInsideSegmentSq + (insideWeight * insideWeight * widthSquared);\n const insideMiterOk = pDist <= smallerInsideDiagonalSq;\n\n if (insideMiterOk)\n {\n if (style.join === 'bevel' || pDist / widthSquared > miterLimitSquared)\n {\n if (clockwise) /* rotating at inner angle */\n {\n verts.push(imx, imy); // inner miter point\n verts.push(x1 + (perpX * outerWeight), y1 + (perpY * outerWeight)); // first segment's outer vertex\n verts.push(imx, imy); // inner miter point\n verts.push(x1 + (perp1x * outerWeight), y1 + (perp1y * outerWeight)); // second segment's outer vertex\n }\n else /* rotating at outer angle */\n {\n verts.push(x1 - (perpX * innerWeight), y1 - (perpY * innerWeight)); // first segment's inner vertex\n verts.push(omx, omy); // outer miter point\n verts.push(x1 - (perp1x * innerWeight), y1 - (perp1y * innerWeight)); // second segment's outer vertex\n verts.push(omx, omy); // outer miter point\n }\n\n indexCount += 2;\n }\n else if (style.join === 'round')\n {\n if (clockwise) /* arc is outside */\n {\n verts.push(imx, imy);\n verts.push(x1 + (perpX * outerWeight), y1 + (perpY * outerWeight));\n\n indexCount += round(\n x1, y1,\n x1 + (perpX * outerWeight), y1 + (perpY * outerWeight),\n x1 + (perp1x * outerWeight), y1 + (perp1y * outerWeight),\n verts, true\n ) + 4;\n\n verts.push(imx, imy);\n verts.push(x1 + (perp1x * outerWeight), y1 + (perp1y * outerWeight));\n }\n else /* arc is inside */\n {\n verts.push(x1 - (perpX * innerWeight), y1 - (perpY * innerWeight));\n verts.push(omx, omy);\n\n indexCount += round(\n x1, y1,\n x1 - (perpX * innerWeight), y1 - (perpY * innerWeight),\n x1 - (perp1x * innerWeight), y1 - (perp1y * innerWeight),\n verts, false\n ) + 4;\n\n verts.push(x1 - (perp1x * innerWeight), y1 - (perp1y * innerWeight));\n verts.push(omx, omy);\n }\n }\n else\n {\n verts.push(imx, imy);\n verts.push(omx, omy);\n }\n }\n else // inside miter is NOT ok\n {\n verts.push(x1 - (perpX * innerWeight), y1 - (perpY * innerWeight)); // first segment's inner vertex\n verts.push(x1 + (perpX * outerWeight), y1 + (perpY * outerWeight)); // first segment's outer vertex\n if (style.join === 'round')\n {\n if (clockwise) /* arc is outside */\n {\n indexCount += round(\n x1, y1,\n x1 + (perpX * outerWeight), y1 + (perpY * outerWeight),\n x1 + (perp1x * outerWeight), y1 + (perp1y * outerWeight),\n verts, true\n ) + 2;\n }\n else /* arc is inside */\n {\n indexCount += round(\n x1, y1,\n x1 - (perpX * innerWeight), y1 - (perpY * innerWeight),\n x1 - (perp1x * innerWeight), y1 - (perp1y * innerWeight),\n verts, false\n ) + 2;\n }\n }\n else if (style.join === 'miter' && pDist / widthSquared <= miterLimitSquared)\n {\n if (clockwise)\n {\n verts.push(omx, omy); // inner miter point\n verts.push(omx, omy); // inner miter point\n }\n else\n {\n verts.push(imx, imy); // outer miter point\n verts.push(imx, imy); // outer miter point\n }\n indexCount += 2;\n }\n verts.push(x1 - (perp1x * innerWeight), y1 - (perp1y * innerWeight)); // second segment's inner vertex\n verts.push(x1 + (perp1x * outerWeight), y1 + (perp1y * outerWeight)); // second segment's outer vertex\n indexCount += 2;\n }\n }\n\n x0 = points[(length - 2) * 2];\n y0 = points[((length - 2) * 2) + 1];\n\n x1 = points[(length - 1) * 2];\n y1 = points[((length - 1) * 2) + 1];\n\n perpX = -(y0 - y1);\n perpY = x0 - x1;\n\n dist = Math.sqrt((perpX * perpX) + (perpY * perpY));\n perpX /= dist;\n perpY /= dist;\n perpX *= width;\n perpY *= width;\n\n verts.push(x1 - (perpX * innerWeight), y1 - (perpY * innerWeight));\n verts.push(x1 + (perpX * outerWeight), y1 + (perpY * outerWeight));\n\n if (!closedShape)\n {\n if (style.cap === 'round')\n {\n indexCount += round(\n x1 - (perpX * (innerWeight - outerWeight) * 0.5),\n y1 - (perpY * (innerWeight - outerWeight) * 0.5),\n x1 - (perpX * innerWeight),\n y1 - (perpY * innerWeight),\n x1 + (perpX * outerWeight),\n y1 + (perpY * outerWeight),\n verts,\n false\n ) + 2;\n }\n else if (style.cap === 'square')\n {\n indexCount += square(x1, y1, perpX, perpY, innerWeight, outerWeight, false, verts);\n }\n }\n\n // const indices = graphicsGeometry.indices;\n const eps2 = curveEps * curveEps;\n\n // indices.push(indexStart);\n for (let i = indexStart; i < indexCount + indexStart - 2; ++i)\n {\n x0 = verts[(i * 2)];\n y0 = verts[(i * 2) + 1];\n\n x1 = verts[(i + 1) * 2];\n y1 = verts[((i + 1) * 2) + 1];\n\n x2 = verts[(i + 2) * 2];\n y2 = verts[((i + 2) * 2) + 1];\n\n /* Skip zero area triangles */\n if (Math.abs((x0 * (y1 - y2)) + (x1 * (y2 - y0)) + (x2 * (y0 - y1))) < eps2)\n {\n continue;\n }\n\n indices.push(i, i + 1, i + 2);\n }\n}\n\n","import { Color } from '../../../../color/Color';\nimport { DOMAdapter } from '../../../../environment/adapter';\nimport { Matrix } from '../../../../maths/matrix/Matrix';\nimport { type WRAP_MODE } from '../../../../rendering/renderers/shared/texture/const';\nimport { ImageSource } from '../../../../rendering/renderers/shared/texture/sources/ImageSource';\nimport { Texture } from '../../../../rendering/renderers/shared/texture/Texture';\nimport { uid } from '../../../../utils/data/uid';\nimport { deprecation } from '../../../../utils/logging/deprecation';\nimport { definedProps } from '../../../container/utils/definedProps';\n\nimport type { ColorSource } from '../../../../color/Color';\nimport type { PointData } from '../../../../maths/point/PointData';\nimport type { CanvasAndContext } from '../../../../rendering/renderers/shared/texture/CanvasPool';\nimport type { TextureSpace } from '../FillTypes';\n\n/**\n * Defines the type of gradient to create.\n *\n * It can be:\n * - 'linear': A linear gradient that transitions colors along a straight line.\n * - 'radial': A radial gradient that transitions colors in a circular pattern from an inner circle to an outer circle.\n * @category scene\n * @standard\n */\nexport type GradientType = 'linear' | 'radial';\n\n/**\n * Represents the style options for a linear gradient fill.\n * @category scene\n * @standard\n */\nexport interface BaseGradientOptions\n{\n /** The type of gradient */\n type?: GradientType;\n /** Array of colors stops to use in the gradient */\n colorStops?: { offset: number, color: ColorSource }[];\n /** Whether coordinates are 'global' or 'local' */\n textureSpace?: TextureSpace;\n /**\n * The size of the texture to use for the gradient - this is for advanced usage.\n * The texture size does not need to match the size of the object being drawn.\n * Due to GPU interpolation, gradient textures can be relatively small!\n * Consider using a larger texture size if your gradient has a lot of very tight color steps\n */\n textureSize?: number;\n /**\n * The wrap mode of the gradient.\n * This can be 'clamp-to-edge' or 'repeat'.\n * @default 'clamp-to-edge'\n */\n wrapMode?: WRAP_MODE\n}\n\n/**\n * Options specific to linear gradients.\n * A linear gradient creates a smooth transition between colors along a straight line defined by start and end points.\n * @category scene\n * @standard\n */\nexport interface LinearGradientOptions extends BaseGradientOptions\n{\n /** The type of gradient. Must be 'linear' for linear gradients. */\n type?: 'linear';\n\n /**\n * The start point of the gradient.\n * This point defines where the gradient begins.\n * It is represented as a PointData object containing x and y coordinates.\n * The coordinates are in local space by default (0-1), but can be in global space if specified.\n */\n start?: PointData;\n\n /**\n * The end point of the gradient.\n * This point defines where the gradient ends.\n * It is represented as a PointData object containing x and y coordinates.\n * The coordinates are in local space by default (0-1), but can be in global space if specified.\n */\n end?: PointData;\n}\n\n/**\n * Options specific to radial gradients.\n * A radial gradient creates a smooth transition between colors that radiates outward in a circular pattern.\n * The gradient is defined by inner and outer circles, each with their own radius.\n * @category scene\n * @standard\n */\nexport interface RadialGradientOptions extends BaseGradientOptions\n{\n /** The type of gradient. Must be 'radial' for radial gradients. */\n type?: 'radial';\n /** The center point of the inner circle where the gradient begins. In local coordinates by default (0-1). */\n center?: PointData;\n /** The radius of the inner circle where the gradient begins. */\n innerRadius?: number;\n /** The center point of the outer circle where the gradient ends. In local coordinates by default (0-1). */\n outerCenter?: PointData;\n /** The radius of the outer circle where the gradient ends. */\n outerRadius?: number;\n /**\n * The y scale of the gradient, use this to make the gradient elliptical.\n * NOTE: Only applied to radial gradients used with Graphics.\n */\n scale?: number;\n /**\n * The rotation of the gradient in radians, useful for making the gradient elliptical.\n * NOTE: Only applied to radial gradients used with Graphics.\n */\n rotation?: number;\n}\n\n/**\n * Options for creating a gradient fill.\n * @category scene\n * @standard\n */\nexport type GradientOptions = LinearGradientOptions | RadialGradientOptions;\n\n/**\n * If no color stops are provided, we use a default gradient of white to black - this is to avoid a blank gradient if a dev\n * forgets to set them.\n */\nconst emptyColorStops: { offset: number, color: string }[] = [{ offset: 0, color: 'white' }, { offset: 1, color: 'black' }];\n\n/**\n * Class representing a gradient fill that can be used to fill shapes and text.\n * Supports both linear and radial gradients with multiple color stops.\n *\n * For linear gradients, color stops define colors and positions (0 to 1) along a line from start point (x0,y0)\n * to end point (x1,y1).\n *\n * For radial gradients, color stops define colors between two circles - an inner circle centered at (x0,y0) with radius r0,\n * and an outer circle centered at (x1,y1) with radius r1.\n * @example\n * ```ts\n * // Create a vertical linear gradient from red to blue\n * const linearGradient = new FillGradient({\n * type: 'linear',\n * start: { x: 0, y: 0 }, // Start at top\n * end: { x: 0, y: 1 }, // End at bottom\n * colorStops: [\n * { offset: 0, color: 'red' }, // Red at start\n * { offset: 1, color: 'blue' } // Blue at end\n * ],\n * // Use normalized coordinate system where (0,0) is the top-left and (1,1) is the bottom-right of the shape\n * textureSpace: 'local'\n * });\n *\n * // Create a radial gradient from yellow center to green edge\n * const radialGradient = new FillGradient({\n * type: 'radial',\n * center: { x: 0.5, y: 0.5 },\n * innerRadius: 0,\n * outerCenter: { x: 0.5, y: 0.5 },\n * outerRadius: 0.5,\n * colorStops: [\n * { offset: 0, color: 'yellow' }, // Center color\n * { offset: 1, color: 'green' } // Edge color\n * ],\n * // Use normalized coordinate system where (0,0) is the top-left and (1,1) is the bottom-right of the shape\n * textureSpace: 'local'\n * });\n *\n * // Create a rainbow linear gradient in global coordinates\n * const globalGradient = new FillGradient({\n * type: 'linear',\n * start: { x: 0, y: 0 },\n * end: { x: 100, y: 0 },\n * colorStops: [\n * { offset: 0, color: 0xff0000 }, // Red\n * { offset: 0.33, color: 0x00ff00 }, // Green\n * { offset: 0.66, color: 0x0000ff }, // Blue\n * { offset: 1, color: 0xff00ff } // Purple\n * ],\n * textureSpace: 'global' // Use world coordinates\n * });\n *\n * // Create an offset radial gradient\n * const offsetRadial = new FillGradient({\n * type: 'radial',\n * center: { x: 0.3, y: 0.3 },\n * innerRadius: 0.1,\n * outerCenter: { x: 0.5, y: 0.5 },\n * outerRadius: 0.5,\n * colorStops: [\n * { offset: 0, color: 'white' },\n * { offset: 1, color: 'black' }\n * ],\n * // Use normalized coordinate system where (0,0) is the top-left and (1,1) is the bottom-right of the shape\n * textureSpace: 'local'\n * });\n * ```\n *\n * Internally this creates a texture of the gradient then applies a\n * transform to it to give it the correct size and angle.\n *\n * This means that it's important to destroy a gradient when it is no longer needed\n * to avoid memory leaks.\n *\n * If you want to animate a gradient then it's best to modify and update an existing one\n * rather than creating a whole new one each time. That or use a custom shader.\n * @category scene\n * @standard\n */\nexport class FillGradient implements CanvasGradient\n{\n /** Default options for creating a gradient fill */\n public static readonly defaultLinearOptions: LinearGradientOptions = {\n start: { x: 0, y: 0 },\n end: { x: 0, y: 1 },\n colorStops: [],\n textureSpace: 'local',\n type: 'linear',\n textureSize: 256,\n wrapMode: 'clamp-to-edge'\n };\n\n /** Default options for creating a radial gradient fill */\n public static readonly defaultRadialOptions: RadialGradientOptions = {\n center: { x: 0.5, y: 0.5 },\n innerRadius: 0,\n outerRadius: 0.5,\n colorStops: [],\n scale: 1,\n rotation: 0,\n textureSpace: 'local',\n type: 'radial',\n textureSize: 256,\n wrapMode: 'clamp-to-edge'\n };\n\n /**\n * Unique identifier for this gradient instance\n * @internal\n */\n public readonly uid: number = uid('fillGradient');\n /**\n * Internal tick counter to track changes in the gradient.\n * This is used to invalidate the gradient when the texture changes.\n * @internal\n */\n public _tick: number = 0;\n /** Type of gradient - currently only supports 'linear' */\n public readonly type: GradientType = 'linear';\n\n /** Internal texture used to render the gradient */\n public texture: Texture;\n /** Transform matrix for positioning the gradient */\n public transform: Matrix;\n /** Array of color stops defining the gradient */\n public colorStops: Array<{ offset: number, color: string }> = [];\n\n /** Whether gradient coordinates are in local or global space */\n public textureSpace: TextureSpace;\n private readonly _textureSize: number;\n\n /** The start point of the linear gradient */\n public start: PointData;\n /** The end point of the linear gradient */\n public end: PointData;\n /** The wrap mode of the gradient texture */\n private readonly _wrapMode: WRAP_MODE;\n\n /** The center point of the inner circle of the radial gradient */\n public center: PointData;\n /** The center point of the outer circle of the radial gradient */\n public outerCenter: PointData;\n /** The radius of the inner circle of the radial gradient */\n public innerRadius: number;\n /** The radius of the outer circle of the radial gradient */\n public outerRadius: number;\n /** The scale of the radial gradient */\n public scale: number;\n /** The rotation of the radial gradient */\n public rotation: number;\n\n /**\n * Creates a new gradient fill. The constructor behavior changes based on the gradient type.\n * @param {GradientOptions} options - The options for the gradient\n * @see {@link LinearGradientOptions}\n * @see {@link RadialGradientOptions}\n */\n constructor(options: GradientOptions);\n /**\n * Deprecated: Use the options object instead.\n * @deprecated since 8.5.2\n * @ignore\n */\n constructor(\n x0?: number,\n y0?: number,\n x1?: number,\n y1?: number,\n textureSpace?: TextureSpace,\n textureSize?: number\n );\n constructor(...args: [GradientOptions] | [number?, number?, number?, number?, TextureSpace?, number?])\n {\n let options = ensureGradientOptions(args);\n\n const defaults = options.type === 'radial' ? FillGradient.defaultRadialOptions : FillGradient.defaultLinearOptions;\n\n options = { ...defaults, ...definedProps(options) };\n\n this._textureSize = options.textureSize;\n this._wrapMode = options.wrapMode;\n\n if (options.type === 'radial')\n {\n this.center = options.center;\n this.outerCenter = options.outerCenter ?? this.center;\n this.innerRadius = options.innerRadius;\n this.outerRadius = options.outerRadius;\n this.scale = options.scale;\n this.rotation = options.rotation;\n }\n else\n {\n this.start = options.start;\n this.end = options.end;\n }\n\n this.textureSpace = options.textureSpace;\n\n this.type = options.type;\n options.colorStops.forEach((stop) =>\n {\n this.addColorStop(stop.offset, stop.color);\n });\n }\n\n /**\n * Adds a color stop to the gradient\n * @param offset - Position of the stop (0-1)\n * @param color - Color of the stop\n * @returns This gradient instance for chaining\n */\n public addColorStop(offset: number, color: ColorSource): this\n {\n this.colorStops.push({ offset, color: Color.shared.setValue(color).toHexa() });\n\n return this;\n }\n\n /**\n * Builds the internal texture and transform for the gradient.\n * Called automatically when the gradient is first used.\n * @internal\n */\n public buildLinearGradient(): void\n {\n if (this.texture) return;\n\n let { x: x0, y: y0 } = this.start;\n let { x: x1, y: y1 } = this.end;\n\n let dx = x1 - x0;\n let dy = y1 - y0;\n\n // Determine flip based on original dx/dy and swap coordinates if necessary\n const flip = dx < 0 || dy < 0;\n\n if (this._wrapMode === 'clamp-to-edge')\n {\n if (dx < 0)\n {\n const temp = x0;\n\n x0 = x1;\n x1 = temp;\n dx *= -1;\n }\n if (dy < 0)\n {\n const temp = y0;\n\n y0 = y1;\n y1 = temp;\n dy *= -1;\n }\n }\n\n const colorStops = this.colorStops.length ? this.colorStops : emptyColorStops;\n\n const defaultSize = this._textureSize;\n\n const { canvas, context } = getCanvas(defaultSize, 1);\n\n const gradient = !flip\n ? context.createLinearGradient(0, 0, this._textureSize, 0)\n : context.createLinearGradient(this._textureSize, 0, 0, 0);\n\n addColorStops(gradient, colorStops);\n\n context.fillStyle = gradient;\n context.fillRect(0, 0, defaultSize, 1);\n\n this.texture = new Texture({\n source: new ImageSource({\n resource: canvas,\n addressMode: this._wrapMode,\n }),\n });\n\n // generate some UVS based on the gradient direction sent\n\n const dist = Math.sqrt((dx * dx) + (dy * dy));\n const angle = Math.atan2(dy, dx);\n\n // little offset to stop the uvs from flowing over the edge..\n // this matrix is inverted when used in the graphics\n // add a tiny off set to prevent uv bleeding..\n const m = new Matrix();\n\n m.scale((dist / defaultSize), 1);\n m.rotate(angle);\n m.translate(x0, y0);\n\n if (this.textureSpace === 'local')\n {\n m.scale(defaultSize, defaultSize);\n }\n this.transform = m;\n }\n\n /**\n * Builds the internal texture and transform for the gradient.\n * Called automatically when the gradient is first used.\n * @internal\n */\n public buildGradient(): void\n {\n if (!this.texture) this._tick++;\n if (this.type === 'linear')\n {\n this.buildLinearGradient();\n }\n else\n {\n this.buildRadialGradient();\n }\n }\n\n /**\n * Builds the internal texture and transform for the radial gradient.\n * Called automatically when the gradient is first used.\n * @internal\n */\n public buildRadialGradient(): void\n {\n if (this.texture) return;\n\n const colorStops = this.colorStops.length ? this.colorStops : emptyColorStops;\n\n const defaultSize = this._textureSize;\n const { canvas, context } = getCanvas(defaultSize, defaultSize);\n\n const { x: x0, y: y0 } = this.center;\n const { x: x1, y: y1 } = this.outerCenter;\n\n const r0 = this.innerRadius;\n const r1 = this.outerRadius;\n\n const ox = x1 - r1;\n const oy = y1 - r1;\n\n const scale = defaultSize / (r1 * 2);\n\n const cx = (x0 - ox) * scale;\n const cy = (y0 - oy) * scale;\n\n const gradient = context.createRadialGradient(\n cx,\n cy,\n r0 * scale,\n (x1 - ox) * scale,\n (y1 - oy) * scale,\n r1 * scale\n );\n\n addColorStops(gradient, colorStops);\n\n context.fillStyle = colorStops[colorStops.length - 1].color;\n context.fillRect(0, 0, defaultSize, defaultSize);\n\n context.fillStyle = gradient;\n\n // First translate to center\n context.translate(cx, cy);\n\n // Then apply rotation\n context.rotate(this.rotation);\n\n // Then scale2\n context.scale(1, this.scale);\n\n // Finally translate back, taking scale into account\n context.translate(-cx, -cy);\n\n context.fillRect(0, 0, defaultSize, defaultSize);\n\n this.texture = new Texture({\n source: new ImageSource({\n resource: canvas,\n addressMode: this._wrapMode,\n }),\n });\n\n // this matrix is inverted when used in the graphics\n const m = new Matrix();\n\n if (this.textureSpace === 'local')\n {\n m.scale(2 * r1, 2 * r1);\n }\n else\n {\n m.scale(1 / scale, 1 / scale);\n }\n m.translate(ox, oy);\n\n this.transform = m;\n }\n\n /** Destroys the gradient, releasing resources. This will also destroy the internal texture. */\n public destroy(): void\n {\n this.texture?.destroy(true);\n this.texture = null;\n this.transform = null;\n this.colorStops = [];\n this.start = null;\n this.end = null;\n this.center = null;\n this.outerCenter = null;\n }\n\n /**\n * Returns a unique key for this gradient instance.\n * This key is used for caching and texture management.\n * @returns {string} Unique key for the gradient\n */\n public get styleKey(): string\n {\n return `fill-gradient-${this.uid}-${this._tick}`;\n }\n}\n\nfunction addColorStops(gradient: CanvasGradient, colorStops: { offset: number, color: string }[]): void\n{\n for (let i = 0; i < colorStops.length; i++)\n {\n const stop = colorStops[i];\n\n gradient.addColorStop(stop.offset, stop.color);\n }\n}\n\nfunction getCanvas(width: number, height: number): CanvasAndContext\n{\n const canvas = DOMAdapter.get().createCanvas(width, height);\n const context = canvas.getContext('2d');\n\n return { canvas, context };\n}\n\n/**\n * Helper function to ensure consistent handling of gradient options.\n * This function handles both the new options object format and the deprecated parameter format.\n * @example\n * // New recommended way:\n * const options = ensureGradientOptions({\n * start: { x: 0, y: 0 },\n * end: { x: 100, y: 100 },\n * textureSpace: 'local'\n * });\n *\n * // Deprecated way (will show warning in debug):\n * const options = ensureGradientOptions([0, 0, 100, 100, 'local']);\n * @param args - Arguments passed to gradient constructor\n * @returns Normalized gradient options object\n * @internal\n */\nfunction ensureGradientOptions(\n args: any[],\n): GradientOptions\n{\n let options = (args[0] ?? {}) as GradientOptions;\n\n // @deprecated\n if (typeof options === 'number' || args[1])\n {\n // #if _DEBUG\n deprecation('8.5.2', `use options object instead`);\n // #endif\n\n options = {\n type: 'linear',\n start: { x: args[0], y: args[1] },\n end: { x: args[2], y: args[3] },\n textureSpace: args[4] as 'global' | 'local',\n textureSize: args[5] ?? FillGradient.defaultLinearOptions.textureSize\n };\n }\n\n return options;\n}\n","import { Matrix } from '../../../../maths/matrix/Matrix';\nimport { uid } from '../../../../utils/data/uid';\n\nimport type { WRAP_MODE } from '../../../../rendering/renderers/shared/texture/const';\nimport type { Texture } from '../../../../rendering/renderers/shared/texture/Texture';\nimport type { TextureSpace } from '../FillTypes';\n\n/**\n * Defines the repetition modes for fill patterns.\n *\n * - `repeat`: The pattern repeats in both directions.\n * - `repeat-x`: The pattern repeats horizontally only.\n * - `repeat-y`: The pattern repeats vertically only.\n * - `no-repeat`: The pattern does not repeat.\n * @category scene\n * @standard\n */\nexport type PatternRepetition = 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat';\n\n/**\n * Options for creating a {@link FillPattern}.\n * A fill pattern tiles a {@link Texture} to fill shapes or text. Patterns are\n * commonly used for repeating backgrounds, decorative fills, and shape-fitted\n * textures.\n * @category scene\n * @standard\n * @example\n * ```ts\n * // Tiled background — repeats continuously across world space, so adjacent\n * // shapes share the same tiling grid.\n * const bricks = new FillPattern({\n * texture: await Assets.load('bricks.png'),\n * repetition: 'repeat',\n * });\n *\n * // One tile fitted to each shape — useful for shape-fitted decoration.\n * const fitted = new FillPattern({\n * texture: await Assets.load('bunny.png'),\n * repetition: 'repeat',\n * textureSpace: 'local',\n * });\n *\n * // Tile only along the x-axis; clamp vertically.\n * const stripes = new FillPattern({\n * texture: await Assets.load('stripe.png'),\n * repetition: 'repeat-x',\n * });\n *\n * // Single image, no tiling — clamp on both axes.\n * const logo = new FillPattern({\n * texture: await Assets.load('logo.png'),\n * repetition: 'no-repeat',\n * });\n * ```\n */\nexport interface FillPatternOptions\n{\n /**\n * The texture to use as the pattern source. The texture is tiled across\n * the filled area according to {@link FillPatternOptions.repetition} and\n * mapped to shapes according to {@link FillPatternOptions.textureSpace}.\n */\n texture: Texture;\n /**\n * How the pattern repeats across the filled area. If omitted, the texture's\n * existing wrap mode is used.\n * - `'repeat'`: tile in both X and Y.\n * - `'repeat-x'`: tile horizontally; clamp vertically.\n * - `'repeat-y'`: tile vertically; clamp horizontally.\n * - `'no-repeat'`: do not tile; clamp on both axes.\n */\n repetition?: PatternRepetition;\n /**\n * Whether pattern coordinates are evaluated in local or global space.\n * - `'global'` (default): the pattern tiles continuously across world\n * space, so adjacent shapes share the same tiling grid. Best for\n * backgrounds and seamless textures.\n * - `'local'`: the pattern is mapped to each shape's bounds, so one tile\n * fits the shape. Combine with {@link FillPattern.setTransform} to\n * subdivide a shape into a tile grid.\n * @default 'global'\n */\n textureSpace?: TextureSpace;\n}\n\nfunction isFillPatternOptions(value: Texture | FillPatternOptions): value is FillPatternOptions\n{\n return (value as FillPatternOptions).texture !== undefined;\n}\n\nconst repetitionMap = {\n repeat: {\n addressModeU: 'repeat',\n addressModeV: 'repeat',\n },\n 'repeat-x': {\n addressModeU: 'repeat',\n addressModeV: 'clamp-to-edge',\n },\n 'repeat-y': {\n addressModeU: 'clamp-to-edge',\n addressModeV: 'repeat',\n },\n 'no-repeat': {\n addressModeU: 'clamp-to-edge',\n addressModeV: 'clamp-to-edge',\n },\n};\n\n/**\n * A class that represents a fill pattern for use in Text and Graphics fills.\n * It allows for textures to be used as patterns, with optional repetition modes.\n *\n * Patterns default to {@link FillStyle.textureSpace `textureSpace: 'global'`},\n * meaning tiles repeat continuously across world space and adjacent shapes share\n * the same tiling grid. Pass `textureSpace: 'local'` to map a single tile to each\n * shape's bounds instead.\n * @category scene\n * @standard\n * @example\n * ```ts\n * const txt = await Assets.load('https://pixijs.com/assets/bg_scene_rotate.jpg');\n *\n * // global tiling (default) — pattern continues across shapes\n * const pat = new FillPattern({ texture: txt, repetition: 'repeat' });\n *\n * // legacy positional form is still supported\n * const pat2 = new FillPattern(txt, 'repeat');\n *\n * const textPattern = new Text({\n * text: 'PixiJS',\n * style: {\n * fontSize: 36,\n * fill: 0xffffff,\n * stroke: { fill: pat, width: 10 },\n * },\n * });\n * ```\n */\nexport class FillPattern implements CanvasPattern\n{\n /**\n * unique id for this fill pattern\n * @internal\n */\n public readonly uid: number = uid('fillPattern');\n /**\n * Internal tick counter to track changes in the pattern.\n * This is used to invalidate the pattern when the texture or transform changes.\n * @internal\n */\n public _tick: number = 0;\n /** @internal */\n public _texture: Texture;\n /** The transform matrix applied to the pattern */\n public transform = new Matrix();\n /**\n * Whether pattern coordinates are evaluated in local or global space.\n * @default 'global'\n */\n public textureSpace: TextureSpace;\n\n /**\n * Creates a new fill pattern.\n * @param options - The options for the fill pattern.\n */\n constructor(options: FillPatternOptions);\n /**\n * Creates a new fill pattern from a texture and optional repetition mode.\n * @param texture - The texture to tile.\n * @param repetition - How the pattern should repeat.\n */\n constructor(texture: Texture, repetition?: PatternRepetition);\n constructor(textureOrOptions: Texture | FillPatternOptions, repetition?: PatternRepetition)\n {\n const options: FillPatternOptions = isFillPatternOptions(textureOrOptions)\n ? textureOrOptions\n : { texture: textureOrOptions, repetition };\n\n this.texture = options.texture;\n this.textureSpace = options.textureSpace ?? 'global';\n\n const rep = options.repetition;\n\n if (rep)\n {\n this.texture.source.style.addressModeU = repetitionMap[rep].addressModeU as WRAP_MODE;\n this.texture.source.style.addressModeV = repetitionMap[rep].addressModeV as WRAP_MODE;\n }\n }\n\n /**\n * Sets the transform for the pattern\n * @param transform - The transform matrix to apply to the pattern.\n * If not provided, the pattern will use the default transform.\n */\n public setTransform(transform?: Matrix): void\n {\n if (transform)\n {\n if (this.transform.equals(transform)) return;\n this.transform.copyFrom(transform);\n }\n else\n {\n if (this.transform.isIdentity()) return;\n this.transform.identity();\n }\n\n this._tick++;\n }\n\n /** Internal texture used to render the gradient */\n public get texture()\n {\n return this._texture;\n }\n public set texture(value: Texture)\n {\n if (this._texture === value) return;\n\n this._texture = value;\n this._tick++;\n }\n\n /**\n * Returns a unique key for this instance.\n * This key is used for caching.\n * @returns {string} Unique key for the instance\n */\n public get styleKey(): string\n {\n return `fill-pattern-${this.uid}-${this._tick}`;\n }\n\n /** Destroys the fill pattern, releasing resources. This will also destroy the internal texture. */\n public destroy(): void\n {\n this.texture.destroy(true);\n this.texture = null;\n }\n}\n","import type {\n FillInstruction,\n GraphicsContext,\n} from '../../GraphicsContext';\n\n/**\n * Determines if subpaths represent nested shapes or multiple holes pattern.\n * @param subpathsWithArea - Array of subpaths with their calculated areas\n * @returns True if nested pattern, false if multiple holes pattern\n * @internal\n */\nexport function checkForNestedPattern(subpathsWithArea: Array<{path: string, area: number}>): boolean\n{\n if (subpathsWithArea.length <= 2)\n {\n return true;\n }\n\n const areas = subpathsWithArea.map((s) => s.area).sort((a, b) => b - a);\n\n const [largestArea, secondArea] = areas;\n const smallestArea = areas[areas.length - 1];\n\n const largestToSecondRatio = largestArea / secondArea;\n const secondToSmallestRatio = secondArea / smallestArea;\n\n // If the largest shape is significantly bigger than the second (3x+)\n // AND the smaller shapes are similar in size (2x or less difference),\n // it suggests multiple holes pattern rather than nested shapes\n if (largestToSecondRatio > 3 && secondToSmallestRatio < 2)\n {\n return false; // Multiple holes\n }\n\n return true; // Default to nested\n}\n\n/**\n * Gets fill instruction data from a graphics context.\n * @param context - The graphics context\n * @param index - Index of the fill instruction (default: 0)\n * @returns The fill instruction data\n * @throws Error if instruction at index is not a fill instruction\n * @internal\n */\nexport function getFillInstructionData(context: GraphicsContext, index: number = 0)\n{\n const instruction = context.instructions[index];\n\n if (!instruction || instruction.action !== 'fill')\n {\n throw new Error(`Expected fill instruction at index ${index}, got ${instruction?.action || 'undefined'}`);\n }\n\n return (instruction as FillInstruction).data;\n}\n","/**\n * @param points\n * @param x\n * @param y\n * @param radius\n * @param start\n * @param end\n * @param clockwise\n * @param steps\n * @internal\n */\nexport function buildArc(\n points: number[],\n x: number, y: number,\n radius: number,\n start: number,\n end: number,\n clockwise: boolean,\n steps?: number\n)\n{\n // determine distance between the two angles\n // ...probably a nicer way of writing this\n let dist = Math.abs(start - end);\n\n if (!clockwise && start > end)\n {\n dist = (2 * Math.PI) - dist;\n }\n else if (clockwise && end > start)\n {\n dist = (2 * Math.PI) - dist;\n }\n\n // approximate the # of steps using the cube root of the radius\n\n steps ||= Math.max(6, Math.floor(6 * Math.pow(radius, 1 / 3) * (dist / (Math.PI))));\n\n // ensure we have at least 3 steps..\n steps = Math.max(steps, 3);\n\n let f = dist / (steps);\n let t = start;\n\n // modify direction\n f *= clockwise ? -1 : 1;\n\n for (let i = 0; i < steps + 1; i++)\n {\n const cs = Math.cos(t);\n const sn = Math.sin(t);\n\n const nx = x + (cs * radius);\n const ny = y + (sn * radius);\n\n points.push(nx, ny);\n\n t += f;\n }\n}\n","/**\n * Extracts the ID from an SVG url() reference.\n *\n * This function handles all valid SVG url() formats including:\n * - url(#id)\n * - url('#id')\n * - url(\"#id\")\n * - url( #id )\n * - url( '#id' )\n * - url( \"#id\" )\n *\n * The regex pattern matches:\n * - url followed by optional whitespace\n * - opening parenthesis followed by optional whitespace\n * - optional single or double quotes with optional whitespace\n * - # followed by the ID (any chars except quotes, whitespace, or closing paren)\n * - optional single or double quotes with optional whitespace\n * - closing parenthesis\n * @param url - The SVG url() string to parse\n * @returns The extracted ID string, or empty string if no valid ID found\n * @internal\n */\nexport function extractSvgUrlId(url: string): string\n{\n // Handle all valid SVG url() formats\n const match = url.match(/url\\s*\\(\\s*['\"]?\\s*#([^'\"\\s)]+)\\s*['\"]?\\s*\\)/i);\n\n return match ? match[1] : '';\n}\n","import type { PointData } from '../../../../maths/point/PointData';\nimport type { ShapePath } from './ShapePath';\n\n/**\n * Typed and cleaned up version of:\n * https://stackoverflow.com/questions/44855794/html5-canvas-triangle-with-rounded-corners/44856925#44856925\n * @param g - Graphics to be drawn on.\n * @param points - Corners of the shape to draw. Minimum length is 3.\n * @param radius - Corners default radius.\n * @ignore\n */\nexport function roundedShapeArc(\n g: ShapePath,\n points: RoundedPoint[],\n radius: number\n): void\n{\n const vecFrom = (p: PointData, pp: PointData) =>\n {\n const x = pp.x - p.x;\n const y = pp.y - p.y;\n const len = Math.sqrt((x * x) + (y * y));\n const nx = x / len;\n const ny = y / len;\n\n return { len, nx, ny };\n };\n\n const sharpCorner = (i: number, p: PointData) =>\n {\n if (i === 0)\n {\n g.moveTo(p.x, p.y);\n }\n else\n {\n g.lineTo(p.x, p.y);\n }\n };\n\n let p1 = points[points.length - 1];\n\n for (let i = 0; i < points.length; i++)\n {\n const p2 = points[i % points.length];\n const pRadius = p2.radius ?? radius;\n\n if (pRadius <= 0)\n {\n sharpCorner(i, p2);\n p1 = p2;\n continue;\n }\n\n const p3 = points[(i + 1) % points.length];\n const v1 = vecFrom(p2, p1);\n const v2 = vecFrom(p2, p3);\n\n if (v1.len < 1e-4 || v2.len < 1e-4)\n {\n sharpCorner(i, p2);\n p1 = p2;\n continue;\n }\n\n let angle = Math.asin((v1.nx * v2.ny) - (v1.ny * v2.nx));\n let radDirection = 1;\n let drawDirection = false;\n\n if ((v1.nx * v2.nx) - (v1.ny * -v2.ny) < 0)\n {\n if (angle < 0)\n {\n angle = Math.PI + angle;\n }\n else\n {\n angle = Math.PI - angle;\n radDirection = -1;\n drawDirection = true;\n }\n }\n else if (angle > 0)\n {\n radDirection = -1;\n drawDirection = true;\n }\n\n const halfAngle = angle / 2;\n\n let cRadius: number;\n let lenOut = Math.abs(\n (Math.cos(halfAngle) * pRadius) / Math.sin(halfAngle)\n );\n\n if (lenOut > Math.min(v1.len / 2, v2.len / 2))\n {\n lenOut = Math.min(v1.len / 2, v2.len / 2);\n cRadius = Math.abs((lenOut * Math.sin(halfAngle)) / Math.cos(halfAngle));\n }\n else\n {\n cRadius = pRadius;\n }\n\n const cX = p2.x + (v2.nx * lenOut) + (-v2.ny * cRadius * radDirection);\n const cY = p2.y + (v2.ny * lenOut) + (v2.nx * cRadius * radDirection);\n const startAngle = Math.atan2(v1.ny, v1.nx) + ((Math.PI / 2) * radDirection);\n const endAngle = Math.atan2(v2.ny, v2.nx) - ((Math.PI / 2) * radDirection);\n\n if (i === 0)\n {\n g.moveTo(\n cX + (Math.cos(startAngle) * cRadius),\n cY + (Math.sin(startAngle) * cRadius)\n );\n }\n\n g.arc(cX, cY, cRadius, startAngle, endAngle, drawDirection);\n\n p1 = p2;\n }\n}\n\n/**\n * Data structure for points with optional radius.\n * @category scene\n * @standard\n */\nexport type RoundedPoint = PointData & { radius?: number };\n\n/**\n * Typed and cleaned up version of:\n * https://stackoverflow.com/questions/44855794/html5-canvas-triangle-with-rounded-corners/56214413#56214413\n * @param g - Graphics to be drawn on.\n * @param points - Corners of the shape to draw. Minimum length is 3.\n * @param radius - Corners default radius.\n * @ignore\n */\nexport function roundedShapeQuadraticCurve(\n g: ShapePath,\n points: RoundedPoint[],\n radius: number,\n smoothness?: number,\n): void\n{\n const distance = (p1: PointData, p2: PointData) =>\n Math.sqrt(((p1.x - p2.x) ** 2) + ((p1.y - p2.y) ** 2));\n\n const pointLerp = (p1: PointData, p2: PointData, t: number) => ({\n x: p1.x + ((p2.x - p1.x) * t),\n y: p1.y + ((p2.y - p1.y) * t),\n });\n\n const numPoints = points.length;\n\n for (let i = 0; i < numPoints; i++)\n {\n const thisPoint = points[(i + 1) % numPoints];\n const pRadius = thisPoint.radius ?? radius;\n\n if (pRadius <= 0)\n {\n if (i === 0)\n {\n g.moveTo(thisPoint.x, thisPoint.y);\n }\n else\n {\n g.lineTo(thisPoint.x, thisPoint.y);\n }\n\n continue;\n }\n\n const lastPoint = points[i];\n const nextPoint = points[(i + 2) % numPoints];\n\n const lastEdgeLength = distance(lastPoint, thisPoint);\n let start;\n\n if (lastEdgeLength < 1e-4)\n {\n start = thisPoint;\n }\n else\n {\n const lastOffsetDistance = Math.min(lastEdgeLength / 2, pRadius);\n\n start = pointLerp(\n thisPoint,\n lastPoint,\n lastOffsetDistance / lastEdgeLength\n );\n }\n\n const nextEdgeLength = distance(nextPoint, thisPoint);\n let end;\n\n if (nextEdgeLength < 1e-4)\n {\n end = thisPoint;\n }\n else\n {\n const nextOffsetDistance = Math.min(nextEdgeLength / 2, pRadius);\n\n end = pointLerp(\n thisPoint,\n nextPoint,\n nextOffsetDistance / nextEdgeLength\n );\n }\n\n if (i === 0)\n {\n g.moveTo(start.x, start.y);\n }\n else\n {\n g.lineTo(start.x, start.y);\n }\n g.quadraticCurveTo(thisPoint.x, thisPoint.y, end.x, end.y, smoothness);\n }\n}\n","/**\n * Parses a float value from an SVG element's attribute.\n * This is commonly used for parsing numeric attributes like coordinates, dimensions,\n * and other measurements from SVG elements.\n * @param svg - The SVG element to get the attribute from\n * @param id - The name of the attribute to parse (e.g. 'x', 'y', 'width', etc)\n * @param defaultValue - The value to return if the attribute doesn't exist or can't be parsed\n * @returns The parsed float value, or the default value if parsing fails\n * @example\n * // For SVG: <rect x=\"10.5\" width=\"20\"/>\n * parseSVGFloatAttribute(rectElement, 'x', 0) // Returns 10.5\n * parseSVGFloatAttribute(rectElement, 'y', 0) // Returns 0 since y is not specified\n * @internal\n */\nexport function parseSVGFloatAttribute(svg: SVGElement, id: string, defaultValue: number): number\n{\n const value = svg.getAttribute(id) as string;\n\n return value ? Number(value) : defaultValue;\n}\n","import { GraphicsPath } from '../../path/GraphicsPath';\n\n/**\n * Extracts individual subpaths from SVG path data by splitting on Move commands.\n * @param pathData - The SVG path data string\n * @returns Array of subpath strings\n * @internal\n */\nexport function extractSubpaths(pathData: string): string[]\n{\n // Split on Move commands (M or m) to get individual subpaths\n const parts = pathData.split(/(?=[Mm])/);\n const subpaths = parts.filter((part) => part.trim().length > 0);\n\n return subpaths;\n}\n\n/**\n * Calculates the area of a path using bounding box estimation.\n * @param pathData - The SVG path data string\n * @returns The estimated area of the path\n * @internal\n */\nexport function calculatePathArea(pathData: string): number\n{\n const coords = pathData.match(/[-+]?[0-9]*\\.?[0-9]+/g);\n\n if (!coords || coords.length < 4) return 0;\n\n const numbers = coords.map(Number);\n const xs = [];\n const ys = [];\n\n for (let i = 0; i < numbers.length; i += 2)\n {\n if (i + 1 < numbers.length)\n {\n xs.push(numbers[i]);\n ys.push(numbers[i + 1]);\n }\n }\n\n if (xs.length === 0 || ys.length === 0) return 0;\n\n const minX = Math.min(...xs);\n const maxX = Math.max(...xs);\n const minY = Math.min(...ys);\n const maxY = Math.max(...ys);\n\n const area = (maxX - minX) * (maxY - minY);\n\n return area;\n}\n\n/**\n * Parses SVG path data and appends instructions to a GraphicsPath.\n * @param pathData - The SVG path data string\n * @param graphicsPath - The GraphicsPath to append instructions to\n * @internal\n */\nexport function appendSVGPath(pathData: string, graphicsPath: GraphicsPath): void\n{\n const tempPath = new GraphicsPath(pathData, false);\n\n for (const instruction of tempPath.instructions)\n {\n graphicsPath.instructions.push(instruction);\n }\n}\n","import { buildAdaptiveBezier } from './buildAdaptiveBezier';\n\nconst TAU = Math.PI * 2;\n\nconst out = {\n centerX: 0,\n centerY: 0,\n ang1: 0,\n ang2: 0\n};\n\nconst mapToEllipse = (\n { x, y }: {x: number, y: number},\n rx: number, ry: number,\n cosPhi: number, sinPhi: number,\n centerX: number, centerY: number,\n out: {x: number, y: number}\n): {x: number, y: number} =>\n{\n x *= rx;\n y *= ry;\n\n const xp = (cosPhi * x) - (sinPhi * y);\n const yp = (sinPhi * x) + (cosPhi * y);\n\n out.x = xp + centerX;\n out.y = yp + centerY;\n\n return out;\n};\n\nfunction approxUnitArc(ang1: number, ang2: number): {x: number, y: number}[]\n{\n // If 90 degree circular arc, use a constant\n // as derived from http://spencermortensen.com/articles/bezier-circle\n\n const a1 = ang2 === -1.5707963267948966 ? -0.551915024494 : 4 / 3 * Math.tan(ang2 / 4);\n\n const a = ang2 === 1.5707963267948966 ? 0.551915024494 : a1;\n\n const x1 = Math.cos(ang1);\n const y1 = Math.sin(ang1);\n const x2 = Math.cos(ang1 + ang2);\n const y2 = Math.sin(ang1 + ang2);\n\n return [\n {\n x: x1 - (y1 * a),\n y: y1 + (x1 * a)\n },\n {\n x: x2 + (y2 * a),\n y: y2 - (x2 * a)\n },\n {\n x: x2,\n y: y2\n }\n ];\n}\n\nconst vectorAngle = (ux: number, uy: number, vx: number, vy: number) =>\n{\n const sign = ((ux * vy) - (uy * vx) < 0) ? -1 : 1;\n\n let dot = (ux * vx) + (uy * vy);\n\n if (dot > 1)\n {\n dot = 1;\n }\n\n if (dot < -1)\n {\n dot = -1;\n }\n\n return sign * Math.acos(dot);\n};\n\nconst getArcCenter = (\n px: number,\n py: number,\n cx: number,\n cy: number,\n rx: number,\n ry: number,\n largeArcFlag: number,\n sweepFlag: number,\n sinPhi: number,\n cosPhi: number,\n pxp: number,\n pyp: number,\n out: {\n centerX: number,\n centerY: number,\n ang1: number,\n ang2: number\n }\n// eslint-disable-next-line max-params\n) =>\n{\n const rxSq = Math.pow(rx, 2);\n const rySq = Math.pow(ry, 2);\n const pxpSq = Math.pow(pxp, 2);\n const pypSq = Math.pow(pyp, 2);\n\n let radicant = (rxSq * rySq) - (rxSq * pypSq) - (rySq * pxpSq);\n\n if (radicant < 0)\n {\n radicant = 0;\n }\n\n radicant /= (rxSq * pypSq) + (rySq * pxpSq);\n radicant = Math.sqrt(radicant) * (largeArcFlag === sweepFlag ? -1 : 1);\n\n const centerXp = radicant * rx / ry * pyp;\n const centerYp = radicant * -ry / rx * pxp;\n\n const centerX = (cosPhi * centerXp) - (sinPhi * centerYp) + ((px + cx) / 2);\n const centerY = (sinPhi * centerXp) + (cosPhi * centerYp) + ((py + cy) / 2);\n\n const vx1 = (pxp - centerXp) / rx;\n const vy1 = (pyp - centerYp) / ry;\n const vx2 = (-pxp - centerXp) / rx;\n const vy2 = (-pyp - centerYp) / ry;\n\n const ang1 = vectorAngle(1, 0, vx1, vy1);\n let ang2 = vectorAngle(vx1, vy1, vx2, vy2);\n\n if (sweepFlag === 0 && ang2 > 0)\n {\n ang2 -= TAU;\n }\n\n if (sweepFlag === 1 && ang2 < 0)\n {\n ang2 += TAU;\n }\n\n out.centerX = centerX;\n out.centerY = centerY;\n out.ang1 = ang1;\n out.ang2 = ang2;\n};\n\n/**\n * @param points\n * @param px\n * @param py\n * @param cx\n * @param cy\n * @param rx\n * @param ry\n * @param xAxisRotation\n * @param largeArcFlag\n * @param sweepFlag\n * @internal\n */\nexport function buildArcToSvg(\n points: number[],\n px: number,\n py: number,\n cx: number,\n cy: number,\n rx: number,\n ry: number,\n xAxisRotation = 0,\n largeArcFlag = 0,\n sweepFlag = 0\n): void\n{\n if (rx === 0 || ry === 0)\n {\n return;\n }\n\n const sinPhi = Math.sin(xAxisRotation * TAU / 360);\n const cosPhi = Math.cos(xAxisRotation * TAU / 360);\n\n const pxp = (cosPhi * (px - cx) / 2) + (sinPhi * (py - cy) / 2);\n const pyp = (-sinPhi * (px - cx) / 2) + (cosPhi * (py - cy) / 2);\n\n if (pxp === 0 && pyp === 0)\n {\n return;\n }\n\n rx = Math.abs(rx);\n ry = Math.abs(ry);\n\n const lambda = (Math.pow(pxp, 2) / Math.pow(rx, 2)) + (Math.pow(pyp, 2) / Math.pow(ry, 2));\n\n if (lambda > 1)\n {\n rx *= Math.sqrt(lambda);\n ry *= Math.sqrt(lambda);\n }\n\n getArcCenter(\n px,\n py,\n cx,\n cy,\n rx,\n ry,\n largeArcFlag,\n sweepFlag,\n sinPhi,\n cosPhi,\n pxp,\n pyp,\n out\n );\n\n let { ang1, ang2 } = out;\n const { centerX, centerY } = out;\n\n // If 'ang2' == 90.0000000001, then `ratio` will devalue to\n // 1.0000000001. This causes `segments` to be greater than one, which is an\n // unnecessary split, and adds extra points to the bezier curve. To alleviate\n // this issue, we round to 1.0 when the ratio is close to 1.0.\n let ratio = Math.abs(ang2) / (TAU / 4);\n\n if (Math.abs(1.0 - ratio) < 0.0000001)\n {\n ratio = 1.0;\n }\n\n const segments = Math.max(Math.ceil(ratio), 1);\n\n ang2 /= segments;\n\n let lastX = points[points.length - 2];\n let lastY = points[points.length - 1];\n\n const outCurvePoint = { x: 0, y: 0 };\n\n for (let i = 0; i < segments; i++)\n {\n const curve = approxUnitArc(ang1, ang2);\n\n const { x: x1, y: y1 } = mapToEllipse(curve[0], rx, ry, cosPhi, sinPhi, centerX, centerY, outCurvePoint);\n const { x: x2, y: y2 } = mapToEllipse(curve[1], rx, ry, cosPhi, sinPhi, centerX, centerY, outCurvePoint);\n const { x, y } = mapToEllipse(curve[2], rx, ry, cosPhi, sinPhi, centerX, centerY, outCurvePoint);\n\n buildAdaptiveBezier(\n points,\n lastX, lastY,\n x1, y1, x2, y2, x, y\n );\n\n lastX = x;\n lastY = y;\n\n ang1 += ang2;\n }\n}\n","import { buildArc } from './buildArc';\n\n/**\n * The arcTo() method creates an arc/curve between two tangents on the canvas.\n *\n * \"borrowed\" from https://code.google.com/p/fxcanvas/ - thanks google!\n * @param points\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @param radius\n * @internal\n */\nexport function buildArcTo(\n points: number[],\n x1: number, y1: number,\n x2: number, y2: number,\n radius: number,\n): void\n{\n const fromX = points[points.length - 2];\n const fromY = points[points.length - 1];\n\n const a1 = fromY - y1;\n const b1 = fromX - x1;\n const a2 = y2 - y1;\n const b2 = x2 - x1;\n const mm = Math.abs((a1 * b2) - (b1 * a2));\n\n if (mm < 1.0e-8 || radius === 0)\n {\n if (points[points.length - 2] !== x1 || points[points.length - 1] !== y1)\n {\n points.push(x1, y1);\n }\n\n return;\n }\n\n const dd = (a1 * a1) + (b1 * b1);\n const cc = (a2 * a2) + (b2 * b2);\n const tt = (a1 * a2) + (b1 * b2);\n const k1 = radius * Math.sqrt(dd) / mm;\n const k2 = radius * Math.sqrt(cc) / mm;\n const j1 = k1 * tt / dd;\n const j2 = k2 * tt / cc;\n const cx = (k1 * b2) + (k2 * b1);\n const cy = (k1 * a2) + (k2 * a1);\n const px = b1 * (k2 + j1);\n const py = a1 * (k2 + j1);\n const qx = b2 * (k1 + j2);\n const qy = a2 * (k1 + j2);\n const startAngle = Math.atan2(py - cy, px - cx);\n const endAngle = Math.atan2(qy - cy, qx - cx);\n\n buildArc(points,\n (cx + x1),\n (cy + y1),\n radius,\n startAngle,\n endAngle,\n b1 * a2 > b2 * a1\n );\n}\n","// thanks to https://github.com/mattdesl/adaptive-quadratic-curve\n// for the original code!\n\nimport { GraphicsContextSystem } from '../GraphicsContextSystem';\n\nconst RECURSION_LIMIT = 8;\nconst FLT_EPSILON = 1.19209290e-7;\nconst PATH_DISTANCE_EPSILON = 1.0;\n\nconst curveAngleToleranceEpsilon = 0.01;\nconst mAngleTolerance = 0;\n\n/**\n * @param points\n * @param sX\n * @param sY\n * @param cp1x\n * @param cp1y\n * @param eX\n * @param eY\n * @param smoothness\n * @internal\n */\nexport function buildAdaptiveQuadratic(\n points: number[],\n sX: number, sY: number,\n cp1x: number, cp1y: number,\n eX: number, eY: number,\n smoothness?: number,\n)\n{\n const scale = 1.0;\n const smoothing = Math.min(\n 0.99, // a value of 1.0 actually inverts smoothing, so we cap it at 0.99\n Math.max(0, smoothness ?? GraphicsContextSystem.defaultOptions.bezierSmoothness)\n );\n let distanceTolerance = (PATH_DISTANCE_EPSILON - smoothing) / scale;\n\n distanceTolerance *= distanceTolerance;\n begin(sX, sY, cp1x, cp1y, eX, eY, points, distanceTolerance);\n\n return points;\n}\n\n// //// Based on:\n// //// https://github.com/pelson/antigrain/blob/master/agg-2.4/src/agg_curves.cpp\n\nfunction begin(\n sX: number, sY: number,\n cp1x: number, cp1y: number,\n eX: number, eY: number,\n points: number[],\n distanceTolerance: number\n)\n{\n recursive(points, sX, sY, cp1x, cp1y, eX, eY, distanceTolerance, 0);\n\n points.push(eX, eY);\n}\n\nfunction recursive(\n points: number[],\n x1: number, y1: number,\n x2: number, y2: number,\n x3: number, y3: number,\n distanceTolerance: number,\n level: number\n)\n{\n if (level > RECURSION_LIMIT)\n { return; }\n\n const pi = Math.PI;\n\n // Calculate all the mid-points of the line segments\n // ----------------------\n const x12 = (x1 + x2) / 2;\n const y12 = (y1 + y2) / 2;\n const x23 = (x2 + x3) / 2;\n const y23 = (y2 + y3) / 2;\n const x123 = (x12 + x23) / 2;\n const y123 = (y12 + y23) / 2;\n\n let dx = x3 - x1;\n let dy = y3 - y1;\n const d = Math.abs((((x2 - x3) * dy) - ((y2 - y3) * dx)));\n\n if (d > FLT_EPSILON)\n {\n // Regular care\n // -----------------\n if (d * d <= distanceTolerance * ((dx * dx) + (dy * dy)))\n {\n // If the curvature doesn't exceed the distance_tolerance value\n // we tend to finish subdivisions.\n // ----------------------\n if (mAngleTolerance < curveAngleToleranceEpsilon)\n {\n points.push(x123, y123);\n\n return;\n }\n\n // Angle & Cusp Condition\n // ----------------------\n let da = Math.abs(Math.atan2(y3 - y2, x3 - x2) - Math.atan2(y2 - y1, x2 - x1));\n\n if (da >= pi) da = (2 * pi) - da;\n\n if (da < mAngleTolerance)\n {\n // Finally we can stop the recursion\n // ----------------------\n points.push(x123, y123);\n\n return;\n }\n }\n }\n else\n {\n // Collinear case\n // -----------------\n dx = x123 - ((x1 + x3) / 2);\n dy = y123 - ((y1 + y3) / 2);\n if ((dx * dx) + (dy * dy) <= distanceTolerance)\n {\n points.push(x123, y123);\n\n return;\n }\n }\n\n // Continue subdivision\n // ----------------------\n recursive(points, x1, y1, x12, y12, x123, y123, distanceTolerance, level + 1);\n recursive(points, x123, y123, x23, y23, x3, y3, distanceTolerance, level + 1);\n}\n\n","// thanks to https://github.com/mattdesl/adaptive-bezier-curve\n// for the original code!\n\nimport { GraphicsContextSystem } from '../GraphicsContextSystem';\n\nconst RECURSION_LIMIT = 8;\nconst FLT_EPSILON = 1.19209290e-7;\nconst PATH_DISTANCE_EPSILON = 1.0;\n\nconst curveAngleToleranceEpsilon = 0.01;\nconst mAngleTolerance = 0;\nconst mCuspLimit = 0;\n\n/**\n * @param points\n * @param sX\n * @param sY\n * @param cp1x\n * @param cp1y\n * @param cp2x\n * @param cp2y\n * @param eX\n * @param eY\n * @param smoothness\n * @internal\n */\nexport function buildAdaptiveBezier(\n points: number[],\n sX: number, sY: number,\n cp1x: number, cp1y: number,\n cp2x: number, cp2y: number,\n eX: number, eY: number,\n smoothness?: number,\n)\n{\n // TODO expose as a parameter\n const scale = 1;\n const smoothing = Math.min(\n 0.99, // a value of 1.0 actually inverts smoothing, so we cap it at 0.99\n Math.max(0, smoothness ?? GraphicsContextSystem.defaultOptions.bezierSmoothness)\n );\n let distanceTolerance = (PATH_DISTANCE_EPSILON - smoothing) / scale;\n\n distanceTolerance *= distanceTolerance;\n begin(sX, sY, cp1x, cp1y, cp2x, cp2y, eX, eY, points, distanceTolerance);\n\n return points;\n}\n\n// //// Based on:\n// //// https://github.com/pelson/antigrain/blob/master/agg-2.4/src/agg_curves.cpp\n\nfunction begin(\n sX: number, sY: number,\n cp1x: number, cp1y: number,\n cp2x: number, cp2y: number,\n eX: number, eY: number,\n points: number[],\n distanceTolerance: number\n)\n{\n // dont need to actually ad this!\n // points.push(sX, sY);\n recursive(sX, sY, cp1x, cp1y, cp2x, cp2y, eX, eY, points, distanceTolerance, 0);\n points.push(eX, eY);\n}\n\n// eslint-disable-next-line max-params\nfunction recursive(\n x1: number, y1: number,\n x2: number, y2: number,\n x3: number, y3: number,\n x4: number, y4: number,\n points: number[],\n distanceTolerance: number,\n level: number)\n{\n if (level > RECURSION_LIMIT)\n { return; }\n\n const pi = Math.PI;\n\n // Calculate all the mid-points of the line segments\n // ----------------------\n const x12 = (x1 + x2) / 2;\n const y12 = (y1 + y2) / 2;\n const x23 = (x2 + x3) / 2;\n const y23 = (y2 + y3) / 2;\n const x34 = (x3 + x4) / 2;\n const y34 = (y3 + y4) / 2;\n const x123 = (x12 + x23) / 2;\n const y123 = (y12 + y23) / 2;\n const x234 = (x23 + x34) / 2;\n const y234 = (y23 + y34) / 2;\n const x1234 = (x123 + x234) / 2;\n const y1234 = (y123 + y234) / 2;\n\n if (level > 0)\n { // Enforce subdivision first time\n // Try to approximate the full cubic curve by a single straight line\n // ------------------\n let dx = x4 - x1;\n let dy = y4 - y1;\n\n const d2 = Math.abs(((x2 - x4) * dy) - ((y2 - y4) * dx));\n const d3 = Math.abs(((x3 - x4) * dy) - ((y3 - y4) * dx));\n\n let da1; let da2;\n\n if (d2 > FLT_EPSILON && d3 > FLT_EPSILON)\n {\n // Regular care\n // -----------------\n if ((d2 + d3) * (d2 + d3) <= distanceTolerance * ((dx * dx) + (dy * dy)))\n {\n // If the curvature doesn't exceed the distanceTolerance value\n // we tend to finish subdivisions.\n // ----------------------\n if (mAngleTolerance < curveAngleToleranceEpsilon)\n {\n points.push(x1234, y1234);\n\n return;\n }\n\n // Angle & Cusp Condition\n // ----------------------\n const a23 = Math.atan2(y3 - y2, x3 - x2);\n\n da1 = Math.abs(a23 - Math.atan2(y2 - y1, x2 - x1));\n da2 = Math.abs(Math.atan2(y4 - y3, x4 - x3) - a23);\n if (da1 >= pi) da1 = (2 * pi) - da1;\n if (da2 >= pi) da2 = (2 * pi) - da2;\n\n if (da1 + da2 < mAngleTolerance)\n {\n // Finally we can stop the recursion\n // ----------------------\n points.push(x1234, y1234);\n\n return;\n }\n\n if (mCuspLimit !== 0.0)\n {\n if (da1 > mCuspLimit)\n {\n points.push(x2, y2);\n\n return;\n }\n\n if (da2 > mCuspLimit)\n {\n points.push(x3, y3);\n\n return;\n }\n }\n }\n }\n else if (d2 > FLT_EPSILON)\n {\n // p1,p3,p4 are collinear, p2 is considerable\n // ----------------------\n if (d2 * d2 <= distanceTolerance * ((dx * dx) + (dy * dy)))\n {\n if (mAngleTolerance < curveAngleToleranceEpsilon)\n {\n points.push(x1234, y1234);\n\n return;\n }\n\n // Angle Condition\n // ----------------------\n da1 = Math.abs(Math.atan2(y3 - y2, x3 - x2) - Math.atan2(y2 - y1, x2 - x1));\n if (da1 >= pi) da1 = (2 * pi) - da1;\n\n if (da1 < mAngleTolerance)\n {\n points.push(x2, y2);\n points.push(x3, y3);\n\n return;\n }\n\n if (mCuspLimit !== 0.0)\n {\n if (da1 > mCuspLimit)\n {\n points.push(x2, y2);\n\n return;\n }\n }\n }\n }\n else if (d3 > FLT_EPSILON)\n {\n // p1,p2,p4 are collinear, p3 is considerable\n // ----------------------\n if (d3 * d3 <= distanceTolerance * ((dx * dx) + (dy * dy)))\n {\n if (mAngleTolerance < curveAngleToleranceEpsilon)\n {\n points.push(x1234, y1234);\n\n return;\n }\n\n // Angle Condition\n // ----------------------\n da1 = Math.abs(Math.atan2(y4 - y3, x4 - x3) - Math.atan2(y3 - y2, x3 - x2));\n if (da1 >= pi) da1 = (2 * pi) - da1;\n\n if (da1 < mAngleTolerance)\n {\n points.push(x2, y2);\n points.push(x3, y3);\n\n return;\n }\n\n if (mCuspLimit !== 0.0)\n {\n if (da1 > mCuspLimit)\n {\n points.push(x3, y3);\n\n return;\n }\n }\n }\n }\n else\n {\n // Collinear case\n // -----------------\n dx = x1234 - ((x1 + x4) / 2);\n dy = y1234 - ((y1 + y4) / 2);\n if ((dx * dx) + (dy * dy) <= distanceTolerance)\n {\n points.push(x1234, y1234);\n\n return;\n }\n }\n }\n\n // Continue subdivision\n // ----------------------\n recursive(x1, y1, x12, y12, x123, y123, x1234, y1234, points, distanceTolerance, level + 1);\n recursive(x1234, y1234, x234, y234, x34, y34, x4, y4, points, distanceTolerance, level + 1);\n}\n\n","import { Color } from '../../../../color/Color';\nimport { FillGradient } from '../fill/FillGradient';\nimport { parseSVGFloatAttribute } from './parseSVGFloatAttribute';\n\nimport type { ColorSource } from '../../../../color/Color';\nimport type { TextureSpace } from '../FillTypes';\nimport type { Session } from './SVGParser';\n\n/**\n * Parses SVG gradient definitions and stores them in the session for later use.\n * Supports both linear and radial gradients.\n * @param svg - The root SVG element to parse definitions from\n * @param session - The parsing session to store definitions in\n * @internal\n */\nexport function parseSVGDefinitions(svg: SVGElement, session: Session): void\n{\n // Find all <defs> elements in the SVG\n const definitions = svg.querySelectorAll('defs');\n\n // Process each <defs> element\n for (let i = 0; i < definitions.length; i++)\n {\n const definition = definitions[i];\n\n // Process each child element in the <defs>\n for (let j = 0; j < definition.children.length; j++)\n {\n const child = definition.children[j];\n\n // Handle different types of gradient definitions\n switch (child.nodeName.toLowerCase())\n {\n case 'lineargradient':\n // Store the parsed linear gradient in the session defs using the gradient's ID\n session.defs[child.id] = parseLinearGradient(child as SVGElement);\n break;\n case 'radialgradient':\n session.defs[child.id] = parseRadialGradient(child as SVGElement);\n break;\n default:\n break;\n }\n }\n }\n}\n\n/**\n * Parses a gradient geometry attribute, resolving percentages to the 0-1 range.\n * SVG allows gradient coordinates to be expressed as percentages (eg `cx=\"50%\"`),\n * which matches the normalized space used by `objectBoundingBox` gradients.\n *\n * Note that under `userSpaceOnUse` percentages are relative to the viewport, which\n * is not known here - those are still resolved as a 0-1 fraction.\n * @param svg - The gradient element to read the attribute from\n * @param id - The name of the attribute to parse (eg 'cx', 'x1')\n * @param defaultValue - The value to use if the attribute is missing or invalid\n * @returns The parsed value\n */\nfunction parseGradientCoordinate(svg: SVGElement, id: string, defaultValue: number): number\n{\n const value = svg.getAttribute(id);\n\n if (value?.trim().endsWith('%'))\n {\n const percentage = Number(value.trim().slice(0, -1));\n\n return Number.isNaN(percentage) ? defaultValue : percentage / 100;\n }\n\n return parseSVGFloatAttribute(svg, id, defaultValue);\n}\n\n/**\n * Maps an SVG `gradientUnits` attribute to the texture space used by FillGradient.\n * @param svg - The gradient element to read the attribute from\n * @returns 'local' for `objectBoundingBox` (the SVG default), 'global' otherwise\n */\nfunction parseGradientTextureSpace(svg: SVGElement): TextureSpace\n{\n return (svg.getAttribute('gradientUnits') || 'objectBoundingBox') === 'objectBoundingBox' ? 'local' : 'global';\n}\n\n/**\n * Parses the `<stop>` children of a gradient element into color stops.\n * @param svg - The gradient element to parse the stops from\n * @returns The color stops in the order they are declared\n */\nfunction parseGradientColorStops(svg: SVGElement): { offset: number, color: ColorSource }[]\n{\n const colorStops: { offset: number, color: ColorSource }[] = [];\n\n for (let i = 0; i < svg.children.length; i++)\n {\n const stop = svg.children[i] as SVGElement;\n\n // Get stop position (0-1) and color\n const offset = parseGradientCoordinate(stop, 'offset', 0);\n const color = Color.shared.setValue(stop.getAttribute('stop-color')).toNumber();\n\n colorStops.push({ offset, color });\n }\n\n return colorStops;\n}\n\n/**\n * Parses an SVG linear gradient element into a FillGradient.\n * @param child - The SVG linear gradient element to parse\n * @returns A FillGradient configured based on the SVG element\n */\nfunction parseLinearGradient(child: SVGElement): FillGradient\n{\n // Parse the gradient vector coordinates (defaults: horizontal line from 0 to 1)\n const x0 = parseGradientCoordinate(child, 'x1', 0);\n const y0 = parseGradientCoordinate(child, 'y1', 0);\n const x1 = parseGradientCoordinate(child, 'x2', 1);\n const y1 = parseGradientCoordinate(child, 'y2', 0);\n\n return new FillGradient({\n type: 'linear',\n start: { x: x0, y: y0 },\n end: { x: x1, y: y1 },\n textureSpace: parseGradientTextureSpace(child),\n colorStops: parseGradientColorStops(child)\n });\n}\n\n/**\n * Parses an SVG radial gradient element into a FillGradient.\n *\n * SVG describes a radial gradient with two circles: the outer circle (`cx`, `cy`, `r`)\n * where the gradient ends, and the focal circle (`fx`, `fy`, `fr`) where it begins.\n * These map onto the outer and inner circles of a FillGradient. The SVG defaults\n * (all 50%, with `fr` at 0 and the focal point falling back to the outer center)\n * line up with the FillGradient radial defaults.\n * @param child - The SVG radial gradient element to parse\n * @returns A FillGradient configured based on the SVG element\n */\nfunction parseRadialGradient(child: SVGElement): FillGradient\n{\n // The outer circle, where the gradient ends\n const cx = parseGradientCoordinate(child, 'cx', 0.5);\n const cy = parseGradientCoordinate(child, 'cy', 0.5);\n const r = parseGradientCoordinate(child, 'r', 0.5);\n\n // The focal circle, where the gradient begins - defaults to the center of the outer circle\n const fx = parseGradientCoordinate(child, 'fx', cx);\n const fy = parseGradientCoordinate(child, 'fy', cy);\n const fr = parseGradientCoordinate(child, 'fr', 0);\n\n return new FillGradient({\n type: 'radial',\n center: { x: fx, y: fy },\n innerRadius: fr,\n outerCenter: { x: cx, y: cy },\n outerRadius: r,\n textureSpace: parseGradientTextureSpace(child),\n colorStops: parseGradientColorStops(child)\n });\n}\n","import { Color } from '../../../../color/Color';\nimport { extractSvgUrlId } from './utils/extractSvgUrlId';\n\nimport type { ConvertedFillStyle, ConvertedStrokeStyle, FillStyle, StrokeStyle } from '../FillTypes';\nimport type { Session } from './SVGParser';\n\n/**\n * A map of SVG style attributes and their default values.\n * Each attribute has a type and default value used for SVG parsing.\n * - 'paint' type can be a color or gradient\n * - 'number' type is a numeric value\n * - 'string' type is a text value\n * @category scene\n * @advanced\n */\nexport const styleAttributes = {\n // Fill properties\n fill: { type: 'paint', default: 0 }, // Fill color/gradient\n 'fill-opacity': { type: 'number', default: 1 }, // Fill transparency\n\n // Stroke properties\n stroke: { type: 'paint', default: 0 }, // Stroke color/gradient\n 'stroke-width': { type: 'number', default: 1 }, // Width of stroke\n 'stroke-opacity': { type: 'number', default: 1 }, // Stroke transparency\n 'stroke-linecap': { type: 'string', default: 'butt' }, // End cap style: butt, round, square\n 'stroke-linejoin': { type: 'string', default: 'miter' }, // Join style: miter, round, bevel\n 'stroke-miterlimit': { type: 'number', default: 10 }, // Limit on miter join sharpness\n 'stroke-dasharray': { type: 'string', default: 'none' }, // Dash pattern\n 'stroke-dashoffset': { type: 'number', default: 0 }, // Offset for dash pattern\n\n // Global properties\n opacity: { type: 'number', default: 1 }, // Overall opacity\n};\n\n/**\n * Represents the result of parsing SVG style attributes\n * @internal\n */\nexport type StyleResult = {\n /** The stroke style properties */\n strokeStyle: StrokeStyle;\n /** The fill style properties */\n fillStyle: FillStyle;\n /** Whether fill should be applied */\n useFill: boolean;\n /** Whether stroke should be applied */\n useStroke: boolean;\n};\n\n/**\n * Parses SVG style attributes and inline styles to determine fill and stroke properties.\n * Handles both direct attributes and CSS-style declarations in the style attribute.\n * @param svg - The SVG element to parse styles from\n * @param session - The current SVG parsing session containing definitions\n * @returns An object containing the parsed fill and stroke styles\n * @internal\n */\nexport function parseSVGStyle(svg: SVGElement, session: Session): StyleResult\n{\n const style = svg.getAttribute('style');\n\n const strokeStyle: StrokeStyle = {};\n\n const fillStyle: FillStyle = {};\n\n const result: StyleResult = {\n strokeStyle,\n fillStyle,\n useFill: false,\n useStroke: false,\n };\n\n // First parse direct style attributes\n for (const key in styleAttributes)\n {\n const attribute = svg.getAttribute(key);\n\n if (attribute)\n {\n parseAttribute(session, result, key, attribute.trim());\n }\n }\n\n // Then parse inline styles which override direct attributes\n if (style)\n {\n const styleParts = style.split(';');\n\n for (let i = 0; i < styleParts.length; i++)\n {\n const stylePart = styleParts[i].trim();\n\n const [key, value] = stylePart.split(':');\n\n if (styleAttributes[key as keyof typeof styleAttributes])\n {\n parseAttribute(session, result, key, value.trim());\n }\n }\n }\n\n return {\n strokeStyle: result.useStroke ? (strokeStyle as ConvertedStrokeStyle) : null,\n fillStyle: result.useFill ? (fillStyle as ConvertedFillStyle) : null,\n useFill: result.useFill,\n useStroke: result.useStroke,\n };\n}\n\n/**\n * Parses a single SVG style attribute and updates the style result accordingly.\n * Handles color values, gradients, opacities and other style properties.\n * @param session - The current SVG parsing session containing definitions\n * @param result - The style result object to update\n * @param id - The attribute name/id to parse\n * @param value - The attribute value to parse\n */\nfunction parseAttribute(\n session: Session,\n result: StyleResult,\n id: string,\n value: string\n): void\n{\n switch (id)\n {\n case 'stroke':\n if (value !== 'none')\n {\n if (value.startsWith('url('))\n {\n // Extract gradient/pattern id from url reference\n const id = extractSvgUrlId(value);\n\n result.strokeStyle.fill = session.defs[id];\n }\n else\n {\n // Parse as color value\n result.strokeStyle.color = Color.shared.setValue(value).toNumber();\n }\n\n result.useStroke = true;\n }\n\n break;\n case 'stroke-width':\n result.strokeStyle.width = Number(value);\n break;\n case 'fill':\n if (value !== 'none')\n {\n if (value.startsWith('url('))\n {\n // Extract gradient/pattern id from url reference\n const id = extractSvgUrlId(value);\n\n result.fillStyle.fill = session.defs[id];\n }\n else\n {\n // Parse as color value\n result.fillStyle.color = Color.shared.setValue(value).toNumber();\n }\n\n result.useFill = true;\n }\n break;\n case 'fill-opacity':\n result.fillStyle.alpha = Number(value);\n break;\n case 'stroke-opacity':\n result.strokeStyle.alpha = Number(value);\n break;\n case 'opacity':\n // Global opacity affects both fill and stroke\n result.fillStyle.alpha = Number(value);\n result.strokeStyle.alpha = Number(value);\n break;\n }\n}\n","import { warn } from '../../../../utils/logging/warn';\nimport { GraphicsPath } from '../path/GraphicsPath';\nimport { parseSVGDefinitions } from './parseSVGDefinitions';\nimport { parseSVGFloatAttribute } from './parseSVGFloatAttribute';\nimport { parseSVGStyle } from './parseSVGStyle';\nimport { checkForNestedPattern } from './utils/fillOperations';\nimport { appendSVGPath, calculatePathArea, extractSubpaths } from './utils/pathOperations';\n\nimport type { FillGradient } from '../fill/FillGradient';\nimport type { FillStyle, StrokeStyle } from '../FillTypes';\nimport type {\n GraphicsContext,\n} from '../GraphicsContext';\n\n/**\n * Represents a session for SVG parsing. Contains the current state and resources needed during parsing.\n * @internal\n */\nexport interface Session\n{\n /** The graphics context to render to */\n context: GraphicsContext;\n /** The current path being constructed */\n path: GraphicsPath;\n /** Map of definitions by id */\n defs: Record<string, FillGradient>;\n}\n\n/**\n * Parses an SVG element or string and renders it to a graphics context.\n * Handles both SVG strings and SVG DOM elements as input.\n * @param svg - The SVG content to parse, either as a string or element\n * @param graphicsContext - Optional graphics context to render to\n * @returns The graphics context with the SVG rendered into it\n * @internal\n */\nexport function SVGParser(\n svg: string | SVGElement | SVGSVGElement,\n graphicsContext?: GraphicsContext\n): GraphicsContext\n{\n // Convert string input to SVG element\n if (typeof svg === 'string')\n {\n // eslint-disable-next-line no-restricted-globals\n const div = document.createElement('div');\n\n div.innerHTML = svg.trim();\n svg = div.querySelector('svg') as SVGElement;\n }\n\n // Initialize parsing session\n const session = {\n context: graphicsContext,\n defs: {},\n path: new GraphicsPath(),\n };\n\n // Parse definitions (gradients, etc) first\n parseSVGDefinitions(svg, session);\n\n // Process all child elements except defs\n const children = svg.children;\n\n const { fillStyle, strokeStyle } = parseSVGStyle(svg, session);\n\n for (let i = 0; i < children.length; i++)\n {\n const child = children[i] as SVGElement;\n\n if (child.nodeName.toLowerCase() === 'defs') continue;\n renderChildren(child, session, fillStyle, strokeStyle);\n }\n\n return graphicsContext;\n}\n\n/**\n * Recursively renders SVG elements and their children.\n * Handles styling inheritance and different SVG shape types.\n * @param svg - The SVG element to render\n * @param session - The current parsing session\n * @param fillStyle - The inherited fill style\n * @param strokeStyle - The inherited stroke style\n */\nfunction renderChildren(svg: SVGElement, session: Session, fillStyle: FillStyle, strokeStyle: StrokeStyle): void\n{\n const children = svg.children;\n\n // Parse element's style and merge with inherited styles\n const { fillStyle: f1, strokeStyle: s1 } = parseSVGStyle(svg, session);\n\n if (f1 && fillStyle)\n {\n fillStyle = { ...fillStyle, ...f1 };\n }\n else if (f1)\n {\n fillStyle = f1;\n }\n\n if (s1 && strokeStyle)\n {\n strokeStyle = { ...strokeStyle, ...s1 };\n }\n else if (s1)\n {\n strokeStyle = s1;\n }\n\n const noStyle = !fillStyle && !strokeStyle;\n\n // Default to black fill if no styles specified\n if (noStyle)\n {\n fillStyle = { color: 0 };\n }\n\n // Variables for shape attributes\n let x;\n let y;\n let x1;\n let y1;\n let x2;\n let y2;\n let cx;\n let cy;\n let r;\n let rx;\n let ry;\n let points;\n let pointsString;\n let d;\n let graphicsPath;\n let width;\n let height;\n\n // Handle different SVG element types\n switch (svg.nodeName.toLowerCase())\n {\n case 'path':\n {\n d = svg.getAttribute('d') as string;\n\n const fillRule = svg.getAttribute('fill-rule') as string;\n\n const subpaths = extractSubpaths(d);\n const hasExplicitEvenodd = fillRule === 'evenodd';\n const hasMultipleSubpaths = subpaths.length > 1;\n\n const shouldProcessHoles = hasExplicitEvenodd && hasMultipleSubpaths;\n\n if (shouldProcessHoles)\n {\n const subpathsWithArea = subpaths.map((subpath) => ({\n path: subpath,\n area: calculatePathArea(subpath)\n }));\n\n subpathsWithArea.sort((a, b) => b.area - a.area);\n\n // For complex cases, prefer multiple holes approach\n const useMultipleHolesApproach = subpaths.length > 3 || !checkForNestedPattern(subpathsWithArea);\n\n if (useMultipleHolesApproach)\n {\n // Multiple holes approach: first (largest) is fill, rest are holes\n for (let i = 0; i < subpathsWithArea.length; i++)\n {\n const subpath = subpathsWithArea[i];\n const isMainShape = i === 0;\n\n session.context.beginPath();\n const newPath = new GraphicsPath(undefined, true); // Always use evenodd for hole processing\n\n appendSVGPath(subpath.path, newPath);\n session.context.path(newPath);\n\n if (isMainShape)\n {\n if (fillStyle) session.context.fill(fillStyle);\n if (strokeStyle) session.context.stroke(strokeStyle);\n }\n else\n {\n session.context.cut();\n }\n }\n }\n else\n {\n // Nested holes approach: alternate between fill and cut\n for (let i = 0; i < subpathsWithArea.length; i++)\n {\n const subpath = subpathsWithArea[i];\n const isHole = i % 2 === 1; // Odd indices are holes\n\n session.context.beginPath();\n const newPath = new GraphicsPath(undefined, true); // Always use evenodd for hole processing\n\n appendSVGPath(subpath.path, newPath);\n session.context.path(newPath);\n\n if (isHole)\n {\n session.context.cut();\n }\n else\n {\n if (fillStyle) session.context.fill(fillStyle);\n if (strokeStyle) session.context.stroke(strokeStyle);\n }\n }\n }\n }\n else\n {\n const useEvenoddForGraphicsPath = fillRule ? (fillRule === 'evenodd') : true;\n\n graphicsPath = new GraphicsPath(d, useEvenoddForGraphicsPath);\n session.context.path(graphicsPath);\n if (fillStyle) session.context.fill(fillStyle);\n if (strokeStyle) session.context.stroke(strokeStyle);\n }\n break;\n }\n\n case 'circle':\n cx = parseSVGFloatAttribute(svg, 'cx', 0);\n cy = parseSVGFloatAttribute(svg, 'cy', 0);\n r = parseSVGFloatAttribute(svg, 'r', 0);\n session.context.ellipse(cx, cy, r, r);\n if (fillStyle) session.context.fill(fillStyle);\n if (strokeStyle) session.context.stroke(strokeStyle);\n break;\n\n case 'rect':\n x = parseSVGFloatAttribute(svg, 'x', 0);\n y = parseSVGFloatAttribute(svg, 'y', 0);\n width = parseSVGFloatAttribute(svg, 'width', 0);\n height = parseSVGFloatAttribute(svg, 'height', 0);\n rx = parseSVGFloatAttribute(svg, 'rx', 0);\n ry = parseSVGFloatAttribute(svg, 'ry', 0);\n\n if (rx || ry)\n {\n session.context.roundRect(x, y, width, height, rx || ry);\n }\n else\n {\n session.context.rect(x, y, width, height);\n }\n\n if (fillStyle) session.context.fill(fillStyle);\n if (strokeStyle) session.context.stroke(strokeStyle);\n break;\n\n case 'ellipse':\n cx = parseSVGFloatAttribute(svg, 'cx', 0);\n cy = parseSVGFloatAttribute(svg, 'cy', 0);\n rx = parseSVGFloatAttribute(svg, 'rx', 0);\n ry = parseSVGFloatAttribute(svg, 'ry', 0);\n\n session.context.beginPath();\n session.context.ellipse(cx, cy, rx, ry);\n\n if (fillStyle) session.context.fill(fillStyle);\n if (strokeStyle) session.context.stroke(strokeStyle);\n break;\n\n case 'line':\n x1 = parseSVGFloatAttribute(svg, 'x1', 0);\n y1 = parseSVGFloatAttribute(svg, 'y1', 0);\n x2 = parseSVGFloatAttribute(svg, 'x2', 0);\n y2 = parseSVGFloatAttribute(svg, 'y2', 0);\n\n session.context.beginPath();\n session.context.moveTo(x1, y1);\n session.context.lineTo(x2, y2);\n\n if (strokeStyle) session.context.stroke(strokeStyle);\n break;\n\n case 'polygon':\n pointsString = svg.getAttribute('points') as string;\n points = pointsString.match(/-?\\d+/g).map((n) => parseInt(n, 10));\n session.context.poly(points, true);\n if (fillStyle) session.context.fill(fillStyle);\n if (strokeStyle) session.context.stroke(strokeStyle);\n break;\n\n case 'polyline':\n pointsString = svg.getAttribute('points') as string;\n points = pointsString.match(/-?\\d+/g).map((n) => parseInt(n, 10));\n session.context.poly(points, false);\n if (strokeStyle) session.context.stroke(strokeStyle);\n break;\n\n // Group elements - just process children\n case 'g':\n case 'svg':\n break;\n\n default: {\n // Log unsupported elements\n warn(`[SVG parser] <${svg.nodeName}> elements unsupported`);\n break;\n }\n }\n\n if (noStyle)\n {\n fillStyle = null;\n }\n\n // Recursively process child elements\n for (let i = 0; i < children.length; i++)\n {\n renderChildren(children[i] as SVGElement, session, fillStyle, strokeStyle);\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { getTextureBatchBindGroup } from '../../../rendering/batcher/gpu/getTextureBatchBindGroup';\nimport { type BatcherOptions } from '../../../rendering/batcher/shared/Batcher';\nimport { DefaultBatcher } from '../../../rendering/batcher/shared/DefaultBatcher';\nimport { InstructionSet } from '../../../rendering/renderers/shared/instructions/InstructionSet';\nimport { GCManagedHash } from '../../../utils/data/GCManagedHash';\nimport { deprecation, v8_3_4 } from '../../../utils/logging/deprecation';\nimport { BigPool } from '../../../utils/pool/PoolGroup';\nimport { type GPUData } from '../../view/ViewContainer';\nimport { buildContextBatches } from './utils/buildContextBatches';\n\nimport type { System } from '../../../rendering/renderers/shared/system/System';\nimport type { Renderer } from '../../../rendering/renderers/types';\nimport type { BatchableGraphics } from './BatchableGraphics';\nimport type { GraphicsContext } from './GraphicsContext';\n\ninterface GeometryData\n{\n vertices: number[];\n uvs: number[];\n indices: number[];\n}\n\n/**\n * A class that holds batchable graphics data for a GraphicsContext.\n * @category rendering\n * @ignore\n */\nexport class GpuGraphicsContext implements GPUData\n{\n public isBatchable: boolean;\n public context: GraphicsContext;\n\n public batches: BatchableGraphics[] = [];\n public geometryData: GeometryData = {\n vertices: [],\n uvs: [],\n indices: [],\n };\n public graphicsData: GraphicsContextRenderData;\n\n public reset()\n {\n if (this.batches)\n {\n this.batches.forEach((batch) =>\n {\n BigPool.return(batch);\n });\n }\n if (this.graphicsData)\n {\n BigPool.return(this.graphicsData);\n }\n\n this.isBatchable = false;\n this.context = null;\n\n this.batches.length = 0;\n this.geometryData.indices.length = 0;\n this.geometryData.vertices.length = 0;\n this.geometryData.uvs.length = 0;\n\n this.graphicsData = null;\n }\n\n public destroy()\n {\n this.reset();\n this.batches = null;\n this.geometryData = null;\n }\n}\n\n/**\n * A class that holds the render data for a GraphicsContext.\n * @category rendering\n * @ignore\n */\nexport class GraphicsContextRenderData\n{\n public batcher: DefaultBatcher;\n public instructions = new InstructionSet();\n\n public init(options: BatcherOptions)\n {\n const maxTextures = options.maxTextures;\n\n this.batcher ? this.batcher._updateMaxTextures(maxTextures) : this.batcher = new DefaultBatcher({ maxTextures });\n this.instructions.reset();\n }\n\n /**\n * @deprecated since version 8.0.0\n * Use `batcher.geometry` instead.\n * @see {Batcher#geometry}\n */\n get geometry()\n {\n // #if _DEBUG\n deprecation(v8_3_4, 'GraphicsContextRenderData#geometry is deprecated, please use batcher.geometry instead.');\n // #endif\n\n return this.batcher.geometry;\n }\n\n public destroy()\n {\n this.batcher.destroy();\n this.instructions.destroy();\n\n this.batcher = null;\n this.instructions = null;\n }\n}\n\n/**\n * Options for the GraphicsContextSystem.\n * @category rendering\n * @advanced\n */\nexport interface GraphicsContextSystemOptions\n{\n /** A value from 0 to 1 that controls the smoothness of bezier curves (the higher the smoother) */\n bezierSmoothness?: number;\n}\n\n/**\n * A system that manages the rendering of GraphicsContexts.\n * @category rendering\n * @advanced\n */\nexport class GraphicsContextSystem implements System<GraphicsContextSystemOptions>\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ],\n name: 'graphicsContext'\n } as const;\n\n /** The default options for the GraphicsContextSystem. */\n public static readonly defaultOptions: GraphicsContextSystemOptions = {\n /**\n * A value from 0 to 1 that controls the smoothness of bezier curves (the higher the smoother)\n * @default 0.5\n */\n bezierSmoothness: 0.5,\n };\n\n private readonly _renderer: Renderer;\n private readonly _managedContexts: GCManagedHash<GraphicsContext>;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n this._managedContexts = new GCManagedHash({ renderer, type: 'resource', name: 'graphicsContext' });\n }\n\n /**\n * Runner init called, update the default options\n * @ignore\n */\n public init(options?: GraphicsContextSystemOptions)\n {\n GraphicsContextSystem.defaultOptions.bezierSmoothness = options?.bezierSmoothness\n ?? GraphicsContextSystem.defaultOptions.bezierSmoothness;\n }\n\n /**\n * Returns the render data for a given GraphicsContext.\n * @param context - The GraphicsContext to get the render data for.\n * @internal\n */\n public getContextRenderData(context: GraphicsContext): GraphicsContextRenderData\n {\n return context._gpuData[this._renderer.uid].graphicsData || this._initContextRenderData(context);\n }\n\n /**\n * Updates the GPU context for a given GraphicsContext.\n * If the context is dirty, it will rebuild the batches and geometry data.\n * @param context - The GraphicsContext to update.\n * @returns The updated GpuGraphicsContext.\n * @internal\n */\n public updateGpuContext(context: GraphicsContext)\n {\n const hasContext = !!context._gpuData[this._renderer.uid];\n const gpuContext: GpuGraphicsContext = context._gpuData[this._renderer.uid] || this._initContext(context);\n\n if (context.dirty || !hasContext)\n {\n if (hasContext)\n {\n gpuContext.reset();\n }\n\n buildContextBatches(context, gpuContext);\n\n const batchMode = context.batchMode;\n\n if (context.customShader || batchMode === 'no-batch')\n {\n gpuContext.isBatchable = false;\n }\n else if (batchMode === 'auto')\n {\n gpuContext.isBatchable = (gpuContext.geometryData.vertices.length < 400);\n }\n else\n {\n gpuContext.isBatchable = true;\n }\n\n context.dirty = false;\n }\n\n return gpuContext;\n }\n\n /**\n * Returns the GpuGraphicsContext for a given GraphicsContext.\n * If it does not exist, it will initialize a new one.\n * @param context - The GraphicsContext to get the GpuGraphicsContext for.\n * @returns The GpuGraphicsContext for the given GraphicsContext.\n * @internal\n */\n public getGpuContext(context: GraphicsContext): GpuGraphicsContext\n {\n return context._gpuData[this._renderer.uid] || this._initContext(context);\n }\n\n private _initContextRenderData(context: GraphicsContext): GraphicsContextRenderData\n {\n const graphicsData: GraphicsContextRenderData = BigPool.get(GraphicsContextRenderData, {\n maxTextures: this._renderer.limits.maxBatchableTextures,\n });\n\n const gpuContext = context._gpuData[this._renderer.uid];\n const { batches, geometryData } = gpuContext;\n\n gpuContext.graphicsData = graphicsData;\n\n const vertexSize = geometryData.vertices.length;\n const indexSize = geometryData.indices.length;\n\n for (let i = 0; i < batches.length; i++)\n {\n batches[i].applyTransform = false;\n }\n\n const batcher = graphicsData.batcher;\n\n // TODO we can pool buffers here eventually..\n batcher.ensureAttributeBuffer(vertexSize);\n batcher.ensureIndexBuffer(indexSize);\n\n batcher.begin();\n\n for (let i = 0; i < batches.length; i++)\n {\n const batch = batches[i];\n\n batcher.add(batch);\n }\n\n batcher.finish(graphicsData.instructions);\n\n const geometry = batcher.geometry;\n\n // not to self - this works as we are assigning the batchers array buffer\n // once its up loaded - this buffer is then put back in the pool to be reused.\n // this mean we don't have to creating new Batchers for each graphics items\n geometry.indexBuffer.setDataWithSize(batcher.indexBuffer, batcher.indexSize, true);\n geometry.buffers[0].setDataWithSize(batcher.attributeBuffer.float32View, batcher.attributeSize, true);\n\n const drawBatches = batcher.batches;\n\n for (let i = 0; i < batcher.batchIndex; i++)\n {\n const batch = drawBatches[i];\n\n batch.bindGroup = getTextureBatchBindGroup(\n batch.textures.textures,\n batch.textures.count,\n this._renderer.limits.maxBatchableTextures\n );\n }\n\n return graphicsData;\n }\n\n private _initContext(context: GraphicsContext): GpuGraphicsContext\n {\n const gpuContext = new GpuGraphicsContext();\n\n gpuContext.context = context;\n\n context._gpuData[this._renderer.uid] = gpuContext;\n\n this._managedContexts.add(context);\n\n return gpuContext;\n }\n\n public destroy()\n {\n this._managedContexts.destroy();\n (this._renderer as null) = null;\n }\n}\n","import { Point } from '../../../../maths/point/Point';\nimport { uid } from '../../../../utils/data/uid';\nimport { warn } from '../../../../utils/logging/warn';\nimport { parseSVGPath } from '../svg/parseSVGPath';\nimport { ShapePath } from './ShapePath';\n\nimport type { Matrix } from '../../../../maths/matrix/Matrix';\nimport type { PointData } from '../../../../maths/point/PointData';\nimport type { Bounds } from '../../../container/bounds/Bounds';\nimport type { RoundedPoint } from './roundShape';\n\n/**\n * Represents a single drawing instruction in a `GraphicsPath`.\n * Each instruction consists of an action type and associated data.\n * @category scene\n * @advanced\n */\nexport interface PathInstruction\n{\n action: 'moveTo' | 'lineTo' | 'quadraticCurveTo' |\n 'bezierCurveTo' | 'arc' | 'closePath' |\n 'addPath' | 'arcTo' | 'ellipse' |\n 'rect' | 'roundRect' | 'arcToSvg' |\n 'poly' | 'circle' |\n 'regularPoly' | 'roundPoly' | 'roundShape' | 'filletRect' | 'chamferRect'\n data: any[];\n}\n\n/**\n * The `GraphicsPath` class is designed to represent a graphical path consisting of multiple drawing instructions.\n * This class serves as a collection of drawing commands that can be executed to render shapes and paths on a canvas or\n * similar graphical context. It supports high-level drawing operations like lines, arcs, curves, and more, enabling\n * complex graphic constructions with relative ease.\n * @category scene\n * @advanced\n */\nexport class GraphicsPath\n{\n public instructions: PathInstruction[] = [];\n\n /** unique id for this graphics path */\n public readonly uid: number = uid('graphicsPath');\n\n private _dirty = true;\n // needed for hit testing and bounds calculations\n private _shapePath: ShapePath;\n\n /**\n * Controls whether shapes in this path should be checked for holes using the non-zero fill rule.\n * When true, any closed shape that is fully contained within another shape will become\n * a hole in that shape during filling operations.\n *\n * This follows SVG's non-zero fill rule where:\n * 1. Shapes are analyzed to find containment relationships\n * 2. If Shape B is fully contained within Shape A, Shape B becomes a hole in Shape A\n * 3. Multiple nested holes are supported\n *\n * Mainly used internally by the SVG parser to correctly handle holes in complex paths.\n * When false, all shapes are filled independently without checking for holes.\n */\n public checkForHoles: boolean;\n\n /**\n * Provides access to the internal shape path, ensuring it is up-to-date with the current instructions.\n * @returns The `ShapePath` instance associated with this `GraphicsPath`.\n */\n get shapePath(): ShapePath\n {\n if (!this._shapePath)\n {\n this._shapePath = new ShapePath(this);\n }\n\n if (this._dirty)\n {\n this._dirty = false;\n this._shapePath.buildPath();\n }\n\n return this._shapePath;\n }\n\n /**\n * Creates a `GraphicsPath` instance optionally from an SVG path string or an array of `PathInstruction`.\n * @param instructions - An SVG path string or an array of `PathInstruction` objects.\n * @param signed\n */\n constructor(instructions?: string | PathInstruction[], signed = false)\n {\n this.checkForHoles = signed;\n\n if (typeof instructions === 'string')\n {\n parseSVGPath(instructions, this);\n }\n else\n {\n this.instructions = instructions?.slice() ?? [];\n }\n }\n\n /**\n * Adds another `GraphicsPath` to this path, optionally applying a transformation.\n * @param path - The `GraphicsPath` to add.\n * @param transform - An optional transformation to apply to the added path.\n * @returns The instance of the current object for chaining.\n */\n public addPath(path: GraphicsPath, transform?: Matrix): this\n {\n path = path.clone();\n this.instructions.push({ action: 'addPath', data: [path, transform] });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Adds an arc to the path. The arc is centered at (x, y)\n * position with radius `radius` starting at `startAngle` and ending at `endAngle`.\n * @param x - The x-coordinate of the arc's center.\n * @param y - The y-coordinate of the arc's center.\n * @param radius - The radius of the arc.\n * @param startAngle - The starting angle of the arc, in radians.\n * @param endAngle - The ending angle of the arc, in radians.\n * @param counterclockwise - Specifies whether the arc should be drawn in the anticlockwise direction. False by default.\n * @returns The instance of the current object for chaining.\n */\n public arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): this;\n public arc(...args: [number, number, number, number, number, boolean]): this\n {\n this.instructions.push({ action: 'arc', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Adds an arc to the path with the arc tangent to the line joining two specified points.\n * The arc radius is specified by `radius`.\n * @param x1 - The x-coordinate of the first point.\n * @param y1 - The y-coordinate of the first point.\n * @param x2 - The x-coordinate of the second point.\n * @param y2 - The y-coordinate of the second point.\n * @param radius - The radius of the arc.\n * @returns The instance of the current object for chaining.\n */\n public arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): this;\n public arcTo(...args: [number, number, number, number, number]): this\n {\n this.instructions.push({ action: 'arcTo', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Adds an SVG-style arc to the path, allowing for elliptical arcs based on the SVG spec.\n * @param rx - The x-radius of the ellipse.\n * @param ry - The y-radius of the ellipse.\n * @param xAxisRotation - The rotation of the ellipse's x-axis relative\n * to the x-axis of the coordinate system, in degrees.\n * @param largeArcFlag - Determines if the arc should be greater than or less than 180 degrees.\n * @param sweepFlag - Determines if the arc should be swept in a positive angle direction.\n * @param x - The x-coordinate of the arc's end point.\n * @param y - The y-coordinate of the arc's end point.\n * @returns The instance of the current object for chaining.\n */\n // eslint-disable-next-line max-len\n public arcToSvg(rx: number, ry: number, xAxisRotation: number, largeArcFlag: number, sweepFlag: number, x: number, y: number): this;\n public arcToSvg(...args: [number, number, number, number, number, number, number]): this\n {\n this.instructions.push({ action: 'arcToSvg', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Adds a cubic Bezier curve to the path.\n * It requires three points: the first two are control points and the third one is the end point.\n * The starting point is the last point in the current path.\n * @param cp1x - The x-coordinate of the first control point.\n * @param cp1y - The y-coordinate of the first control point.\n * @param cp2x - The x-coordinate of the second control point.\n * @param cp2y - The y-coordinate of the second control point.\n * @param x - The x-coordinate of the end point.\n * @param y - The y-coordinate of the end point.\n * @param smoothness - Optional parameter to adjust the smoothness of the curve.\n * @returns The instance of the current object for chaining.\n */\n public bezierCurveTo(\n cp1x: number, cp1y: number, cp2x: number, cp2y: number,\n x: number, y: number,\n smoothness?: number\n ): this;\n public bezierCurveTo(...args: [number, number, number, number, number, number, number]): this\n {\n this.instructions.push({ action: 'bezierCurveTo', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Adds a cubic Bezier curve to the path.\n * It requires two points: the second control point and the end point. The first control point is assumed to be\n * The starting point is the last point in the current path.\n * @param cp2x - The x-coordinate of the second control point.\n * @param cp2y - The y-coordinate of the second control point.\n * @param x - The x-coordinate of the end point.\n * @param y - The y-coordinate of the end point.\n * @param smoothness - Optional parameter to adjust the smoothness of the curve.\n * @returns The instance of the current object for chaining.\n */\n public bezierCurveToShort(cp2x: number, cp2y: number, x: number, y: number, smoothness?: number): this\n {\n const last = this.instructions[this.instructions.length - 1];\n\n const lastPoint = this.getLastPoint(Point.shared);\n\n let cp1x = 0;\n let cp1y = 0;\n\n if (!last || last.action !== 'bezierCurveTo')\n {\n cp1x = lastPoint.x;\n cp1y = lastPoint.y;\n }\n else\n {\n cp1x = last.data[2];\n cp1y = last.data[3];\n\n const currentX = lastPoint.x;\n const currentY = lastPoint.y;\n\n cp1x = currentX + (currentX - cp1x);\n cp1y = currentY + (currentY - cp1y);\n }\n\n this.instructions.push({ action: 'bezierCurveTo', data: [cp1x, cp1y, cp2x, cp2y, x, y, smoothness] });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Closes the current path by drawing a straight line back to the start.\n * If the shape is already closed or there are no points in the path, this method does nothing.\n * @returns The instance of the current object for chaining.\n */\n public closePath(): this\n {\n this.instructions.push({ action: 'closePath', data: [] });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draws an ellipse at the specified location and with the given x and y radii.\n * An optional transformation can be applied, allowing for rotation, scaling, and translation.\n * @param x - The x-coordinate of the center of the ellipse.\n * @param y - The y-coordinate of the center of the ellipse.\n * @param radiusX - The horizontal radius of the ellipse.\n * @param radiusY - The vertical radius of the ellipse.\n * @param matrix - An optional `Matrix` object to apply a transformation to the ellipse. This can include rotations.\n * @returns The instance of the current object for chaining.\n */\n public ellipse(x: number, y: number, radiusX: number, radiusY: number, matrix?: Matrix): this;\n public ellipse(...args: [number, number, number, number, Matrix]): this\n {\n this.instructions.push({ action: 'ellipse', data: args });\n\n // TODO nail this!\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Connects the current point to a new point with a straight line. This method updates the current path.\n * @param x - The x-coordinate of the new point to connect to.\n * @param y - The y-coordinate of the new point to connect to.\n * @returns The instance of the current object for chaining.\n */\n public lineTo(x: number, y: number): this;\n public lineTo(...args: [number, number]): this\n {\n this.instructions.push({ action: 'lineTo', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Sets the starting point for a new sub-path. Any subsequent drawing commands are considered part of this path.\n * @param x - The x-coordinate for the starting point.\n * @param y - The y-coordinate for the starting point.\n * @returns The instance of the current object for chaining.\n */\n public moveTo(x: number, y: number): this;\n public moveTo(...args: [number, number]): this\n {\n this.instructions.push({ action: 'moveTo', data: args });\n\n return this;\n }\n\n /**\n * Adds a quadratic curve to the path. It requires two points: the control point and the end point.\n * The starting point is the last point in the current path.\n * @param cpx - The x-coordinate of the control point.\n * @param cpy - The y-coordinate of the control point.\n * @param x - The x-coordinate of the end point.\n * @param y - The y-coordinate of the end point.\n * @param smoothness - Optional parameter to adjust the smoothness of the curve.\n * @returns The instance of the current object for chaining.\n */\n public quadraticCurveTo(cpx: number, cpy: number, x: number, y: number, smoothness?: number): this;\n public quadraticCurveTo(...args: [number, number, number, number, number]): this\n {\n this.instructions.push({ action: 'quadraticCurveTo', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Adds a quadratic curve to the path. It uses the previous point as the control point.\n * @param x - The x-coordinate of the end point.\n * @param y - The y-coordinate of the end point.\n * @param smoothness - Optional parameter to adjust the smoothness of the curve.\n * @returns The instance of the current object for chaining.\n */\n public quadraticCurveToShort(x: number, y: number, smoothness?: number): this\n {\n // check if we have a previous quadraticCurveTo\n const last = this.instructions[this.instructions.length - 1];\n\n const lastPoint = this.getLastPoint(Point.shared);\n\n let cpx1 = 0;\n let cpy1 = 0;\n\n if (!last || last.action !== 'quadraticCurveTo')\n {\n cpx1 = lastPoint.x;\n cpy1 = lastPoint.y;\n }\n else\n {\n cpx1 = last.data[0];\n cpy1 = last.data[1];\n\n const currentX = lastPoint.x;\n const currentY = lastPoint.y;\n\n cpx1 = currentX + (currentX - cpx1);\n cpy1 = currentY + (currentY - cpy1);\n }\n\n this.instructions.push({ action: 'quadraticCurveTo', data: [cpx1, cpy1, x, y, smoothness] });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draws a rectangle shape. This method adds a new rectangle path to the current drawing.\n * @param x - The x-coordinate of the top-left corner of the rectangle.\n * @param y - The y-coordinate of the top-left corner of the rectangle.\n * @param w - The width of the rectangle.\n * @param h - The height of the rectangle.\n * @param transform - An optional `Matrix` object to apply a transformation to the rectangle.\n * @returns The instance of the current object for chaining.\n */\n public rect(x: number, y: number, w: number, h: number, transform?: Matrix): this\n {\n this.instructions.push({ action: 'rect', data: [x, y, w, h, transform] });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draws a circle shape. This method adds a new circle path to the current drawing.\n * @param x - The x-coordinate of the center of the circle.\n * @param y - The y-coordinate of the center of the circle.\n * @param radius - The radius of the circle.\n * @param transform - An optional `Matrix` object to apply a transformation to the circle.\n * @returns The instance of the current object for chaining.\n */\n public circle(x: number, y: number, radius: number, transform?: Matrix): this\n {\n this.instructions.push({ action: 'circle', data: [x, y, radius, transform] });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draws a rectangle with rounded corners.\n * The corner radius can be specified to determine how rounded the corners should be.\n * An optional transformation can be applied, which allows for rotation, scaling, and translation of the rectangle.\n * @param x - The x-coordinate of the top-left corner of the rectangle.\n * @param y - The y-coordinate of the top-left corner of the rectangle.\n * @param w - The width of the rectangle.\n * @param h - The height of the rectangle.\n * @param radius - The radius of the rectangle's corners. If not specified, corners will be sharp.\n * @param transform - An optional `Matrix` object to apply a transformation to the rectangle.\n * @returns The instance of the current object for chaining.\n */\n public roundRect(x: number, y: number, w: number, h: number, radius?: number, transform?: Matrix): this;\n public roundRect(...args: [number, number, number, number, number, Matrix?]): this\n {\n this.instructions.push({ action: 'roundRect', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draws a polygon shape by specifying a sequence of points. This method allows for the creation of complex polygons,\n * which can be both open and closed. An optional transformation can be applied, enabling the polygon to be scaled,\n * rotated, or translated as needed.\n * @param points - An array of numbers representing the x and y coordinates of the polygon's vertices, in sequence.\n * @param close - A boolean indicating whether to close the polygon path. True by default.\n * @param transform - An optional `Matrix` object to apply a transformation to the polygon.\n * @returns The instance of the current object for chaining further drawing commands.\n */\n public poly(points: number[] | PointData[], close?: boolean, transform?: Matrix): this;\n public poly(...args: [number[] | PointData[], boolean, Matrix?]): this\n {\n this.instructions.push({ action: 'poly', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draws a regular polygon with a specified number of sides. All sides and angles are equal.\n * @param x - The x-coordinate of the center of the polygon.\n * @param y - The y-coordinate of the center of the polygon.\n * @param radius - The radius of the circumscribed circle of the polygon.\n * @param sides - The number of sides of the polygon. Must be 3 or more.\n * @param rotation - The rotation angle of the polygon, in radians. Zero by default.\n * @param transform - An optional `Matrix` object to apply a transformation to the polygon.\n * @returns The instance of the current object for chaining.\n */\n public regularPoly(x: number, y: number, radius: number, sides: number, rotation?: number, transform?: Matrix): this;\n public regularPoly(...args: [number, number, number, number, number]): this\n {\n this.instructions.push({ action: 'regularPoly', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draws a polygon with rounded corners.\n * Similar to `regularPoly` but with the ability to round the corners of the polygon.\n * @param x - The x-coordinate of the center of the polygon.\n * @param y - The y-coordinate of the center of the polygon.\n * @param radius - The radius of the circumscribed circle of the polygon.\n * @param sides - The number of sides of the polygon. Must be 3 or more.\n * @param corner - The radius of the rounding of the corners.\n * @param rotation - The rotation angle of the polygon, in radians. Zero by default.\n * @returns The instance of the current object for chaining.\n */\n public roundPoly(x: number, y: number, radius: number, sides: number, corner: number, rotation?: number): this;\n public roundPoly(...args: [number, number, number, number, number, number]): this\n {\n this.instructions.push({ action: 'roundPoly', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draws a shape with rounded corners. This function supports custom radius for each corner of the shape.\n * Optionally, corners can be rounded using a quadratic curve instead of an arc, providing a different aesthetic.\n * @param points - An array of `RoundedPoint` representing the corners of the shape to draw.\n * A minimum of 3 points is required.\n * @param radius - The default radius for the corners.\n * This radius is applied to all corners unless overridden in `points`.\n * @param useQuadratic - If set to true, rounded corners are drawn using a quadraticCurve\n * method instead of an arc method. Defaults to false.\n * @param smoothness - Specifies the smoothness of the curve when `useQuadratic` is true.\n * Higher values make the curve smoother.\n * @returns The instance of the current object for chaining.\n */\n public roundShape(points: RoundedPoint[], radius: number, useQuadratic?: boolean, smoothness?: number): this;\n public roundShape(...args: [RoundedPoint[], number, boolean, number]): this\n {\n this.instructions.push({ action: 'roundShape', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draw Rectangle with fillet corners. This is much like rounded rectangle\n * however it support negative numbers as well for the corner radius.\n * @param x - Upper left corner of rect\n * @param y - Upper right corner of rect\n * @param width - Width of rect\n * @param height - Height of rect\n * @param fillet - accept negative or positive values\n */\n public filletRect(x: number, y: number, width: number, height: number, fillet: number): this;\n public filletRect(...args: [number, number, number, number, number]): this\n {\n this.instructions.push({ action: 'filletRect', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draw Rectangle with chamfer corners. These are angled corners.\n * @param x - Upper left corner of rect\n * @param y - Upper right corner of rect\n * @param width - Width of rect\n * @param height - Height of rect\n * @param chamfer - non-zero real number, size of corner cutout\n * @param transform\n */\n public chamferRect(x: number, y: number, width: number, height: number, chamfer: number, transform?: Matrix): this;\n public chamferRect(...args: [number, number, number, number, number]): this\n {\n this.instructions.push({ action: 'chamferRect', data: args });\n\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Draws a star shape centered at a specified location. This method allows for the creation\n * of stars with a variable number of points, outer radius, optional inner radius, and rotation.\n * The star is drawn as a closed polygon with alternating outer and inner vertices to create the star's points.\n * An optional transformation can be applied to scale, rotate, or translate the star as needed.\n * @param x - The x-coordinate of the center of the star.\n * @param y - The y-coordinate of the center of the star.\n * @param points - The number of points of the star.\n * @param radius - The outer radius of the star (distance from the center to the outer points).\n * @param innerRadius - Optional. The inner radius of the star\n * (distance from the center to the inner points between the outer points).\n * If not provided, defaults to half of the `radius`.\n * @param rotation - Optional. The rotation of the star in radians, where 0 is aligned with the y-axis.\n * Defaults to 0, meaning one point is directly upward.\n * @param transform - An optional `Matrix` object to apply a transformation to the star.\n * This can include rotations, scaling, and translations.\n * @returns The instance of the current object for chaining further drawing commands.\n */\n // eslint-disable-next-line max-len\n public star(x: number, y: number, points: number, radius: number, innerRadius?: number, rotation?: number, transform?: Matrix): this\n {\n innerRadius ||= radius / 2;\n\n const startAngle = (-1 * Math.PI / 2) + rotation;\n const len = points * 2;\n const delta = (Math.PI * 2) / len;\n const polygon = [];\n\n for (let i = 0; i < len; i++)\n {\n const r = i % 2 ? innerRadius : radius;\n const angle = (i * delta) + startAngle;\n\n polygon.push(\n x + (r * Math.cos(angle)),\n y + (r * Math.sin(angle))\n );\n }\n\n this.poly(polygon, true, transform);\n\n return this;\n }\n\n /**\n * Creates a copy of the current `GraphicsPath` instance. This method supports both shallow and deep cloning.\n * A shallow clone copies the reference of the instructions array, while a deep clone creates a new array and\n * copies each instruction individually, ensuring that modifications to the instructions of the cloned `GraphicsPath`\n * do not affect the original `GraphicsPath` and vice versa.\n * @param deep - A boolean flag indicating whether the clone should be deep.\n * @returns A new `GraphicsPath` instance that is a clone of the current instance.\n */\n public clone(deep = false): GraphicsPath\n {\n const newGraphicsPath2D = new GraphicsPath();\n\n newGraphicsPath2D.checkForHoles = this.checkForHoles;\n\n if (!deep)\n {\n newGraphicsPath2D.instructions = this.instructions.slice();\n }\n else\n {\n for (let i = 0; i < this.instructions.length; i++)\n {\n const instruction = this.instructions[i];\n\n newGraphicsPath2D.instructions.push({ action: instruction.action, data: instruction.data.slice() });\n }\n }\n\n return newGraphicsPath2D;\n }\n\n public clear(): this\n {\n this.instructions.length = 0;\n this._dirty = true;\n\n return this;\n }\n\n /**\n * Applies a transformation matrix to all drawing instructions within the `GraphicsPath`.\n * This method enables the modification of the path's geometry according to the provided\n * transformation matrix, which can include translations, rotations, scaling, and skewing.\n *\n * Each drawing instruction in the path is updated to reflect the transformation,\n * ensuring the visual representation of the path is consistent with the applied matrix.\n *\n * Note: The transformation is applied directly to the coordinates and control points of the drawing instructions,\n * not to the path as a whole. This means the transformation's effects are baked into the individual instructions,\n * allowing for fine-grained control over the path's appearance.\n * @param matrix - A `Matrix` object representing the transformation to apply.\n * @returns The instance of the current object for chaining further operations.\n */\n public transform(matrix: Matrix): this\n {\n if (matrix.isIdentity()) return this;\n\n const a = matrix.a;\n const b = matrix.b;\n const c = matrix.c;\n const d = matrix.d;\n const tx = matrix.tx;\n const ty = matrix.ty;\n\n let x = 0;\n let y = 0;\n\n let cpx1 = 0;\n let cpy1 = 0;\n let cpx2 = 0;\n let cpy2 = 0;\n\n let rx = 0;\n let ry = 0;\n\n for (let i = 0; i < this.instructions.length; i++)\n {\n const instruction = this.instructions[i];\n const data = instruction.data as any[];\n\n switch (instruction.action)\n {\n case 'moveTo':\n case 'lineTo':\n\n x = data[0];\n y = data[1];\n\n data[0] = (a * x) + (c * y) + tx;\n data[1] = (b * x) + (d * y) + ty;\n break;\n case 'bezierCurveTo':\n\n cpx1 = data[0];\n cpy1 = data[1];\n cpx2 = data[2];\n cpy2 = data[3];\n\n x = data[4];\n y = data[5];\n\n data[0] = (a * cpx1) + (c * cpy1) + tx;\n data[1] = (b * cpx1) + (d * cpy1) + ty;\n data[2] = (a * cpx2) + (c * cpy2) + tx;\n data[3] = (b * cpx2) + (d * cpy2) + ty;\n data[4] = (a * x) + (c * y) + tx;\n data[5] = (b * x) + (d * y) + ty;\n break;\n\n case 'quadraticCurveTo':\n\n cpx1 = data[0];\n cpy1 = data[1];\n\n x = data[2];\n y = data[3];\n\n data[0] = (a * cpx1) + (c * cpy1) + tx;\n data[1] = (b * cpx1) + (d * cpy1) + ty;\n\n data[2] = (a * x) + (c * y) + tx;\n data[3] = (b * x) + (d * y) + ty;\n\n break;\n\n case 'arcToSvg':\n\n x = data[5];\n y = data[6];\n\n rx = data[0];\n ry = data[1];\n\n // multiply the radius by the transform..\n\n data[0] = (a * rx) + (c * ry);\n data[1] = (b * rx) + (d * ry);\n\n data[5] = (a * x) + (c * y) + tx;\n data[6] = (b * x) + (d * y) + ty;\n\n break;\n\n case 'circle':\n data[4] = adjustTransform(data[3], matrix);\n break;\n case 'rect':\n data[4] = adjustTransform(data[4], matrix);\n break;\n case 'ellipse':\n data[8] = adjustTransform(data[8], matrix);\n break;\n case 'roundRect':\n data[5] = adjustTransform(data[5], matrix);\n break;\n case 'addPath':\n data[0].transform(matrix);\n break;\n case 'poly':\n data[2] = adjustTransform(data[2], matrix);\n break;\n case 'regularPoly':\n case 'chamferRect':\n data[5] = adjustTransform(data[5], matrix);\n break;\n case 'closePath':\n break;\n default:\n // #if _DEBUG\n warn('unknown transform action', instruction.action);\n // #endif\n break;\n }\n }\n\n this._dirty = true;\n\n return this;\n }\n\n get bounds(): Bounds\n {\n return this.shapePath.bounds;\n }\n\n /**\n * Retrieves the last point from the current drawing instructions in the `GraphicsPath`.\n * This method is useful for operations that depend on the path's current endpoint,\n * such as connecting subsequent shapes or paths. It supports various drawing instructions,\n * ensuring the last point's position is accurately determined regardless of the path's complexity.\n *\n * If the last instruction is a `closePath`, the method iterates backward through the instructions\n * until it finds an actionable instruction that defines a point (e.g., `moveTo`, `lineTo`,\n * `quadraticCurveTo`, etc.). For compound paths added via `addPath`, it recursively retrieves\n * the last point from the nested path.\n * @param out - A `Point` object where the last point's coordinates will be stored.\n * This object is modified directly to contain the result.\n * @returns The `Point` object containing the last point's coordinates.\n */\n public getLastPoint(out: Point): Point\n {\n let index = this.instructions.length - 1;\n\n let lastInstruction = this.instructions[index];\n\n if (!lastInstruction)\n {\n out.x = 0;\n out.y = 0;\n\n return out;\n }\n\n while (lastInstruction.action === 'closePath')\n {\n index--;\n\n if (index < 0)\n {\n out.x = 0;\n out.y = 0;\n\n return out;\n }\n\n lastInstruction = this.instructions[index];\n }\n\n switch (lastInstruction.action)\n {\n case 'moveTo':\n case 'lineTo':\n out.x = lastInstruction.data[0];\n out.y = lastInstruction.data[1];\n break;\n case 'quadraticCurveTo':\n out.x = lastInstruction.data[2];\n out.y = lastInstruction.data[3];\n break;\n case 'bezierCurveTo':\n out.x = lastInstruction.data[4];\n out.y = lastInstruction.data[5];\n break;\n case 'arc':\n case 'arcToSvg':\n out.x = lastInstruction.data[5];\n out.y = lastInstruction.data[6];\n break;\n case 'addPath':\n // TODO prolly should transform the last point of the path\n lastInstruction.data[0].getLastPoint(out);\n break;\n }\n\n return out;\n }\n}\n\nfunction adjustTransform(currentMatrix?: Matrix, transform?: Matrix): Matrix\n{\n if (currentMatrix)\n {\n return currentMatrix.prepend(transform);\n }\n\n return transform.clone();\n}\n","// a shape lets you build out a shape with lines and curves and primitives..\n\nimport { Circle } from '../../../../maths/shapes/Circle';\nimport { Ellipse } from '../../../../maths/shapes/Ellipse';\nimport { Polygon } from '../../../../maths/shapes/Polygon';\nimport { Rectangle } from '../../../../maths/shapes/Rectangle';\nimport { RoundedRectangle } from '../../../../maths/shapes/RoundedRectangle';\nimport { Bounds } from '../../../container/bounds/Bounds';\nimport { buildAdaptiveBezier } from '../buildCommands/buildAdaptiveBezier';\nimport { buildAdaptiveQuadratic } from '../buildCommands/buildAdaptiveQuadratic';\nimport { buildArc } from '../buildCommands/buildArc';\nimport { buildArcTo } from '../buildCommands/buildArcTo';\nimport { buildArcToSvg } from '../buildCommands/buildArcToSvg';\nimport { roundedShapeArc, roundedShapeQuadraticCurve } from './roundShape';\n\nimport type { Matrix } from '../../../../maths/matrix/Matrix';\nimport type { PointData } from '../../../../maths/point/PointData';\nimport type { ShapePrimitive } from '../../../../maths/shapes/ShapePrimitive';\nimport type { GraphicsPath } from './GraphicsPath';\nimport type { RoundedPoint } from './roundShape';\n\nconst tempRectangle = new Rectangle();\n\n/**\n * A type representing a shape primitive with optional transformation and holes.\n * @category scene\n * @advanced\n */\nexport type ShapePrimitiveWithHoles = {\n shape: ShapePrimitive,\n transform?: Matrix,\n holes?: ShapePrimitiveWithHoles[]\n};\n\n/**\n * The `ShapePath` class acts as a bridge between high-level drawing commands\n * and the lower-level `GraphicsContext` rendering engine.\n * It translates drawing commands, such as those for creating lines, arcs, ellipses, rectangles, and complex polygons, into a\n * format that can be efficiently processed by a `GraphicsContext`. This includes handling path starts,\n * ends, and transformations for shapes.\n *\n * It is used internally by `GraphicsPath` to build up the path.\n * @category scene\n * @advanced\n */\nexport class ShapePath\n{\n /** The list of shape primitives that make up the path. */\n public shapePrimitives: ShapePrimitiveWithHoles[] = [];\n private _currentPoly: Polygon | null = null;\n private readonly _graphicsPath2D: GraphicsPath;\n private readonly _bounds = new Bounds();\n public readonly signed: boolean;\n\n constructor(graphicsPath2D: GraphicsPath)\n {\n this._graphicsPath2D = graphicsPath2D;\n this.signed = graphicsPath2D.checkForHoles;\n }\n\n /**\n * Sets the starting point for a new sub-path. Any subsequent drawing commands are considered part of this path.\n * @param x - The x-coordinate for the starting point.\n * @param y - The y-coordinate for the starting point.\n * @returns The instance of the current object for chaining.\n */\n public moveTo(x: number, y: number): this\n {\n this.startPoly(x, y);\n\n return this;\n }\n\n /**\n * Connects the current point to a new point with a straight line. This method updates the current path.\n * @param x - The x-coordinate of the new point to connect to.\n * @param y - The y-coordinate of the new point to connect to.\n * @returns The instance of the current object for chaining.\n */\n public lineTo(x: number, y: number): this\n {\n this._ensurePoly();\n\n const points = this._currentPoly.points;\n\n const fromX = points[points.length - 2];\n const fromY = points[points.length - 1];\n\n if (fromX !== x || fromY !== y)\n {\n points.push(x, y);\n }\n\n return this;\n }\n\n /**\n * Adds an arc to the path. The arc is centered at (x, y)\n * position with radius `radius` starting at `startAngle` and ending at `endAngle`.\n * @param x - The x-coordinate of the arc's center.\n * @param y - The y-coordinate of the arc's center.\n * @param radius - The radius of the arc.\n * @param startAngle - The starting angle of the arc, in radians.\n * @param endAngle - The ending angle of the arc, in radians.\n * @param counterclockwise - Specifies whether the arc should be drawn in the anticlockwise direction. False by default.\n * @returns The instance of the current object for chaining.\n */\n public arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise: boolean): this\n {\n // TODO - if its 360 degrees.. make it a circle object?\n\n this._ensurePoly(false);\n\n const points = this._currentPoly.points;\n\n buildArc(points, x, y, radius, startAngle, endAngle, counterclockwise);\n\n return this;\n }\n\n /**\n * Adds an arc to the path with the arc tangent to the line joining two specified points.\n * The arc radius is specified by `radius`.\n * @param x1 - The x-coordinate of the first point.\n * @param y1 - The y-coordinate of the first point.\n * @param x2 - The x-coordinate of the second point.\n * @param y2 - The y-coordinate of the second point.\n * @param radius - The radius of the arc.\n * @returns The instance of the current object for chaining.\n */\n public arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): this\n {\n this._ensurePoly();\n\n const points = this._currentPoly.points;\n\n buildArcTo(points, x1, y1, x2, y2, radius);\n\n return this;\n }\n\n /**\n * Adds an SVG-style arc to the path, allowing for elliptical arcs based on the SVG spec.\n * @param rx - The x-radius of the ellipse.\n * @param ry - The y-radius of the ellipse.\n * @param xAxisRotation - The rotation of the ellipse's x-axis relative\n * to the x-axis of the coordinate system, in degrees.\n * @param largeArcFlag - Determines if the arc should be greater than or less than 180 degrees.\n * @param sweepFlag - Determines if the arc should be swept in a positive angle direction.\n * @param x - The x-coordinate of the arc's end point.\n * @param y - The y-coordinate of the arc's end point.\n * @returns The instance of the current object for chaining.\n */\n public arcToSvg(\n rx: number, ry: number,\n xAxisRotation: number, largeArcFlag: number, sweepFlag: number,\n x: number, y: number\n ): this\n {\n const points = this._currentPoly.points;\n\n // this needs to work on both canvas and GPU backends so might want to move this to the Graphics2D path..\n buildArcToSvg(\n points,\n this._currentPoly.lastX,\n this._currentPoly.lastY,\n x,\n y,\n rx,\n ry,\n xAxisRotation,\n largeArcFlag,\n sweepFlag,\n );\n\n return this;\n }\n\n /**\n * Adds a cubic Bezier curve to the path.\n * It requires three points: the first two are control points and the third one is the end point.\n * The starting point is the last point in the current path.\n * @param cp1x - The x-coordinate of the first control point.\n * @param cp1y - The y-coordinate of the first control point.\n * @param cp2x - The x-coordinate of the second control point.\n * @param cp2y - The y-coordinate of the second control point.\n * @param x - The x-coordinate of the end point.\n * @param y - The y-coordinate of the end point.\n * @param smoothness - Optional parameter to adjust the smoothness of the curve.\n * @returns The instance of the current object for chaining.\n */\n public bezierCurveTo(\n cp1x: number, cp1y: number, cp2x: number, cp2y: number,\n x: number, y: number,\n smoothness?: number\n ): this\n {\n this._ensurePoly();\n\n const currentPoly = this._currentPoly;\n\n // ensure distance from last point to first control point is not too small\n\n // TODO - make this a plugin that people can override..\n buildAdaptiveBezier(\n this._currentPoly.points,\n currentPoly.lastX, currentPoly.lastY,\n cp1x, cp1y, cp2x, cp2y, x, y,\n smoothness,\n );\n\n return this;\n }\n\n /**\n * Adds a quadratic curve to the path. It requires two points: the control point and the end point.\n * The starting point is the last point in the current path.\n * @param cp1x - The x-coordinate of the control point.\n * @param cp1y - The y-coordinate of the control point.\n * @param x - The x-coordinate of the end point.\n * @param y - The y-coordinate of the end point.\n * @param smoothing - Optional parameter to adjust the smoothness of the curve.\n * @returns The instance of the current object for chaining.\n */\n public quadraticCurveTo(cp1x: number, cp1y: number, x: number, y: number, smoothing?: number): this\n {\n this._ensurePoly();\n\n const currentPoly = this._currentPoly;\n\n // ensure distance from last point to first control point is not too small\n\n // TODO - make this a plugin that people can override..\n buildAdaptiveQuadratic(\n this._currentPoly.points,\n currentPoly.lastX, currentPoly.lastY,\n cp1x, cp1y, x, y,\n smoothing,\n );\n\n return this;\n }\n\n /**\n * Closes the current path by drawing a straight line back to the start.\n * If the shape is already closed or there are no points in the path, this method does nothing.\n * @returns The instance of the current object for chaining.\n */\n public closePath(): this\n {\n this.endPoly(true);\n\n return this;\n }\n\n /**\n * Adds another path to the current path. This method allows for the combination of multiple paths into one.\n * @param path - The `GraphicsPath` object representing the path to add.\n * @param transform - An optional `Matrix` object to apply a transformation to the path before adding it.\n * @returns The instance of the current object for chaining.\n */\n public addPath(path: GraphicsPath, transform?: Matrix): this\n {\n this.endPoly();\n\n // Only clone if we need to transform\n if (transform && !transform.isIdentity())\n {\n path = path.clone(true);\n path.transform(transform);\n }\n\n const shapePrimitives = this.shapePrimitives;\n const start = shapePrimitives.length;\n\n for (let i = 0; i < path.instructions.length; i++)\n {\n const instruction = path.instructions[i];\n\n this[instruction.action](...(instruction.data as [never, never, never, never, never, never, never]));\n }\n\n // This section processes holes in polygons by checking if any polygon is contained within another.\n // If a polygon is found to be inside another polygon (mainShape), it's treated as a hole.\n // The hole polygon is removed from the main shapePrimitives array and added to the holes array\n // of the containing polygon. This allows for proper rendering of shapes with holes.\n if (path.checkForHoles && shapePrimitives.length - start > 1)\n {\n let mainShape = null;\n\n // Process in place instead of creating a removal array\n for (let i = start; i < shapePrimitives.length; i++)\n {\n const shapePrimitive = shapePrimitives[i];\n\n if (shapePrimitive.shape.type === 'polygon')\n {\n const polygon = shapePrimitive.shape as Polygon;\n const mainPolygon = mainShape?.shape as Polygon;\n\n if (mainPolygon && mainPolygon.containsPolygon(polygon))\n {\n // Initialize holes array only when needed\n mainShape.holes ||= [];\n mainShape.holes.push(shapePrimitive);\n\n // Remove the hole by moving elements left\n shapePrimitives.copyWithin(i, i + 1);\n shapePrimitives.length--;\n i--;\n }\n else\n {\n mainShape = shapePrimitive;\n }\n }\n }\n }\n\n return this;\n }\n\n /**\n * Finalizes the drawing of the current path. Optionally, it can close the path.\n * @param closePath - A boolean indicating whether to close the path after finishing. False by default.\n */\n public finish(closePath = false)\n {\n this.endPoly(closePath);\n }\n\n /**\n * Draws a rectangle shape. This method adds a new rectangle path to the current drawing.\n * @param x - The x-coordinate of the top-left corner of the rectangle.\n * @param y - The y-coordinate of the top-left corner of the rectangle.\n * @param w - The width of the rectangle.\n * @param h - The height of the rectangle.\n * @param transform - An optional `Matrix` object to apply a transformation to the rectangle.\n * @returns The instance of the current object for chaining.\n */\n public rect(x: number, y: number, w: number, h: number, transform?: Matrix): this\n {\n this.drawShape(new Rectangle(x, y, w, h), transform);\n\n return this;\n }\n\n /**\n * Draws a circle shape. This method adds a new circle path to the current drawing.\n * @param x - The x-coordinate of the center of the circle.\n * @param y - The y-coordinate of the center of the circle.\n * @param radius - The radius of the circle.\n * @param transform - An optional `Matrix` object to apply a transformation to the circle.\n * @returns The instance of the current object for chaining.\n */\n public circle(x: number, y: number, radius: number, transform?: Matrix): this\n {\n this.drawShape(new Circle(x, y, radius), transform);\n\n return this;\n }\n\n /**\n * Draws a polygon shape. This method allows for the creation of complex polygons by specifying a sequence of points.\n * @param points - An array of numbers, or or an array of PointData objects eg [{x,y}, {x,y}, {x,y}]\n * representing the x and y coordinates of the polygon's vertices, in sequence.\n * @param close - A boolean indicating whether to close the polygon path. True by default.\n * @param transform - An optional `Matrix` object to apply a transformation to the polygon.\n * @returns The instance of the current object for chaining.\n */\n public poly(points: number[] | PointData[], close?: boolean, transform?: Matrix): this\n {\n const polygon = new Polygon(points);\n\n polygon.closePath = close;\n\n this.drawShape(polygon, transform);\n\n return this;\n }\n\n /**\n * Draws a regular polygon with a specified number of sides. All sides and angles are equal.\n * @param x - The x-coordinate of the center of the polygon.\n * @param y - The y-coordinate of the center of the polygon.\n * @param radius - The radius of the circumscribed circle of the polygon.\n * @param sides - The number of sides of the polygon. Must be 3 or more.\n * @param rotation - The rotation angle of the polygon, in radians. Zero by default.\n * @param transform - An optional `Matrix` object to apply a transformation to the polygon.\n * @returns The instance of the current object for chaining.\n */\n public regularPoly(x: number, y: number, radius: number, sides: number, rotation = 0, transform?: Matrix): this\n {\n sides = Math.max(sides | 0, 3);\n const startAngle = (-1 * Math.PI / 2) + rotation;\n const delta = (Math.PI * 2) / sides;\n const polygon = [];\n\n for (let i = 0; i < sides; i++)\n {\n const angle = startAngle - (i * delta);\n\n polygon.push(\n x + (radius * Math.cos(angle)),\n y + (radius * Math.sin(angle))\n );\n }\n\n this.poly(polygon, true, transform);\n\n return this;\n }\n\n /**\n * Draws a polygon with rounded corners.\n * Similar to `regularPoly` but with the ability to round the corners of the polygon.\n * @param x - The x-coordinate of the center of the polygon.\n * @param y - The y-coordinate of the center of the polygon.\n * @param radius - The radius of the circumscribed circle of the polygon.\n * @param sides - The number of sides of the polygon. Must be 3 or more.\n * @param corner - The radius of the rounding of the corners.\n * @param rotation - The rotation angle of the polygon, in radians. Zero by default.\n * @param smoothness - Optional parameter to adjust the smoothness of the rounding.\n * @returns The instance of the current object for chaining.\n */\n public roundPoly(\n x: number, y: number,\n radius: number,\n sides: number, corner: number,\n rotation = 0,\n smoothness?: number,\n ): this\n {\n sides = Math.max((sides | 0), 3);\n\n if (corner <= 0)\n {\n return this.regularPoly(x, y, radius, sides, rotation);\n }\n\n const sideLength = (radius * Math.sin(Math.PI / sides)) - 0.001;\n\n corner = Math.min(corner, sideLength);\n\n const startAngle = (-1 * Math.PI / 2) + rotation;\n const delta = (Math.PI * 2) / sides;\n const internalAngle = ((sides - 2) * Math.PI) / sides / 2;\n\n for (let i = 0; i < sides; i++)\n {\n const angle = (i * delta) + startAngle;\n const x0 = x + (radius * Math.cos(angle));\n const y0 = y + (radius * Math.sin(angle));\n const a1 = angle + (Math.PI) + internalAngle;\n const a2 = angle - (Math.PI) - internalAngle;\n const x1 = x0 + (corner * Math.cos(a1));\n const y1 = y0 + (corner * Math.sin(a1));\n const x3 = x0 + (corner * Math.cos(a2));\n const y3 = y0 + (corner * Math.sin(a2));\n\n if (i === 0)\n {\n this.moveTo(x1, y1);\n }\n else\n {\n this.lineTo(x1, y1);\n }\n this.quadraticCurveTo(x0, y0, x3, y3, smoothness);\n }\n\n return this.closePath();\n }\n\n /**\n * Draws a shape with rounded corners. This function supports custom radius for each corner of the shape.\n * Optionally, corners can be rounded using a quadratic curve instead of an arc, providing a different aesthetic.\n * @param points - An array of `RoundedPoint` representing the corners of the shape to draw.\n * A minimum of 3 points is required.\n * @param radius - The default radius for the corners.\n * This radius is applied to all corners unless overridden in `points`.\n * @param useQuadratic - If set to true, rounded corners are drawn using a quadraticCurve\n * method instead of an arc method. Defaults to false.\n * @param smoothness - Specifies the smoothness of the curve when `useQuadratic` is true.\n * Higher values make the curve smoother.\n * @returns The instance of the current object for chaining.\n */\n public roundShape(points: RoundedPoint[], radius: number, useQuadratic = false, smoothness?: number): this\n {\n if (points.length < 3)\n {\n return this;\n }\n\n if (useQuadratic)\n {\n roundedShapeQuadraticCurve(this, points, radius, smoothness);\n }\n else\n {\n roundedShapeArc(this, points, radius);\n }\n\n return this.closePath();\n }\n\n /**\n * Draw Rectangle with fillet corners. This is much like rounded rectangle\n * however it support negative numbers as well for the corner radius.\n * @param x - Upper left corner of rect\n * @param y - Upper right corner of rect\n * @param width - Width of rect\n * @param height - Height of rect\n * @param fillet - accept negative or positive values\n */\n public filletRect(x: number, y: number, width: number, height: number, fillet: number): this\n {\n if (fillet === 0)\n {\n return this.rect(x, y, width, height);\n }\n\n const maxFillet = Math.min(width, height) / 2;\n const inset = Math.min(maxFillet, Math.max(-maxFillet, fillet));\n const right = x + width;\n const bottom = y + height;\n const dir = inset < 0 ? -inset : 0;\n const size = Math.abs(inset);\n\n return this\n .moveTo(x, y + size)\n .arcTo(x + dir, y + dir, x + size, y, size)\n .lineTo(right - size, y)\n .arcTo(right - dir, y + dir, right, y + size, size)\n .lineTo(right, bottom - size)\n .arcTo(right - dir, bottom - dir, x + width - size, bottom, size)\n .lineTo(x + size, bottom)\n .arcTo(x + dir, bottom - dir, x, bottom - size, size)\n .closePath();\n }\n\n /**\n * Draw Rectangle with chamfer corners. These are angled corners.\n * @param x - Upper left corner of rect\n * @param y - Upper right corner of rect\n * @param width - Width of rect\n * @param height - Height of rect\n * @param chamfer - non-zero real number, size of corner cutout\n * @param transform\n */\n public chamferRect(x: number, y: number, width: number, height: number, chamfer: number, transform?: Matrix): this\n {\n if (chamfer <= 0)\n {\n return this.rect(x, y, width, height);\n }\n\n const inset = Math.min(chamfer, Math.min(width, height) / 2);\n const right = x + width;\n const bottom = y + height;\n const points = [\n x + inset, y,\n right - inset, y,\n right, y + inset,\n right, bottom - inset,\n right - inset, bottom,\n x + inset, bottom,\n x, bottom - inset,\n x, y + inset,\n ];\n\n // Remove overlapping points\n for (let i = points.length - 1; i >= 2; i -= 2)\n {\n if (points[i] === points[i - 2] && points[i - 1] === points[i - 3])\n {\n points.splice(i - 1, 2);\n }\n }\n\n return this.poly(points, true, transform);\n }\n\n /**\n * Draws an ellipse at the specified location and with the given x and y radii.\n * An optional transformation can be applied, allowing for rotation, scaling, and translation.\n * @param x - The x-coordinate of the center of the ellipse.\n * @param y - The y-coordinate of the center of the ellipse.\n * @param radiusX - The horizontal radius of the ellipse.\n * @param radiusY - The vertical radius of the ellipse.\n * @param transform - An optional `Matrix` object to apply a transformation to the ellipse. This can include rotations.\n * @returns The instance of the current object for chaining.\n */\n public ellipse(x: number, y: number, radiusX: number, radiusY: number, transform?: Matrix): this\n {\n // TODO apply rotation to transform...\n\n this.drawShape(new Ellipse(x, y, radiusX, radiusY), transform);\n\n return this;\n }\n\n /**\n * Draws a rectangle with rounded corners.\n * The corner radius can be specified to determine how rounded the corners should be.\n * An optional transformation can be applied, which allows for rotation, scaling, and translation of the rectangle.\n * @param x - The x-coordinate of the top-left corner of the rectangle.\n * @param y - The y-coordinate of the top-left corner of the rectangle.\n * @param w - The width of the rectangle.\n * @param h - The height of the rectangle.\n * @param radius - The radius of the rectangle's corners. If not specified, corners will be sharp.\n * @param transform - An optional `Matrix` object to apply a transformation to the rectangle.\n * @returns The instance of the current object for chaining.\n */\n public roundRect(x: number, y: number, w: number, h: number, radius?: number, transform?: Matrix): this\n {\n this.drawShape(new RoundedRectangle(x, y, w, h, radius), transform);\n\n return this;\n }\n\n /**\n * Draws a given shape on the canvas.\n * This is a generic method that can draw any type of shape specified by the `ShapePrimitive` parameter.\n * An optional transformation matrix can be applied to the shape, allowing for complex transformations.\n * @param shape - The shape to draw, defined as a `ShapePrimitive` object.\n * @param matrix - An optional `Matrix` for transforming the shape. This can include rotations,\n * scaling, and translations.\n * @returns The instance of the current object for chaining.\n */\n public drawShape(shape: ShapePrimitive, matrix?: Matrix): this\n {\n this.endPoly();\n\n this.shapePrimitives.push({ shape, transform: matrix });\n\n return this;\n }\n\n /**\n * Starts a new polygon path from the specified starting point.\n * This method initializes a new polygon or ends the current one if it exists.\n * @param x - The x-coordinate of the starting point of the new polygon.\n * @param y - The y-coordinate of the starting point of the new polygon.\n * @returns The instance of the current object for chaining.\n */\n public startPoly(x: number, y: number): this\n {\n let currentPoly = this._currentPoly;\n\n if (currentPoly)\n {\n this.endPoly();\n }\n\n currentPoly = new Polygon();\n\n currentPoly.points.push(x, y);\n\n this._currentPoly = currentPoly;\n\n return this;\n }\n\n /**\n * Ends the current polygon path. If `closePath` is set to true,\n * the path is closed by connecting the last point to the first one.\n * This method finalizes the current polygon and prepares it for drawing or adding to the shape primitives.\n * @param closePath - A boolean indicating whether to close the polygon by connecting the last point\n * back to the starting point. False by default.\n * @returns The instance of the current object for chaining.\n */\n public endPoly(closePath = false): this\n {\n const shape = this._currentPoly;\n\n if (shape && shape.points.length > 2)\n {\n shape.closePath = closePath;\n\n this.shapePrimitives.push({ shape });\n }\n\n this._currentPoly = null;\n\n return this;\n }\n\n private _ensurePoly(start = true): void\n {\n if (this._currentPoly) return;\n\n this._currentPoly = new Polygon();\n\n if (start)\n {\n // get last points..\n const lastShape = this.shapePrimitives[this.shapePrimitives.length - 1];\n\n if (lastShape)\n {\n // i KNOW its a rect..\n let lx = lastShape.shape.x;\n let ly = lastShape.shape.y;\n\n if (lastShape.transform && !lastShape.transform.isIdentity())\n {\n const t = lastShape.transform;\n\n const tempX = lx;\n\n lx = (t.a * lx) + (t.c * ly) + t.tx;\n ly = (t.b * tempX) + (t.d * ly) + t.ty;\n }\n\n this._currentPoly.points.push(lx, ly);\n }\n else\n {\n this._currentPoly.points.push(0, 0);\n }\n }\n }\n\n /** Builds the path. */\n public buildPath()\n {\n const path = this._graphicsPath2D;\n\n this.shapePrimitives.length = 0;\n this._currentPoly = null;\n\n for (let i = 0; i < path.instructions.length; i++)\n {\n const instruction = path.instructions[i];\n\n // Sorry TS! this is the best we could do...\n this[instruction.action](...(instruction.data as [never, never, never, never, never, never, never]));\n }\n\n this.finish();\n }\n\n /** Gets the bounds of the path. */\n get bounds(): Bounds\n {\n const bounds = this._bounds;\n\n bounds.clear();\n\n const shapePrimitives = this.shapePrimitives;\n\n for (let i = 0; i < shapePrimitives.length; i++)\n {\n const shapePrimitive = shapePrimitives[i];\n\n const boundsRect = shapePrimitive.shape.getBounds(tempRectangle);\n\n if (shapePrimitive.transform)\n {\n bounds.addRect(boundsRect, shapePrimitive.transform);\n }\n else\n {\n bounds.addRect(boundsRect);\n }\n }\n\n return bounds;\n }\n}\n","//#region src/index.ts\n/** Number of numeric arguments each SVG path command expects (lowercase keys). */\nconst length = {\n\ta: 7,\n\tc: 6,\n\th: 1,\n\tl: 2,\n\tm: 2,\n\tq: 4,\n\ts: 4,\n\tt: 2,\n\tv: 1,\n\tz: 0\n};\n/** Matches a single path command letter followed by its raw argument string. */\nconst segment = /([astvzqmhlc])([^astvzqmhlc]*)/gi;\n/** Matches a single numeric token, including negatives, decimals, and scientific notation. */\nconst number = /-?[0-9]*\\.?[0-9]+(?:e[-+]?\\d+)?/gi;\n/**\n* Parse an SVG path `d` attribute string into an array of commands.\n*\n* Each command is a tuple of `[letter, ...args]`. Relative commands use\n* lowercase letters; absolute commands use uppercase. An implicit `lineto`\n* is inserted after the first coordinate pair of a `moveto` with extra args,\n* per the SVG spec.\n*\n* @param path - The raw SVG path data string (e.g. `\"M0,0 L10,10 Z\"`).\n* @returns Array of parsed commands.\n* @throws {Error} if a command has fewer arguments than expected.\n*/\nfunction parse(path) {\n\tconst data = [];\n\tpath.replace(segment, (_, cmd, args) => {\n\t\tlet type = cmd.toLowerCase();\n\t\tlet command = cmd;\n\t\tconst values = parseValues(args);\n\t\tif (type === \"m\" && values.length > 2) {\n\t\t\tdata.push([command, ...values.splice(0, 2)]);\n\t\t\ttype = \"l\";\n\t\t\tcommand = command === \"m\" ? \"l\" : \"L\";\n\t\t}\n\t\twhile (true) {\n\t\t\tif (values.length === length[type]) {\n\t\t\t\tdata.push([command, ...values]);\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\tif (values.length < length[type]) throw new Error(\"malformed path data\");\n\t\t\tdata.push([command, ...values.splice(0, length[type])]);\n\t\t}\n\t});\n\treturn data;\n}\n/** Extract all numeric tokens from a raw argument string. */\nfunction parseValues(args) {\n\tconst numbers = args.match(number);\n\treturn numbers ? numbers.map(Number) : [];\n}\n//#endregion\nexport { parse as default };\n","import { Rectangle } from './Rectangle';\n\nimport type { ShapePrimitive } from './ShapePrimitive';\n\n/**\n * The Ellipse object is used to help draw graphics and can also be used to specify a hit area for containers.\n * @example\n * ```ts\n * // Basic ellipse creation\n * const ellipse = new Ellipse(100, 100, 20, 10);\n *\n * // Use as a hit area\n * container.hitArea = new Ellipse(0, 0, 50, 25);\n *\n * // Check point containment\n * const isInside = ellipse.contains(mouseX, mouseY);\n *\n * // Get bounding box\n * const bounds = ellipse.getBounds();\n * ```\n * @remarks\n * - Defined by center (x,y) and half dimensions\n * - Total width = halfWidth * 2\n * - Total height = halfHeight * 2\n * @see {@link Rectangle} For rectangular shapes\n * @see {@link Circle} For circular shapes\n * @category maths\n * @standard\n */\nexport class Ellipse implements ShapePrimitive\n{\n /**\n * The X coordinate of the center of this ellipse\n * @example\n * ```ts\n * // Basic x position\n * const ellipse = new Ellipse();\n * ellipse.x = 100;\n * ```\n * @default 0\n */\n public x: number;\n\n /**\n * The Y coordinate of the center of this ellipse\n * @example\n * ```ts\n * // Basic y position\n * const ellipse = new Ellipse();\n * ellipse.y = 200;\n * ```\n * @default 0\n */\n public y: number;\n\n /**\n * The half width of this ellipse\n * @example\n * ```ts\n * // Set half width\n * const ellipse = new Ellipse(100, 100);\n * ellipse.halfWidth = 50; // Total width will be 100\n * ```\n * @default 0\n */\n public halfWidth: number;\n\n /**\n * The half height of this ellipse\n * @example\n * ```ts\n * // Set half height\n * const ellipse = new Ellipse(100, 100);\n * ellipse.halfHeight = 25; // Total height will be 50\n * ```\n * @default 0\n */\n public halfHeight: number;\n\n /**\n * The type of the object, mainly used to avoid `instanceof` checks\n * @example\n * ```ts\n * // Check shape type\n * const shape = new Ellipse(0, 0, 50, 25);\n * console.log(shape.type); // 'ellipse'\n *\n * // Use in type guards\n * if (shape.type === 'ellipse') {\n * console.log(shape.halfWidth, shape.halfHeight);\n * }\n * ```\n * @readonly\n * @default 'ellipse'\n * @see {@link SHAPE_PRIMITIVE} For all shape types\n */\n public readonly type = 'ellipse';\n\n /**\n * @param x - The X coordinate of the center of this ellipse\n * @param y - The Y coordinate of the center of this ellipse\n * @param halfWidth - The half width of this ellipse\n * @param halfHeight - The half height of this ellipse\n */\n constructor(x = 0, y = 0, halfWidth = 0, halfHeight = 0)\n {\n this.x = x;\n this.y = y;\n this.halfWidth = halfWidth;\n this.halfHeight = halfHeight;\n }\n\n /**\n * Creates a clone of this Ellipse instance.\n * @example\n * ```ts\n * // Basic cloning\n * const original = new Ellipse(100, 100, 50, 25);\n * const copy = original.clone();\n *\n * // Clone and modify\n * const modified = original.clone();\n * modified.halfWidth *= 2;\n * modified.halfHeight *= 2;\n *\n * // Verify independence\n * console.log(original.halfWidth); // 50\n * console.log(modified.halfWidth); // 100\n * ```\n * @returns A copy of the ellipse\n * @see {@link Ellipse.copyFrom} For copying into existing ellipse\n * @see {@link Ellipse.copyTo} For copying to another ellipse\n */\n public clone(): Ellipse\n {\n return new Ellipse(this.x, this.y, this.halfWidth, this.halfHeight);\n }\n\n /**\n * Checks whether the x and y coordinates given are contained within this ellipse.\n * Uses normalized coordinates and the ellipse equation to determine containment.\n * @example\n * ```ts\n * // Basic containment check\n * const ellipse = new Ellipse(100, 100, 50, 25);\n * const isInside = ellipse.contains(120, 110);\n * ```\n * @remarks\n * - Uses ellipse equation (x²/a² + y²/b² ≤ 1)\n * - Returns false if dimensions are 0 or negative\n * - Normalized to center (0,0) for calculation\n * @param x - The X coordinate of the point to test\n * @param y - The Y coordinate of the point to test\n * @returns Whether the x/y coords are within this ellipse\n * @see {@link Ellipse.strokeContains} For checking stroke intersection\n * @see {@link Ellipse.getBounds} For getting containing rectangle\n */\n public contains(x: number, y: number): boolean\n {\n if (this.halfWidth <= 0 || this.halfHeight <= 0)\n {\n return false;\n }\n\n // normalize the coords to an ellipse with center 0,0\n let normx = ((x - this.x) / this.halfWidth);\n let normy = ((y - this.y) / this.halfHeight);\n\n normx *= normx;\n normy *= normy;\n\n return (normx + normy <= 1);\n }\n\n /**\n * Checks whether the x and y coordinates given are contained within this ellipse including stroke.\n * @example\n * ```ts\n * // Basic stroke check\n * const ellipse = new Ellipse(100, 100, 50, 25);\n * const isOnStroke = ellipse.strokeContains(150, 100, 4); // 4px line width\n *\n * // Check with different alignments\n * const innerStroke = ellipse.strokeContains(150, 100, 4, 1); // Inside\n * const centerStroke = ellipse.strokeContains(150, 100, 4, 0.5); // Centered\n * const outerStroke = ellipse.strokeContains(150, 100, 4, 0); // Outside\n * ```\n * @remarks\n * - Uses normalized ellipse equations\n * - Considers stroke alignment\n * - Returns false if dimensions are 0\n * - A stroke wider than the shape covers it entirely, leaving no unstroked interior\n * @param x - The X coordinate of the point to test\n * @param y - The Y coordinate of the point to test\n * @param strokeWidth - The width of the line to check\n * @param alignment - The alignment of the stroke (1 = inner, 0.5 = centered, 0 = outer)\n * @returns Whether the x/y coords are within this ellipse's stroke\n * @see {@link Ellipse.contains} For checking fill containment\n * @see {@link Ellipse.getBounds} For getting stroke bounds\n */\n public strokeContains(x: number, y: number, strokeWidth: number, alignment: number = 0.5): boolean\n {\n const { halfWidth, halfHeight } = this;\n\n if (halfWidth <= 0 || halfHeight <= 0)\n {\n return false;\n }\n\n const strokeOuterWidth = strokeWidth * (1 - alignment);\n const strokeInnerWidth = strokeWidth - strokeOuterWidth;\n\n const innerHorizontal = halfWidth - strokeInnerWidth;\n const innerVertical = halfHeight - strokeInnerWidth;\n\n const outerHorizontal = halfWidth + strokeOuterWidth;\n const outerVertical = halfHeight + strokeOuterWidth;\n\n const normalizedX = x - this.x;\n const normalizedY = y - this.y;\n\n const outerEllipse = ((normalizedX * normalizedX) / (outerHorizontal * outerHorizontal))\n + ((normalizedY * normalizedY) / (outerVertical * outerVertical));\n\n if (outerEllipse > 1) return false;\n\n // Once the inward part of the stroke reaches the center on either axis there is no\n // unstroked interior left, so everything inside the outer edge is on the stroke.\n // Squaring a negative half-axis would revive it as a smaller positive ellipse and\n // carve a hole out of the middle of the stroke.\n if (innerHorizontal <= 0 || innerVertical <= 0) return true;\n\n const innerEllipse = ((normalizedX * normalizedX) / (innerHorizontal * innerHorizontal))\n + ((normalizedY * normalizedY) / (innerVertical * innerVertical));\n\n return innerEllipse > 1;\n }\n\n /**\n * Returns the framing rectangle of the ellipse as a Rectangle object.\n * @example\n * ```ts\n * // Basic bounds calculation\n * const ellipse = new Ellipse(100, 100, 50, 25);\n * const bounds = ellipse.getBounds();\n * // bounds: x=50, y=75, width=100, height=50\n *\n * // Reuse existing rectangle\n * const rect = new Rectangle();\n * ellipse.getBounds(rect);\n * ```\n * @remarks\n * - Creates Rectangle if none provided\n * - Top-left is (x-halfWidth, y-halfHeight)\n * - Width is halfWidth * 2\n * - Height is halfHeight * 2\n * @param out - Optional Rectangle object to store the result\n * @returns The framing rectangle\n * @see {@link Rectangle} For rectangle properties\n * @see {@link Ellipse.contains} For checking if a point is inside\n */\n public getBounds(out?: Rectangle): Rectangle\n {\n out ||= new Rectangle();\n\n out.x = this.x - this.halfWidth;\n out.y = this.y - this.halfHeight;\n out.width = this.halfWidth * 2;\n out.height = this.halfHeight * 2;\n\n return out;\n }\n\n /**\n * Copies another ellipse to this one.\n * @example\n * ```ts\n * // Basic copying\n * const source = new Ellipse(100, 100, 50, 25);\n * const target = new Ellipse();\n * target.copyFrom(source);\n * ```\n * @param ellipse - The ellipse to copy from\n * @returns Returns itself\n * @see {@link Ellipse.copyTo} For copying to another ellipse\n * @see {@link Ellipse.clone} For creating new ellipse copy\n */\n public copyFrom(ellipse: Ellipse): this\n {\n this.x = ellipse.x;\n this.y = ellipse.y;\n this.halfWidth = ellipse.halfWidth;\n this.halfHeight = ellipse.halfHeight;\n\n return this;\n }\n\n /**\n * Copies this ellipse to another one.\n * @example\n * ```ts\n * // Basic copying\n * const source = new Ellipse(100, 100, 50, 25);\n * const target = new Ellipse();\n * source.copyTo(target);\n * ```\n * @param ellipse - The ellipse to copy to\n * @returns Returns given parameter\n * @see {@link Ellipse.copyFrom} For copying from another ellipse\n * @see {@link Ellipse.clone} For creating new ellipse copy\n */\n public copyTo(ellipse: Ellipse): Ellipse\n {\n ellipse.copyFrom(this);\n\n return ellipse;\n }\n\n // #if _DEBUG\n public toString(): string\n {\n return `[pixi.js/math:Ellipse x=${this.x} y=${this.y} halfWidth=${this.halfWidth} halfHeight=${this.halfHeight}]`;\n }\n // #endif\n}\n","import { Rectangle } from './Rectangle';\n\nimport type { SHAPE_PRIMITIVE } from '../misc/const';\nimport type { ShapePrimitive } from './ShapePrimitive';\n\n/**\n * The Circle object represents a circle shape in a two-dimensional coordinate system.\n * Used for drawing graphics and specifying hit areas for containers.\n * @example\n * ```ts\n * // Basic circle creation\n * const circle = new Circle(100, 100, 50);\n *\n * // Use as hit area\n * container.hitArea = new Circle(0, 0, 100);\n *\n * // Check point containment\n * const isInside = circle.contains(mouseX, mouseY);\n *\n * // Get bounding box\n * const bounds = circle.getBounds();\n * ```\n * @remarks\n * - Defined by center (x,y) and radius\n * - Supports point containment tests\n * - Can check stroke intersections\n * @see {@link Rectangle} For rectangular shapes\n * @category maths\n * @standard\n */\nexport class Circle implements ShapePrimitive\n{\n /**\n * The X coordinate of the center of this circle\n * @example\n * ```ts\n * // Basic x position\n * const circle = new Circle();\n * circle.x = 100;\n *\n * // Center circle on point\n * circle.x = point.x;\n * ```\n * @default 0\n */\n public x: number;\n\n /**\n * The Y coordinate of the center of this circle\n * @example\n * ```ts\n * // Basic y position\n * const circle = new Circle();\n * circle.y = 200;\n *\n * // Center circle on point\n * circle.y = point.y;\n * ```\n * @default 0\n */\n public y: number;\n\n /**\n * The radius of the circle\n * @example\n * ```ts\n * // Basic radius setting\n * const circle = new Circle(100, 100);\n * circle.radius = 50;\n *\n * // Calculate area\n * const area = Math.PI * circle.radius * circle.radius;\n * ```\n * @default 0\n */\n public radius: number;\n\n /**\n * The type of the object, mainly used to avoid `instanceof` checks.\n * @example\n * ```ts\n * // Check shape type\n * const shape = new Circle(0, 0, 50);\n * console.log(shape.type); // 'circle'\n *\n * // Use in type guards\n * if (shape.type === 'circle') {\n * console.log(shape.radius);\n * }\n * ```\n * @remarks\n * - Used for shape type checking\n * - More efficient than instanceof\n * - Read-only property\n * @readonly\n * @default 'circle'\n * @see {@link SHAPE_PRIMITIVE} For all shape types\n * @see {@link ShapePrimitive} For shape interface\n */\n public readonly type: SHAPE_PRIMITIVE = 'circle';\n\n /**\n * @param x - The X coordinate of the center of this circle\n * @param y - The Y coordinate of the center of this circle\n * @param radius - The radius of the circle\n */\n constructor(x = 0, y = 0, radius = 0)\n {\n this.x = x;\n this.y = y;\n this.radius = radius;\n }\n\n /**\n * Creates a clone of this Circle instance.\n * @example\n * ```ts\n * // Basic circle cloning\n * const original = new Circle(100, 100, 50);\n * const copy = original.clone();\n *\n * // Clone and modify\n * const modified = original.clone();\n * modified.radius = 75;\n *\n * // Verify independence\n * console.log(original.radius); // 50\n * console.log(modified.radius); // 75\n * ```\n * @returns A copy of the Circle\n * @see {@link Circle.copyFrom} For copying into existing circle\n * @see {@link Circle.copyTo} For copying to another circle\n */\n public clone(): Circle\n {\n return new Circle(this.x, this.y, this.radius);\n }\n\n /**\n * Checks whether the x and y coordinates given are contained within this circle.\n *\n * Uses the distance formula to determine if a point is inside the circle's radius.\n *\n * Commonly used for hit testing in PixiJS events and graphics.\n * @example\n * ```ts\n * // Basic containment check\n * const circle = new Circle(100, 100, 50);\n * const isInside = circle.contains(120, 120);\n *\n * // Check mouse position\n * const circle = new Circle(0, 0, 100);\n * container.hitArea = circle;\n * container.on('pointermove', (e) => {\n * // only called if pointer is within circle\n * });\n * ```\n * @param x - The X coordinate of the point to test\n * @param y - The Y coordinate of the point to test\n * @returns Whether the x/y coordinates are within this Circle\n * @see {@link Circle.strokeContains} For checking stroke intersection\n * @see {@link Circle.getBounds} For getting bounding box\n */\n public contains(x: number, y: number): boolean\n {\n if (this.radius <= 0) return false;\n\n const r2 = this.radius * this.radius;\n let dx = (this.x - x);\n let dy = (this.y - y);\n\n dx *= dx;\n dy *= dy;\n\n return (dx + dy <= r2);\n }\n\n /**\n * Checks whether the x and y coordinates given are contained within this circle including the stroke.\n * @example\n * ```ts\n * // Basic stroke check\n * const circle = new Circle(100, 100, 50);\n * const isOnStroke = circle.strokeContains(150, 100, 4); // 4px line width\n *\n * // Check with different alignments\n * const innerStroke = circle.strokeContains(150, 100, 4, 1); // Inside\n * const centerStroke = circle.strokeContains(150, 100, 4, 0.5); // Centered\n * const outerStroke = circle.strokeContains(150, 100, 4, 0); // Outside\n * ```\n * @param x - The X coordinate of the point to test\n * @param y - The Y coordinate of the point to test\n * @param width - The width of the line to check\n * @param alignment - The alignment of the stroke, 0.5 by default\n * @returns Whether the x/y coordinates are within this Circle's stroke\n * @see {@link Circle.contains} For checking fill containment\n * @see {@link Circle.getBounds} For getting stroke bounds\n */\n public strokeContains(x: number, y: number, width: number, alignment: number = 0.5): boolean\n {\n if (this.radius === 0) return false;\n\n const dx = (this.x - x);\n const dy = (this.y - y);\n const radius = this.radius;\n const outerWidth = (1 - alignment) * width;\n const distance = Math.sqrt((dx * dx) + (dy * dy));\n\n return (distance <= radius + outerWidth && distance > radius - (width - outerWidth));\n }\n\n /**\n * Returns the framing rectangle of the circle as a Rectangle object.\n * @example\n * ```ts\n * // Basic bounds calculation\n * const circle = new Circle(100, 100, 50);\n * const bounds = circle.getBounds();\n * // bounds: x=50, y=50, width=100, height=100\n *\n * // Reuse existing rectangle\n * const rect = new Rectangle();\n * circle.getBounds(rect);\n * ```\n * @param out - Optional Rectangle object to store the result\n * @returns The framing rectangle\n * @see {@link Rectangle} For rectangle properties\n * @see {@link Circle.contains} For point containment\n */\n public getBounds(out?: Rectangle): Rectangle\n {\n out ||= new Rectangle();\n\n out.x = this.x - this.radius;\n out.y = this.y - this.radius;\n out.width = this.radius * 2;\n out.height = this.radius * 2;\n\n return out;\n }\n\n /**\n * Copies another circle to this one.\n * @example\n * ```ts\n * // Basic copying\n * const source = new Circle(100, 100, 50);\n * const target = new Circle();\n * target.copyFrom(source);\n * ```\n * @param circle - The circle to copy from\n * @returns Returns itself\n * @see {@link Circle.copyTo} For copying to another circle\n * @see {@link Circle.clone} For creating new circle copy\n */\n public copyFrom(circle: Circle): this\n {\n this.x = circle.x;\n this.y = circle.y;\n this.radius = circle.radius;\n\n return this;\n }\n\n /**\n * Copies this circle to another one.\n * @example\n * ```ts\n * // Basic copying\n * const source = new Circle(100, 100, 50);\n * const target = new Circle();\n * source.copyTo(target);\n * ```\n * @param circle - The circle to copy to\n * @returns Returns given parameter\n * @see {@link Circle.copyFrom} For copying from another circle\n * @see {@link Circle.clone} For creating new circle copy\n */\n public copyTo(circle: Circle): Circle\n {\n circle.copyFrom(this);\n\n return circle;\n }\n\n // #if _DEBUG\n public toString(): string\n {\n return `[pixi.js/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`;\n }\n // #endif\n}\n","import parse from 'parse-svg-path';\nimport { warn } from '../../../../utils/logging/warn';\n\nimport type { GraphicsPath } from '../path/GraphicsPath';\n\ninterface SubPath\n{\n startX: number;\n startY: number;\n}\n\n/**\n * Parses an SVG path data string and builds a GraphicsPath object from the commands.\n * This function handles all standard SVG path commands including moves, lines, curves and arcs.\n * It maintains state for the current position and subpaths to properly handle relative commands\n * and path closures.\n *\n * Supported SVG commands:\n * - M/m: Move to absolute/relative\n * - L/l: Line to absolute/relative\n * - H/h: Horizontal line absolute/relative\n * - V/v: Vertical line absolute/relative\n * - C/c: Cubic bezier curve absolute/relative\n * - S/s: Smooth cubic bezier curve absolute/relative\n * - Q/q: Quadratic bezier curve absolute/relative\n * - T/t: Smooth quadratic bezier curve absolute/relative\n * - A/a: Arc absolute/relative\n * - Z/z: Close path\n * @param svgPath - The SVG path data string to parse (e.g. \"M0,0 L100,100\")\n * @param path - The GraphicsPath object to build the path into\n * @returns The input path object with the SVG commands applied\n * @internal\n */\nexport function parseSVGPath(svgPath: string, path: GraphicsPath): GraphicsPath\n{\n // Parse the SVG path string into an array of commands\n const commands = parse(svgPath);\n\n // Track subpaths for proper path closure handling\n const subpaths: SubPath[] = [];\n let currentSubPath: SubPath | null = null;\n\n // Track current position for relative commands\n let lastX = 0;\n let lastY = 0;\n\n // Process each command in sequence\n for (let i = 0; i < commands.length; i++)\n {\n const command = commands[i];\n const type = command[0]; // The command letter\n const data = command; // The command parameters, 1-based indexed\n\n switch (type)\n {\n case 'M': // Move To (absolute)\n lastX = data[1];\n lastY = data[2];\n\n path.moveTo(lastX, lastY);\n break;\n case 'm': // Move To (relative)\n lastX += data[1];\n lastY += data[2];\n\n path.moveTo(lastX, lastY);\n break;\n case 'H': // Horizontal Line To (absolute)\n lastX = data[1];\n\n path.lineTo(lastX, lastY);\n break;\n case 'h': // Horizontal Line To (relative)\n lastX += data[1];\n\n path.lineTo(lastX, lastY);\n break;\n case 'V': // Vertical Line To (absolute)\n lastY = data[1];\n\n path.lineTo(lastX, lastY);\n break;\n case 'v': // Vertical Line To (relative)\n lastY += data[1];\n\n path.lineTo(lastX, lastY);\n break;\n case 'L': // Line To (absolute)\n lastX = data[1];\n lastY = data[2];\n\n path.lineTo(lastX, lastY);\n break;\n case 'l': // Line To (relative)\n lastX += data[1];\n lastY += data[2];\n\n path.lineTo(lastX, lastY);\n break;\n case 'C': // Cubic Bezier Curve (absolute)\n lastX = data[5];\n lastY = data[6];\n\n path.bezierCurveTo(\n data[1], data[2], // First control point\n data[3], data[4], // Second control point\n lastX, lastY // End point\n );\n break;\n case 'c': // Cubic Bezier Curve (relative)\n path.bezierCurveTo(\n lastX + data[1], lastY + data[2], // First control point\n lastX + data[3], lastY + data[4], // Second control point\n lastX + data[5], lastY + data[6] // End point\n );\n\n lastX += data[5];\n lastY += data[6];\n break;\n case 'S': // Smooth Cubic Bezier Curve (absolute)\n lastX = data[3];\n lastY = data[4];\n\n path.bezierCurveToShort(\n data[1], data[2], // Control point\n lastX, lastY // End point\n );\n break;\n case 's': // Smooth Cubic Bezier Curve (relative)\n path.bezierCurveToShort(\n lastX + data[1], lastY + data[2], // Control point\n lastX + data[3], lastY + data[4], // End point\n );\n\n lastX += data[3];\n lastY += data[4];\n break;\n case 'Q': // Quadratic Bezier Curve (absolute)\n lastX = data[3];\n lastY = data[4];\n\n path.quadraticCurveTo(\n data[1], data[2], // Control point\n lastX, lastY // End point\n );\n break;\n case 'q': // Quadratic Bezier Curve (relative)\n path.quadraticCurveTo(\n lastX + data[1], lastY + data[2], // Control point\n lastX + data[3], lastY + data[4] // End point\n );\n\n lastX += data[3];\n lastY += data[4];\n break;\n case 'T': // Smooth Quadratic Bezier Curve (absolute)\n lastX = data[1];\n lastY = data[2];\n\n path.quadraticCurveToShort(\n lastX, lastY // End point\n );\n break;\n case 't': // Smooth Quadratic Bezier Curve (relative)\n lastX += data[1];\n lastY += data[2];\n\n path.quadraticCurveToShort(\n lastX, lastY // End point\n );\n break;\n case 'A': // Arc (absolute)\n lastX = data[6];\n lastY = data[7];\n\n path.arcToSvg(\n data[1], // rx\n data[2], // ry\n data[3], // x-axis-rotation\n data[4], // large-arc-flag\n data[5], // sweep-flag\n lastX, lastY // End point\n );\n break;\n case 'a': // Arc (relative)\n lastX += data[6];\n lastY += data[7];\n\n path.arcToSvg(\n data[1], // rx\n data[2], // ry\n data[3], // x-axis-rotation\n data[4], // large-arc-flag\n data[5], // sweep-flag\n lastX, lastY // End point\n );\n break;\n case 'Z': // Close Path\n case 'z':\n path.closePath();\n if (subpaths.length > 0)\n {\n // Return to the start of the current subpath\n currentSubPath = subpaths.pop();\n if (currentSubPath)\n {\n lastX = currentSubPath.startX;\n lastY = currentSubPath.startY;\n }\n else\n {\n lastX = 0;\n lastY = 0;\n }\n }\n currentSubPath = null;\n break;\n default:\n // #if _DEBUG\n warn(`Unknown SVG path command: ${type}`);\n // #endif\n }\n\n // Track subpath starts for path closure\n if (type !== 'Z' && type !== 'z')\n {\n if (currentSubPath === null)\n {\n currentSubPath = { startX: lastX, startY: lastY };\n subpaths.push(currentSubPath);\n }\n }\n }\n\n return path;\n}\n","/**\n * A vertex in a circular doubly linked list representing a polygon ring.\n * `prev`/`next` are always linked (set immediately after {@link createNode}), so they're typed\n * non-null; `prevZ`/`nextZ` are the z-order list links and are null at the ends.\n *\n * @typedef {object} Node\n * @property {number} i vertex index in the coordinates array\n * @property {number} x vertex x coordinate\n * @property {number} y vertex y coordinate\n * @property {Node} prev previous vertex node in the polygon ring\n * @property {Node} next next vertex node in the polygon ring\n * @property {number} z z-order curve value; doubles as the owning block index during eliminateHoles\n * @property {Node | null} prevZ previous node in z-order\n * @property {Node | null} nextZ next node in z-order\n */\n\n// single-vertex holes to preserve through filterPoints (steiner points); kept off the Node\n// shape since they're rare — the empty-set fast path means non-steiner inputs pay nothing\n/** @type {Set<Node>} */\nconst steiners = new Set();\n\n// set by filterPoints whenever it removes at least one node; read by earcutLinked's stall\n// handler to decide whether another clip pass is worth attempting before the costlier stages\nlet filteredOut = false;\n\n/**\n * Triangulate a polygon given as a flat array of vertex coordinates.\n *\n * @param {ArrayLike<number>} data flat array of vertex coordinates\n * @param {ArrayLike<number> | null} [holeIndices] indices (in vertices, not coordinates) where each hole ring starts\n * @param {number} [dim=2] number of coordinates per vertex in `data`\n * @returns {number[]} triangles as triplets of vertex indices into `data`\n * @example earcut([10,0, 0,50, 60,60, 70,10]); // [1,0,3, 3,2,1]\n */\nexport default function earcut(data, holeIndices, dim = 2) {\n\n const hasHoles = holeIndices && holeIndices.length;\n const outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n if (steiners.size) steiners.clear();\n\n let outerNode = linkedList(data, 0, outerLen, dim, true);\n /** @type {number[]} */\n const triangles = [];\n\n if (!outerNode || outerNode.next === outerNode.prev) return triangles;\n\n let minX = 0, minY = 0, invSize = 0;\n\n if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);\n\n // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n if (data.length > 80 * dim) {\n minX = data[0];\n minY = data[1];\n let maxX = minX;\n let maxY = minY;\n\n for (let i = dim; i < outerLen; i += dim) {\n const x = data[i];\n const y = data[i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n }\n\n // minX, minY and invSize are later used to transform coords into integers for z-order calculation\n invSize = Math.max(maxX - minX, maxY - minY);\n invSize = invSize !== 0 ? 32767 / invSize : 0;\n }\n\n earcutLinked(outerNode, triangles, minX, minY, invSize);\n\n return triangles;\n}\n\n// create a circular doubly linked list from polygon points in the specified winding order\n/** @param {ArrayLike<number>} data @param {number} start @param {number} end @param {number} dim @param {boolean} clockwise @returns {Node | null} */\nfunction linkedList(data, start, end, dim, clockwise) {\n /** @type {Node | null} */\n let last = null;\n\n if (clockwise === (signedArea(data, start, end, dim) > 0)) {\n for (let i = start; i < end; i += dim) last = insertNode(i / dim | 0, data[i], data[i + 1], last);\n } else {\n for (let i = end - dim; i >= start; i -= dim) last = insertNode(i / dim | 0, data[i], data[i + 1], last);\n }\n\n if (last && equals(last, last.next)) {\n removeNode(last);\n last = last.next;\n }\n\n return last;\n}\n\n// Remove collinear or coincident points; removability depends only on a node's immediate\n// neighbors, so we sweep forward and re-check the predecessor after each removal. With no `end`\n// we sweep the whole ring, lapping until nothing is removable (the fixpoint the clipper needs).\n// With an explicit `end` we heal only the dirty window around a bridge/diagonal cut, stopping at\n// `end` rather than lapping — O(window) instead of O(ring).\n/** @param {Node} start @param {Node} [end] @returns {Node} */\nfunction filterPoints(start, end = start) {\n const full = end === start;\n\n let p = start, again;\n do {\n again = false;\n if (p !== p.next && (steiners.size === 0 || !steiners.has(p)) &&\n (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\n if (full || p === end) end = p.prev; // pull the stop bound back past the removal\n filteredOut = true;\n removeNode(p);\n p = p.prev; // re-check the predecessor\n again = true;\n } else if (full || p !== end) {\n p = p.next;\n again = !full; // local heal: keep looping until the sweep reaches end\n }\n } while (again || p !== end);\n\n return end;\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\n/** @param {Node} ear @param {number[]} triangles @param {number} minX @param {number} minY @param {number} invSize */\nfunction earcutLinked(ear, triangles, minX, minY, invSize) {\n // interlink polygon nodes in z-order\n if (invSize) indexCurve(ear, minX, minY, invSize);\n\n let stop = ear, cured = false;\n\n // iterate through ears, slicing them one by one\n while (ear.prev !== ear.next) {\n const prev = ear.prev;\n /** @type {Node} */\n const next = ear.next;\n\n if (area(prev, ear, next) < 0 && (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear))) {\n triangles.push(prev.i, ear.i, next.i); // cut off the triangle\n\n removeNode(ear);\n ear = next;\n stop = next;\n continue;\n }\n\n ear = next;\n\n // if we looped through the whole remaining polygon and can't find any more ears\n if (ear === stop) {\n // try filtering collinear/coincident points and slicing again — repeat as long as\n // filtering actually removes nodes, since each removal can expose new ears\n filteredOut = false;\n ear = filterPoints(ear);\n if (filteredOut) { stop = ear; continue; }\n\n // filtering is exhausted: cure small local self-intersections once, then retry\n if (!cured) {\n ear = cureLocalIntersections(ear, triangles);\n stop = ear;\n cured = true;\n continue;\n }\n\n // as a last resort, try splitting the remaining polygon into two\n splitEarcut(ear, triangles, minX, minY, invSize);\n break;\n }\n }\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\n/** @param {Node} ear @returns {boolean} */\nfunction isEar(ear) {\n // reflex check (area(a, b, c) >= 0) is hoisted into the earcutLinked caller to avoid non-inlined call here\n const a = ear.prev, b = ear, c = ear.next,\n ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y,\n x0 = Math.min(ax, bx, cx), // triangle bbox\n y0 = Math.min(ay, by, cy),\n x1 = Math.max(ax, bx, cx),\n y1 = Math.max(ay, by, cy);\n\n // make sure we don't have other points inside the potential ear\n let p = c.next;\n while (p !== a) {\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && !(ax === p.x && ay === p.y) &&\n pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;\n p = p.next;\n }\n return true;\n}\n\n/** @param {Node} ear @param {number} minX @param {number} minY @param {number} invSize @returns {boolean} */\nfunction isEarHashed(ear, minX, minY, invSize) {\n // reflex check is hoisted into the earcutLinked caller (see isEar)\n const a = ear.prev, b = ear, c = ear.next,\n ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y,\n x0 = Math.min(ax, bx, cx), // triangle bbox\n y0 = Math.min(ay, by, cy),\n x1 = Math.max(ax, bx, cx),\n y1 = Math.max(ay, by, cy),\n minZ = zOrder(x0, y0, minX, minY, invSize), // z-order range for the current triangle bbox;\n maxZ = zOrder(x1, y1, minX, minY, invSize);\n\n let p = ear.prevZ;\n while (p && p.z >= minZ) { // look for points inside the triangle in decreasing z-order\n if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== c && !(ax === p.x && ay === p.y) &&\n pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n }\n let n = ear.nextZ;\n while (n && n.z <= maxZ) { // look for points in increasing z-order\n if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== c && !(ax === n.x && ay === n.y) &&\n pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n return true;\n}\n\n// go through all polygon nodes and cure small local self-intersections\n/** @param {Node} start @param {number[]} triangles @returns {Node} */\nfunction cureLocalIntersections(start, triangles) {\n let p = start;\n let cured = false;\n do {\n const a = p.prev,\n b = p.next.next;\n\n if (intersects(a, p, p.next, b, false) && locallyInside(a, b) && locallyInside(b, a)) {\n\n triangles.push(a.i, p.i, b.i);\n\n // remove two nodes involved\n removeNode(p);\n removeNode(p.next);\n\n p = start = b;\n cured = true;\n }\n p = p.next;\n } while (p !== start);\n\n return cured ? filterPoints(p) : p;\n}\n\n// try splitting polygon into two and triangulate them independently\n/** @param {Node} start @param {number[]} triangles @param {number} minX @param {number} minY @param {number} invSize */\nfunction splitEarcut(start, triangles, minX, minY, invSize) {\n // look for a valid diagonal that divides the polygon into two\n let a = start;\n do {\n let b = a.next.next;\n while (b !== a.prev) {\n if (a.i !== b.i && isValidDiagonal(a, b)) {\n // split the polygon in two by the diagonal\n let c = splitPolygon(a, b);\n\n // filter colinear points around the cuts\n a = filterPoints(a, a.next);\n c = filterPoints(c, c.next);\n\n // run earcut on each half\n earcutLinked(a, triangles, minX, minY, invSize);\n earcutLinked(c, triangles, minX, minY, invSize);\n return;\n }\n b = b.next;\n }\n a = a.next;\n } while (a !== start);\n}\n\n// true only while eliminateHoles merges holes, so removeNode keeps the block index live (growBlock)\nlet indexActive = false;\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\n/** @param {ArrayLike<number>} data @param {ArrayLike<number>} holeIndices @param {Node} outerNode @param {number} dim @returns {Node} */\nfunction eliminateHoles(data, holeIndices, outerNode, dim) {\n const queue = [];\n\n for (let i = 0, len = holeIndices.length; i < len; i++) {\n const start = holeIndices[i] * dim;\n const end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n const list = /** @type {Node} */ (linkedList(data, start, end, dim, false));\n if (list === list.next) steiners.add(list);\n queue.push(getLeftmost(list));\n }\n\n queue.sort(compareXYSlope);\n\n // block-bbox index for findHoleBridge, grown append-only as holes merge (see notes\n // above buildBlockIndex). Seed it with the outer ring, then append each merged hole.\n buildBlockIndex(data.length / dim, holeIndices.length);\n indexSegment(outerNode, outerNode);\n\n // process holes from left to right; indexActive lets removeNode keep block bboxes live as\n // filterPoints heals edges during merges (see growBlock)\n indexActive = true;\n for (let i = 0; i < queue.length; i++) {\n outerNode = eliminateHole(queue[i], outerNode);\n }\n indexActive = false;\n\n // collapse collinear/coincident points across the whole merged ring once before clipping\n return filterPoints(outerNode);\n}\n\n/** @param {Node} a @param {Node} b @returns {number} */\nfunction compareXYSlope(a, b) {\n // when the left-most point of 2 holes meet at a vertex, sort the holes counterclockwise so that when we find\n // the bridge to the outer shell is always the point that they meet at.\n return a.x - b.x || a.y - b.y ||\n (a.next.y - a.y) / (a.next.x - a.x) -\n (b.next.y - b.y) / (b.next.x - b.x);\n}\n\n// find a bridge between vertices that connects hole with an outer ring and link it\n/** @param {Node} hole @param {Node} outerNode @returns {Node} */\nfunction eliminateHole(hole, outerNode) {\n const bridge = findHoleBridge(hole, outerNode);\n if (!bridge) {\n return outerNode;\n }\n\n const bridgeReverse = splitPolygon(bridge, hole);\n\n // index the merged-in segment before filtering: in ring order the splice runs\n // bridge -> hole -> bridgeReverse -> bridge2 -> (bridge's old next), covering the\n // hole's edges and both new slit edges. filterPoints below only drops collinear /\n // coincident points, so these bboxes stay valid (conservative) supersets.\n const bridge2 = bridgeReverse.next;\n indexSegment(bridge, bridge2.next);\n\n // heal collinear/coincident points around the two new slit edges\n filterPoints(bridgeReverse, bridgeReverse.next);\n return filterPoints(bridge, bridge.next);\n}\n\n// Block-bbox index for findHoleBridge (issue #183): one [minX,minY,maxX,maxY] bbox per K\n// consecutive ring edges, in a flat Float64Array, so the leftward-ray scan can skip whole\n// blocks in O(1) instead of walking the entire merged ring. Grown append-only — the outer\n// ring seeds it, then each merged hole appends a segment (head node, stop node, K-blocks\n// over head..stop); independent segments, not a ring tiling, since splices land mid-ring.\n// Buffers are sized once from the input upper bound and reused across calls.\n//\n// filterPoints only drops collinear/coincident points, so a stale bbox stays a conservative\n// superset of its live edges (never a false skip); the scan skips dead nodes (p.prev.next !==\n// p) and lazily advances a dead stop. Blocks are scanned in append (not ring) order, so the\n// chosen bridge can differ from the un-indexed code — a different but equally valid result.\nconst K = 16; // edges per block\n\nlet blockBBox = new Float64Array(0); // [minX,minY,maxX,maxY] per block\nlet numBlocks = 0;\n/** @type {Node[]} */\nconst blockHead = []; // first node of each block's segment\n/** @type {Node[]} */\nconst blockStop = []; // node just past each block's segment (exclusive walk bound)\n\n/** @param {number} maxNodes @param {number} numHoles */\nfunction buildBlockIndex(maxNodes, numHoles) {\n // upper bound: every input node indexed once, +2 bridge nodes per hole, plus a partial\n // trailing block per appended segment (outer ring + one per hole)\n const maxBlocks = Math.ceil((maxNodes + 2 * numHoles) / K) + numHoles + 2;\n if (blockBBox.length < maxBlocks * 4) blockBBox = new Float64Array(maxBlocks * 4);\n numBlocks = 0;\n}\n\n// index the ring run head..stop (exclusive) as ceil(len / K) blocks; head === stop means\n// the whole ring. each block's bbox covers both endpoints of every edge it owns.\n/** @param {Node} head @param {Node} stop */\nfunction indexSegment(head, stop) {\n let p = head;\n do {\n const b = numBlocks++;\n blockHead[b] = p;\n let minX = p.x, minY = p.y, maxX = p.x, maxY = p.y;\n let k = 0;\n do {\n const c = p.next; // edge p->c; bbox must bound both endpoints\n p.z = b; // reuse z as the owning block during eliminateHoles (see growBlock)\n if (c.x < minX) minX = c.x; if (c.x > maxX) maxX = c.x;\n if (c.y < minY) minY = c.y; if (c.y > maxY) maxY = c.y;\n p = c;\n } while (++k < K && p !== stop);\n blockStop[b] = p;\n const g = b * 4;\n blockBBox[g] = minX; blockBBox[g + 1] = minY; blockBBox[g + 2] = maxX; blockBBox[g + 3] = maxY;\n } while (p !== stop);\n}\n\n// when filterPoints heals an edge head->tail (removing the collinear node between them), the\n// healed edge can extend past head's frozen block bbox if its old far endpoint lived in another\n// block; grow head's block bbox to cover tail so the leftward-ray prune can't false-skip it.\n/** @param {Node} head @param {Node} tail */\nfunction growBlock(head, tail) {\n const g = head.z * 4;\n if (tail.x < blockBBox[g]) blockBBox[g] = tail.x;\n if (tail.y < blockBBox[g + 1]) blockBBox[g + 1] = tail.y;\n if (tail.x > blockBBox[g + 2]) blockBBox[g + 2] = tail.x;\n if (tail.y > blockBBox[g + 3]) blockBBox[g + 3] = tail.y;\n}\n\n/** @param {number} b @returns {Node} */\nfunction liveBlockStop(b) {\n let stop = blockStop[b];\n while (stop.prev.next !== stop) stop = stop.next;\n blockStop[b] = stop;\n return stop;\n}\n\n// the block's head node can be removed by filterPoints during merges; advance it to the next\n// live node so the walk doesn't start on (and immediately terminate at) a dead node. For the\n// single full-ring seed block (head === stop) the same forward advance keeps them equal, so the\n// do-while still laps the whole ring instead of collapsing to an empty walk.\n/** @param {number} b @returns {Node} */\nfunction liveBlockHead(b) {\n let head = blockHead[b];\n while (head.prev.next !== head) head = head.next;\n blockHead[b] = head;\n return head;\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\n/** @param {Node} hole @param {Node} outerNode @returns {Node | null} */\nfunction findHoleBridge(hole, outerNode) {\n let p = outerNode;\n const hx = hole.x;\n const hy = hole.y;\n let qx = -Infinity;\n /** @type {Node | undefined} */\n let m;\n\n // find a segment intersected by a ray from the hole's leftmost point to the left;\n // segment's endpoint with lesser x will be potential connection point\n // unless they intersect at a vertex, then choose the vertex\n if (equals(hole, p)) return p;\n\n // scan blocks; skip any whose bbox can't hold a crossing that beats qx and lies left\n // of hx (the prune Morton order can't express — explicit per-axis [minY,maxY]/[minX,maxX])\n for (let b = 0, g = 0; b < numBlocks; b++, g += 4) {\n if (hy < blockBBox[g + 1] || hy > blockBBox[g + 3] || blockBBox[g] > hx || blockBBox[g + 2] <= qx) continue;\n\n // ensure the walk's exclusive bound is live so we don't overrun into other blocks\n const stop = liveBlockStop(b);\n\n p = liveBlockHead(b);\n do {\n if (p.prev.next === p) { // skip nodes removed by filterPoints (stale in the index)\n if (equals(hole, p.next)) return p.next;\n else if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\n const x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n if (x <= hx && x > qx) {\n qx = x;\n m = p.x < p.next.x ? p : p.next;\n if (x === hx) return m; // hole touches outer segment; pick leftmost endpoint\n }\n }\n }\n p = p.next;\n } while (p !== stop);\n }\n\n if (!m) return null;\n\n // look for points inside the triangle of hole point, segment intersection and endpoint;\n // if there are no points found, we have a valid connection;\n // otherwise choose the point of the minimum angle with the ray as connection point\n\n const mx = m.x;\n const my = m.y;\n const tminY = Math.min(hy, my); // the triangle's y span; x span is [mx, hx]\n const tmaxY = Math.max(hy, my);\n let tanMin = Infinity;\n\n // scan the same blocks; skip any whose bbox can't overlap the triangle's [mx,hx]×[tminY,tmaxY] box\n for (let b = 0, g = 0; b < numBlocks; b++, g += 4) {\n if (blockBBox[g + 2] < mx || blockBBox[g] > hx || blockBBox[g + 3] < tminY || blockBBox[g + 1] > tmaxY) continue;\n\n const stop = liveBlockStop(b);\n\n p = liveBlockHead(b);\n do {\n if (p.prev.next === p && hx >= p.x && p.x >= mx && hx !== p.x && // skip dead nodes\n pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n\n const tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n\n // if hole point sits on p's horizontal edge (T-junction touch): the bridge runs\n // along that edge — locallyInside rejects it as collinear, but it's valid\n if ((locallyInside(p, hole) || (p.y === hy && p.next.y === hy && p.next.x > hx)) &&\n (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) {\n m = p;\n tanMin = tan;\n }\n }\n\n p = p.next;\n } while (p !== stop);\n }\n\n return m;\n}\n\n// whether sector in vertex m contains sector in vertex p in the same coordinates\n/** @param {Node} m @param {Node} p @returns {boolean} */\nfunction sectorContainsSector(m, p) {\n return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;\n}\n\n// scratch buffers reused across calls and grown on demand: two node-ref arrays that\n// ping-pong during the radix passes, plus parallel z-value arrays so the passes read\n// z from contiguous memory instead of dereferencing each node. 256-entry histogram for\n// 8-bit digits; the small histogram keeps per-call setup cheap (most rings are short)\n/** @type {Node[]} */\nconst sortArr = [];\n/** @type {Node[]} */\nlet sortBuf = [];\nlet zArr = new Uint32Array(0);\nlet zBuf = new Uint32Array(0);\nconst counts = new Uint32Array(256);\n\n// interlink polygon nodes in z-order: collect into an array, sort by z, relink\n/** @param {Node} start @param {number} minX @param {number} minY @param {number} invSize */\nfunction indexCurve(start, minX, minY, invSize) {\n let p = start;\n let n = 0;\n do {\n // always (re)compute: z may still hold a block index left over from eliminateHoles\n p.z = zOrder(p.x, p.y, minX, minY, invSize);\n sortArr[n++] = p;\n p = p.next;\n } while (p !== start);\n\n sortNodes(n);\n\n /** @type {Node | null} */\n let prev = null;\n for (let i = 0; i < n; i++) {\n const node = sortArr[i];\n node.prevZ = prev;\n if (prev) prev.nextZ = node;\n prev = node;\n }\n /** @type {Node} */ (prev).nextZ = null;\n\n // drop the node refs but keep the capacity: setting length to 0 leaves sortBuf unresized\n // (its growth is gated on zArr), so the radix scatter regrows it out of order every call\n sortArr.fill(/** @type {Node} */ (/** @type {unknown} */ (null)), 0, n);\n sortBuf.fill(/** @type {Node} */ (/** @type {unknown} */ (null)), 0, n);\n}\n\n// sort the first n nodes of sortArr by z, in place: insertion sort for small n (cheaper\n// than histogram setup), else LSD radix in four 8-bit passes (covering z's 30 bits)\n/** @param {number} n */\nfunction sortNodes(n) {\n if (n <= 32) {\n for (let i = 1; i < n; i++) {\n const node = sortArr[i], z = node.z;\n let j = i - 1;\n while (j >= 0 && sortArr[j].z > z) { sortArr[j + 1] = sortArr[j]; j--; }\n sortArr[j + 1] = node;\n }\n return;\n }\n\n if (zArr.length < n) {\n zArr = new Uint32Array(n);\n zBuf = new Uint32Array(n);\n sortBuf = new Array(n);\n }\n for (let i = 0; i < n; i++) zArr[i] = sortArr[i].z;\n\n // even pass count lands the sorted result back in sortArr\n radixPass(n, sortArr, zArr, sortBuf, zBuf, 0);\n radixPass(n, sortBuf, zBuf, sortArr, zArr, 8);\n radixPass(n, sortArr, zArr, sortBuf, zBuf, 16);\n radixPass(n, sortBuf, zBuf, sortArr, zArr, 24);\n}\n\n// one LSD radix pass: stably scatter the first n nodes (and their z) from src to dst,\n// bucketed by the 8-bit digit of z at the given bit shift\n/** @param {number} n @param {Node[]} src @param {Uint32Array} srcZ @param {Node[]} dst @param {Uint32Array} dstZ @param {number} shift */\nfunction radixPass(n, src, srcZ, dst, dstZ, shift) {\n counts.fill(0);\n for (let i = 0; i < n; i++) counts[(srcZ[i] >>> shift) & 0xff]++;\n // turn per-bucket counts into start offsets (prefix sum)\n let sum = 0;\n for (let b = 0; b < 256; b++) { const c = counts[b]; counts[b] = sum; sum += c; }\n for (let i = 0; i < n; i++) {\n const z = srcZ[i];\n const pos = counts[(z >>> shift) & 0xff]++;\n dst[pos] = src[i];\n dstZ[pos] = z;\n }\n}\n\n// z-order of a point given coords and inverse of the longer side of data bbox\n/** @param {number} x @param {number} y @param {number} minX @param {number} minY @param {number} invSize @returns {number} */\nfunction zOrder(x, y, minX, minY, invSize) {\n // coords are transformed into non-negative 15-bit integer range\n x = (x - minX) * invSize | 0;\n y = (y - minY) * invSize | 0;\n\n x = (x | (x << 8)) & 0x00FF00FF;\n x = (x | (x << 4)) & 0x0F0F0F0F;\n x = (x | (x << 2)) & 0x33333333;\n x = (x | (x << 1)) & 0x55555555;\n\n y = (y | (y << 8)) & 0x00FF00FF;\n y = (y | (y << 4)) & 0x0F0F0F0F;\n y = (y | (y << 2)) & 0x33333333;\n y = (y | (y << 1)) & 0x55555555;\n\n return x | (y << 1);\n}\n\n// find the leftmost node of a polygon ring\n/** @param {Node} start @returns {Node} */\nfunction getLeftmost(start) {\n let p = start,\n leftmost = start;\n do {\n if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) leftmost = p;\n p = p.next;\n } while (p !== start);\n\n return leftmost;\n}\n\n// check if a point lies within a convex triangle\n/** @param {number} ax @param {number} ay @param {number} bx @param {number} by @param {number} cx @param {number} cy @param {number} px @param {number} py @returns {boolean} */\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) >= (ax - px) * (cy - py) &&\n (ax - px) * (by - py) >= (bx - px) * (ay - py) &&\n (bx - px) * (cy - py) >= (cx - px) * (by - py);\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\n/** @param {Node} a @param {Node} b @returns {boolean} true when the diagonal is valid */\nfunction isValidDiagonal(a, b) {\n const zeroLength = equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0; // degenerate case\n return a.next.i !== b.i && (zeroLength || locallyInside(a, b) && locallyInside(b, a) && // // locally visible\n (area(a.prev, a, b.prev) !== 0 || area(a, b.prev, b) !== 0)) && // no opposite-facing sectors\n !intersectsPolygon(a, b) && (zeroLength || middleInside(a, b)); // doesn't intersect other edges, diagonal inside polygon\n}\n\n// signed area of a triangle\n/** @param {Node} p @param {Node} q @param {Node} r @returns {number} */\nfunction area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}\n\n// check if two points are equal\n/** @param {Node} p1 @param {Node} p2 @returns {boolean} */\nfunction equals(p1, p2) {\n return p1.x === p2.x && p1.y === p2.y;\n}\n\n// check if two segments intersect; by default includes collinear boundary touches\n/** @param {Node} p1 @param {Node} q1 @param {Node} p2 @param {Node} q2 @param {boolean} [includeBoundary] @returns {boolean} */\nfunction intersects(p1, q1, p2, q2, includeBoundary = true) {\n const o1 = area(p1, q1, p2);\n const o2 = area(p1, q1, q2);\n const o3 = area(p2, q2, p1);\n const o4 = area(p2, q2, q1);\n\n if (((o1 > 0 && o2 < 0) || (o1 < 0 && o2 > 0)) && ((o3 > 0 && o4 < 0) || (o3 < 0 && o4 > 0))) return true;\n\n if (!includeBoundary) return false;\n\n if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1\n if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1\n if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2\n if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2\n\n return false;\n}\n\n// for collinear points p, q, r, check if point q lies on segment pr\n/** @param {Node} p @param {Node} q @param {Node} r @returns {boolean} */\nfunction onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}\n\n// check if a polygon diagonal intersects any polygon segments\n/** @param {Node} a @param {Node} b @returns {boolean} */\nfunction intersectsPolygon(a, b) {\n // diagonal bbox; an edge whose bbox can't overlap it can't intersect it, so\n // skip the orientation test for those (the common case — the diagonal is short)\n const minX = Math.min(a.x, b.x);\n const maxX = Math.max(a.x, b.x);\n const minY = Math.min(a.y, b.y);\n const maxY = Math.max(a.y, b.y);\n\n let p = a;\n do {\n const n = p.next;\n if ((p.x > maxX && n.x > maxX) || (p.x < minX && n.x < minX) ||\n (p.y > maxY && n.y > maxY) || (p.y < minY && n.y < minY)) {\n p = n;\n continue;\n }\n if (p.i !== a.i && n.i !== a.i && p.i !== b.i && n.i !== b.i &&\n intersects(p, n, a, b)) return true;\n p = n;\n } while (p !== a);\n\n return false;\n}\n\n// check if a polygon diagonal is locally inside the polygon\n/** @param {Node} a @param {Node} b @returns {boolean} */\nfunction locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\n/** @param {Node} a @param {Node} b @returns {boolean} */\nfunction middleInside(a, b) {\n let p = a;\n let inside = false;\n const px = (a.x + b.x) / 2;\n const py = (a.y + b.y) / 2;\n do {\n const n = p.next;\n if (((p.y > py) !== (n.y > py)) && (px < (n.x - p.x) * (py - p.y) / (n.y - p.y) + p.x))\n inside = !inside;\n p = n;\n } while (p !== a);\n\n return inside;\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\n/** @param {Node} a @param {Node} b @returns {Node} */\nfunction splitPolygon(a, b) {\n const a2 = createNode(a.i, a.x, a.y),\n b2 = createNode(b.i, b.x, b.y),\n an = a.next,\n bp = b.prev;\n\n a.next = b;\n b.prev = a;\n\n a2.next = an;\n an.prev = a2;\n\n b2.next = a2;\n a2.prev = b2;\n\n bp.next = b2;\n b2.prev = bp;\n\n return b2;\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\n/** @param {number} i @param {number} x @param {number} y @param {Node | null} last @returns {Node} */\nfunction insertNode(i, x, y, last) {\n const p = createNode(i, x, y);\n\n if (!last) {\n p.prev = p;\n p.next = p;\n\n } else {\n p.next = last.next;\n p.prev = last;\n last.next.prev = p;\n last.next = p;\n }\n return p;\n}\n\n/** @param {Node} p */\nfunction removeNode(p) {\n p.next.prev = p.prev;\n p.prev.next = p.next;\n\n if (p.prevZ) p.prevZ.nextZ = p.nextZ;\n if (p.nextZ) p.nextZ.prevZ = p.prevZ;\n\n // keep the hole-bridge index's block bboxes covering the healed prev->next edge\n if (indexActive) growBlock(p.prev, p.next);\n}\n\n/** @param {number} i @param {number} x @param {number} y @returns {Node} */\nfunction createNode(i, x, y) {\n // prev/next are assigned by the caller before any read, so the null init is cast away here\n return /** @type {Node} */ (/** @type {unknown} */ ({\n i, // vertex index in coordinates array\n x, y, // vertex coordinates\n prev: null, // previous and next vertex nodes in a polygon ring\n next: null,\n z: 0, // z-order curve value; doubles as owning block in the hole-bridge index during eliminateHoles\n prevZ: null, // previous and next nodes in z-order\n nextZ: null\n }));\n}\n\n/**\n * Return the relative difference between the polygon area and the area of its triangulation —\n * a value near 0 means a correct triangulation. Useful for verifying output in tests.\n *\n * @param {ArrayLike<number>} data\n * @param {ArrayLike<number> | null} holeIndices\n * @param {number} dim number of coordinates per vertex in `data`\n * @param {ArrayLike<number>} triangles output of {@link earcut}\n * @returns {number}\n * @example deviation(data, holes, dim, earcut(data, holes, dim)); // ~0 if correct\n */\nexport function deviation(data, holeIndices, dim, triangles) {\n const hasHoles = holeIndices && holeIndices.length;\n const outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n\n let polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));\n if (hasHoles) {\n for (let i = 0, len = holeIndices.length; i < len; i++) {\n const start = holeIndices[i] * dim;\n const end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n polygonArea -= Math.abs(signedArea(data, start, end, dim));\n }\n }\n\n let trianglesArea = 0;\n for (let i = 0; i < triangles.length; i += 3) {\n const a = triangles[i] * dim;\n const b = triangles[i + 1] * dim;\n const c = triangles[i + 2] * dim;\n trianglesArea += Math.abs(\n (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -\n (data[a] - data[b]) * (data[c + 1] - data[a + 1]));\n }\n\n // with no triangles, a polygon area within shoelace roundoff of zero (which scales with the\n // squared coordinate magnitude) means the input was degenerate rather than mistriangulated\n if (trianglesArea === 0) {\n let max = 0;\n for (let i = 0; i < data.length; i += dim) max = Math.max(max, Math.abs(data[i]), Math.abs(data[i + 1]));\n return Math.abs(polygonArea) <= data.length * max * max * Number.EPSILON ? 0 : 1;\n }\n return Math.abs((trianglesArea - polygonArea) / polygonArea);\n}\n\n/** @param {ArrayLike<number>} data @param {number} start @param {number} end @param {number} dim @returns {number} */\nfunction signedArea(data, start, end, dim) {\n let sum = 0;\n for (let i = start, j = end - dim; i < end; i += dim) {\n sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\n j = i;\n }\n return sum;\n}\n\n/**\n * Turn a polygon in multi-dimensional array form (e.g. as in GeoJSON) into the flat form Earcut accepts.\n *\n * @param {ReadonlyArray<ReadonlyArray<ArrayLike<number>>>} data array of rings; the first ring is the outer contour, the rest are holes\n * @returns {{vertices: number[], holes: number[], dimensions: number}}\n * @example const {vertices, holes, dimensions} = flatten(geojson.coordinates);\n */\nexport function flatten(data) {\n const vertices = [];\n const holes = [];\n const dimensions = data[0][0].length;\n let holeIndex = 0;\n let prevLen = 0;\n\n for (const ring of data) {\n for (const p of ring) {\n for (let d = 0; d < dimensions; d++) vertices.push(p[d]);\n }\n if (prevLen) {\n holeIndex += prevLen;\n holes.push(holeIndex);\n }\n prevLen = ring.length;\n }\n return {vertices, holes, dimensions};\n}\n\n// Reusable module-level scratch for refine():\n// he = twin half-edge of each edge, or -1 on the polygon boundary\n// hTable = open-addressing hash, slot -> half-edge index, valid iff hStamp[slot] === gen\n// edgeStamp = pending-in-stack flag, cleared when the edge is popped\n/** @type {Int32Array} */ let edgeStack;\n/** @type {Int32Array} */ let he;\n/** @type {Int32Array} */ let hTable;\n/** @type {Uint32Array} */ let hStamp;\n/** @type {Uint8Array} */ let edgeStamp;\nlet hMask = 0, gen = 0;\n\n/**\n * Refine a triangulation toward the constrained Delaunay triangulation by legalizing every\n * interior edge in place with Lawson flips — maximizing the minimum angle and removing most\n * slivers. An optional post-pass for {@link earcut} output, or any manifold triangle-index array\n * indexing into `coords`. Adapted from delaunator's edge legalization.\n *\n * Uses non-robust predicates: float input is fine, and the worst case is a not-quite-Delaunay\n * edge, never an invalid mesh.\n *\n * @param {number[]} triangles triangle indices, as returned by {@link earcut}; mutated in place\n * @param {ArrayLike<number>} coords the flat vertex coordinates passed to {@link earcut}\n * @param {number} [dim=2] number of coordinates per vertex in `coords`\n * @example refine(earcut(data), data);\n */\nexport function refine(triangles, coords, dim = 2) {\n const t = triangles;\n const n = t.length;\n if (n < 6) return;\n ensureScratch(n);\n gen++; // bumping the generation logically empties the hash (no clearing)\n he.fill(-1, 0, n);\n\n // Build half-edge twins with an undirected-edge hash; consumed slots mark linked pairs. As each\n // pair is linked we seed the stack with one representative (s, the earlier-inserted edge) — this\n // fuses the initial \"push every interior edge\" pass into the build, saving a full O(n) scan.\n // edgeStamp is all-zero here (balanced push/pop leaves it clean) and each pair links once, so\n // the seed write needs no dedup guard.\n let i = 0;\n for (let e = 0; e < n; e++) {\n const a = t[e], b = t[nextHE(e)];\n const lo = a < b ? a : b, hi = a < b ? b : a;\n let h = (Math.imul(lo, 0x9e3779b1) ^ Math.imul(hi, 0x85ebca6b)) & hMask;\n while (hStamp[h] === gen) {\n const s = hTable[h];\n // s === -1 marks a consumed slot (a pair already linked) — skip past it\n if (s !== -1) {\n const sa = t[s], sb = t[nextHE(s)];\n if ((sa === lo && sb === hi) || (sa === hi && sb === lo)) {\n he[e] = s; he[s] = e; hTable[h] = -1; // link, then consume the slot\n edgeStamp[s] = 1; edgeStack[i++] = s; // seed the interior edge for the cascade\n break;\n }\n }\n h = (h + 1) & hMask;\n }\n if (hStamp[h] !== gen) { hTable[h] = e; hStamp[h] = gen; } // first occurrence: insert\n }\n\n while (i > 0) {\n const a = edgeStack[--i];\n edgeStamp[a] = 0;\n const b = he[a];\n if (b === -1) continue;\n\n const a0 = a - a % 3;\n const b0 = b - b % 3;\n const ar = a0 + (a + 2) % 3;\n const al = a0 + (a + 1) % 3;\n const bl = b0 + (b + 2) % 3;\n const br = b0 + (b + 1) % 3;\n const p0 = t[ar], pr = t[a], pl = t[al], p1 = t[bl];\n\n const x0 = coords[p0 * dim], y0 = coords[p0 * dim + 1];\n const xr = coords[pr * dim], yr = coords[pr * dim + 1];\n const xl = coords[pl * dim], yl = coords[pl * dim + 1];\n const x1 = coords[p1 * dim], y1 = coords[p1 * dim + 1];\n\n // Test inCircle first: most interior edges are already Delaunay (inCircle true → no flip),\n // so this short-circuits before the two convexity orients on the common path. The quad must\n // also be convex (both new triangles CCW) — flipping a reflex quad would push a triangle\n // outside the polygon. Boundary/hole edges need no guard — they self-protect via he === -1.\n if (!inCircle(x0, y0, xr, yr, xl, yl, x1, y1) &&\n orient(x0, y0, xr, yr, x1, y1) > 0 && orient(x0, y0, x1, y1, xl, yl) > 0) {\n t[a] = p1; t[b] = p0;\n const hbl = he[bl], har = he[ar];\n he[a] = hbl; if (hbl !== -1) he[hbl] = a;\n he[b] = har; if (har !== -1) he[har] = b;\n he[ar] = bl; he[bl] = ar;\n\n // re-check the quad's four outer edges; skip boundary edges (he === -1) and any\n // already queued (edgeStamp), which also keeps the stack bounded by n.\n if (hbl !== -1 && edgeStamp[a] === 0) { edgeStamp[a] = 1; edgeStack[i++] = a; }\n if (har !== -1 && edgeStamp[b] === 0) { edgeStamp[b] = 1; edgeStack[i++] = b; }\n if (he[al] !== -1 && edgeStamp[al] === 0) { edgeStamp[al] = 1; edgeStack[i++] = al; }\n if (he[br] !== -1 && edgeStamp[br] === 0) { edgeStamp[br] = 1; edgeStack[i++] = br; }\n }\n }\n}\n\n/** @param {number} ax @param {number} ay @param {number} bx @param {number} by @param {number} cx @param {number} cy */\nfunction orient(ax, ay, bx, by, cx, cy) {\n return (bx - ax) * (cy - ay) - (by - ay) * (cx - ax);\n}\n\n// Whether p is inside or exactly on the circumcircle of triangle (a, b, c). Sign is negated vs the\n// usual predicate to match earcut's CCW winding — the standard sign would build the anti-Delaunay\n// mesh. Cocircular quads are legal ties, so refine only flips when this returns false.\n/** @param {number} ax @param {number} ay @param {number} bx @param {number} by @param {number} cx @param {number} cy @param {number} px @param {number} py */\nfunction inCircle(ax, ay, bx, by, cx, cy, px, py) {\n const dx = ax - px, dy = ay - py, ex = bx - px, ey = by - py, fx = cx - px, fy = cy - py;\n const ap = dx * dx + dy * dy, bp = ex * ex + ey * ey, cp = fx * fx + fy * fy;\n // A near-cocircular quad is a legal Delaunay tie, but roundoff can flag both an edge and its\n // flip as illegal, cascading into an endless flip loop (#205) — so treat a determinant within\n // a small margin of zero as a tie. The determinant's worst-case roundoff error is provably\n // below 9e-16·(ap + bp + cp)² (Shewchuk-style bound), so the margin guarantees every executed\n // flip is illegal in exact arithmetic, and Lawson flipping always terminates.\n const s = ap + bp + cp;\n return dx * (ey * cp - bp * fy) - dy * (ex * cp - bp * fx) + ap * (ex * fy - ey * fx) <= 1e-13 * s * s;\n}\n\n/** @param {number} e */\nfunction nextHE(e) { // next half-edge within the same triangle\n return e - e % 3 + (e + 1) % 3;\n}\n\n// Grow the scratch arrays on demand (like earcut's z-order arrays). Allocating lazily here rather\n// than at module load lets the whole refine() block tree-shake away for callers who don't use it.\n/** @param {number} n */\nfunction ensureScratch(n) {\n // edgeStack holds at most one entry per half-edge (edgeStamp dedups), so n is a safe cap —\n // sizing it up front lets the cascade push without a bounds/grow check.\n if (!edgeStack || edgeStack.length < n) edgeStack = new Int32Array(n);\n if (!he || he.length < n) he = new Int32Array(n);\n if (!edgeStamp || edgeStamp.length < n) edgeStamp = new Uint8Array(n);\n let size = 1;\n while (size < n * 4) size <<= 1; // power-of-two table, load factor <= 0.25\n if (!hTable || hTable.length < size) { hTable = new Int32Array(size); hStamp = new Uint32Array(size); }\n hMask = size - 1;\n}\n","import { ExtensionType } from '../../../../extensions/Extensions';\n\nimport type { Triangle } from '../../../../maths/shapes/Triangle';\nimport type { ShapeBuildCommand } from './ShapeBuildCommand';\n\n/**\n * Builds a triangle to draw\n *\n * Ignored from docs since it is not directly exposed.\n * @ignore\n * @private\n */\nexport const buildTriangle: ShapeBuildCommand<Triangle> = {\n extension: {\n type: ExtensionType.ShapeBuilder,\n name: 'triangle',\n },\n\n build(shape: Triangle, points: number[]): boolean\n {\n points[0] = shape.x;\n points[1] = shape.y;\n points[2] = shape.x2;\n points[3] = shape.y2;\n points[4] = shape.x3;\n points[5] = shape.y3;\n\n return true;\n },\n\n triangulate(\n points: number[],\n\n vertices: number[],\n verticesStride: number,\n verticesOffset: number,\n\n indices: number[],\n indicesOffset: number\n )\n {\n let count = 0;\n\n verticesOffset *= verticesStride;\n\n vertices[verticesOffset + count] = points[0];\n vertices[verticesOffset + count + 1] = points[1];\n\n count += verticesStride;\n\n vertices[verticesOffset + count] = points[2];\n vertices[verticesOffset + count + 1] = points[3];\n\n count += verticesStride;\n\n vertices[verticesOffset + count] = points[4];\n vertices[verticesOffset + count + 1] = points[5];\n\n const verticesIndex = verticesOffset / verticesStride;\n\n // triangle 1\n indices[indicesOffset++] = verticesIndex;\n indices[indicesOffset++] = verticesIndex + 1;\n indices[indicesOffset++] = verticesIndex + 2;\n },\n};\n","import { ExtensionType } from '../../../../extensions/Extensions';\n\nimport type { Rectangle } from '../../../../maths/shapes/Rectangle';\nimport type { ShapeBuildCommand } from './ShapeBuildCommand';\n\n/**\n * Builds a rectangle to draw\n *\n * Ignored from docs since it is not directly exposed.\n * @ignore\n * @private\n */\nexport const buildRectangle: ShapeBuildCommand<Rectangle> = {\n extension: {\n type: ExtensionType.ShapeBuilder,\n name: 'rectangle',\n },\n\n build(shape: Rectangle, points: number[]): boolean\n {\n const rectData = shape;\n const x = rectData.x;\n const y = rectData.y;\n const width = rectData.width;\n const height = rectData.height;\n\n if (!(width > 0 && height > 0))\n {\n return false;\n }\n\n points[0] = x;\n points[1] = y;\n points[2] = x + width;\n points[3] = y;\n points[4] = x + width;\n points[5] = y + height;\n points[6] = x;\n points[7] = y + height;\n\n return true;\n },\n\n triangulate(\n points: number[],\n\n vertices: number[],\n verticesStride: number,\n verticesOffset: number,\n\n indices: number[],\n indicesOffset: number\n )\n {\n let count = 0;\n\n verticesOffset *= verticesStride;\n\n vertices[verticesOffset + count] = points[0];\n vertices[verticesOffset + count + 1] = points[1];\n\n count += verticesStride;\n\n vertices[verticesOffset + count] = points[2];\n vertices[verticesOffset + count + 1] = points[3];\n\n count += verticesStride;\n\n vertices[verticesOffset + count] = points[6];\n vertices[verticesOffset + count + 1] = points[7];\n\n count += verticesStride;\n\n vertices[verticesOffset + count] = points[4];\n vertices[verticesOffset + count + 1] = points[5];\n\n count += verticesStride;\n\n const verticesIndex = verticesOffset / verticesStride;\n\n // triangle 1\n indices[indicesOffset++] = verticesIndex;\n indices[indicesOffset++] = verticesIndex + 1;\n indices[indicesOffset++] = verticesIndex + 2;\n\n // triangle 2\n indices[indicesOffset++] = verticesIndex + 1;\n indices[indicesOffset++] = verticesIndex + 3;\n indices[indicesOffset++] = verticesIndex + 2;\n },\n};\n","import { closePointEps } from '../const';\n\n/**\n * Builds a line to draw using the polygon method.\n * @param points\n * @param closed\n * @param vertices\n * @param indices\n * @internal\n */\nexport function buildPixelLine(\n points: number[],\n closed: boolean,\n vertices: number[],\n indices: number[],\n): void\n{\n const eps = closePointEps;\n\n if (points.length === 0)\n {\n return;\n }\n\n // get first and last point.. figure out the middle!\n\n const fx = points[0];\n const fy = points[1];\n\n const lx = points[points.length - 2];\n\n const ly = points[points.length - 1];\n\n const closePath = closed || (Math.abs(fx - lx) < eps && Math.abs(fy - ly) < eps);\n\n const verts = vertices;\n\n const length = points.length / 2;\n const indexStart = verts.length / 2;\n\n for (let i = 0; i < length; i++)\n {\n verts.push(points[(i * 2)]);\n verts.push(points[(i * 2) + 1]);\n }\n\n for (let i = 0; i < length - 1; i++)\n {\n indices.push(indexStart + i, indexStart + i + 1);\n }\n\n if (closePath)\n {\n indices.push(indexStart + length - 1, indexStart);\n }\n}\n\n","import { earcut } from '../../../../utils/utils';\n\n/**\n * @param points\n * @param holes\n * @param vertices\n * @param verticesStride\n * @param verticesOffset\n * @param indices\n * @param indicesOffset\n * @internal\n */\nexport function triangulateWithHoles(\n points: number[],\n holes: number[],\n vertices: number[],\n verticesStride: number,\n verticesOffset: number,\n\n indices: number[],\n indicesOffset: number\n)\n{\n const triangles = earcut(points, holes, 2);\n\n if (!triangles)\n {\n return;\n }\n\n for (let i = 0; i < triangles.length; i += 3)\n {\n indices[indicesOffset++] = (triangles[i] + verticesOffset);\n indices[indicesOffset++] = (triangles[i + 1] + verticesOffset);\n indices[indicesOffset++] = (triangles[i + 2] + verticesOffset);\n }\n\n let index = verticesOffset * verticesStride;\n\n for (let i = 0; i < points.length; i += 2)\n {\n vertices[index] = points[i];\n vertices[index + 1] = points[i + 1];\n\n index += verticesStride;\n }\n}\n\n","import earcutModule from 'earcut';\n\n/**\n * A high performance event emitter\n * @see {@link https://github.com/primus/eventemitter3}\n * @class EventEmitter\n * @category utils\n */\nexport { default as EventEmitter } from 'eventemitter3';\n\n/**\n * A polygon triangulation library\n * @see {@link https://github.com/mapbox/earcut}\n * @param {number[]} vertices - A flat array of vertex coordinates\n * @param {number[]} [holes] - An array of hole indices\n * @param {number} [dimensions=2] - The number of coordinates per vertex in the input array\n * @returns {number[]} Triangulated polygon\n * @category utils\n * @advanced\n */\nexport const earcut = ((earcutModule as any).default || earcutModule) as typeof earcutModule;\n","import { ExtensionType } from '../../../../extensions/Extensions';\nimport { triangulateWithHoles } from '../utils/triangulateWithHoles';\n\nimport type { Polygon } from '../../../../maths/shapes/Polygon';\nimport type { ShapeBuildCommand } from './ShapeBuildCommand';\n\nconst emptyArray: number[] = [];\n\n/**\n * Builds a rectangle to draw\n *\n * Ignored from docs since it is not directly exposed.\n * @ignore\n * @private\n */\nexport const buildPolygon: ShapeBuildCommand<Polygon> = {\n extension: {\n type: ExtensionType.ShapeBuilder,\n name: 'polygon',\n },\n\n build(shape: Polygon, points: number[]): boolean\n {\n for (let i = 0; i < shape.points.length; i++)\n {\n points[i] = shape.points[i];\n }\n\n return true;\n },\n\n triangulate(\n points: number[],\n // holes: number[],\n vertices: number[],\n verticesStride: number,\n verticesOffset: number,\n\n indices: number[],\n indicesOffset: number\n )\n {\n triangulateWithHoles(points, emptyArray, vertices, verticesStride, verticesOffset, indices, indicesOffset);\n },\n\n};\n","import { Matrix } from '../../../../maths/matrix/Matrix';\nimport { Rectangle } from '../../../../maths/shapes/Rectangle';\nimport { FillGradient } from '../fill/FillGradient';\n\nimport type { ShapePrimitive } from '../../../../maths/shapes/ShapePrimitive';\nimport type { FillStyle, StrokeStyle } from '../FillTypes';\n\n/**\n * Temporary matrix used for matrix calculations\n * @internal\n */\nconst tempTextureMatrix = new Matrix();\n\n/**\n * Temporary rectangle used for bounds calculations\n * @internal\n */\nconst tempRect = new Rectangle();\n\n/**\n * Temporary matrix used for uv mapping calculations\n * @internal\n */\nconst tempUvMatrix = new Matrix();\n\n/**\n * Generates a texture matrix for mapping textures onto shapes.\n * This function handles both local and global texture space mapping.\n *\n * In local space, the texture is mapped to fit exactly within the bounds of the shape.\n * In global space, the texture is mapped using its own dimensions and position.\n * @param out - The matrix to store the result in\n * @param style - The fill style containing texture and mapping properties\n * @param shape - The shape to map the texture onto\n * @param matrix - Optional transform matrix to apply\n * @returns The generated texture matrix for UV mapping\n * @example\n * ```ts\n * const matrix = new Matrix();\n * const textureMatrix = generateTextureMatrix(matrix, fillStyle, shape);\n * // textureMatrix now contains the proper UV mapping for the texture\n * ```\n * @internal\n */\nexport function generateTextureMatrix(out: Matrix, style: FillStyle | StrokeStyle, shape: ShapePrimitive, matrix?: Matrix)\n{\n // Start with either the style's matrix inverted, or identity matrix\n const textureMatrix = style.matrix\n ? out.copyFrom(style.matrix).invert()\n : out.identity();\n\n if (style.textureSpace === 'local')\n {\n // For local space, map texture to shape's bounds.\n // NOTE: this maps the WHOLE texture source (not the frame) onto the shape, so\n // atlas sub-textures show the full atlas here and the canvas renderer (whose\n // patterns are frame-cropped) diverges. Use a style matrix to target the frame.\n const bounds = shape.getBounds(tempRect);\n\n if ((style as StrokeStyle).width)\n {\n bounds.pad((style as StrokeStyle).width);\n }\n\n const { x: tx, y: ty } = bounds;\n const sx = 1 / bounds.width;\n const sy = 1 / bounds.height;\n\n const mTx = -tx * sx;\n const mTy = -ty * sy;\n\n const a1 = textureMatrix.a;\n const b1 = textureMatrix.b;\n const c1 = textureMatrix.c;\n const d1 = textureMatrix.d;\n\n textureMatrix.a *= sx;\n textureMatrix.b *= sx;\n textureMatrix.c *= sy;\n textureMatrix.d *= sy;\n\n textureMatrix.tx = (mTx * a1) + (mTy * c1) + textureMatrix.tx;\n textureMatrix.ty = (mTx * b1) + (mTy * d1) + textureMatrix.ty;\n }\n else if (style.texture.rotate)\n {\n // The sub-texture is rotated in its atlas (groupD8); the texture's uvs encode\n // both the frame origin and the rotation, so map through them instead\n const { uvs, orig } = style.texture;\n\n textureMatrix.scale(1 / orig.width, 1 / orig.height);\n textureMatrix.prepend(tempUvMatrix.set(\n uvs.x1 - uvs.x0, uvs.y1 - uvs.y0,\n uvs.x3 - uvs.x0, uvs.y3 - uvs.y0,\n uvs.x0, uvs.y0\n ));\n }\n else\n {\n // For global space, use texture's own dimensions\n textureMatrix.translate(style.texture.frame.x, style.texture.frame.y);\n textureMatrix.scale(1 / (style.texture.source.width), 1 / (style.texture.source.height));\n }\n\n const sourceStyle = style.texture.source.style;\n\n // we don't want to set the address mode if the fill is a gradient as this handles its own address mode\n if (!(style.fill instanceof FillGradient) && sourceStyle.addressMode === 'clamp-to-edge')\n {\n sourceStyle.addressMode = 'repeat';\n sourceStyle.update();\n }\n\n // Apply any additional transform matrix\n if (matrix)\n {\n textureMatrix.append(tempTextureMatrix.copyFrom(matrix).invert());\n }\n\n return textureMatrix;\n}\n","import { extensions, ExtensionType } from '../../../../extensions/Extensions';\nimport { Matrix } from '../../../../maths/matrix/Matrix';\nimport { Rectangle } from '../../../../maths/shapes/Rectangle';\nimport { buildSimpleUvs, buildUvs } from '../../../../rendering/renderers/shared/geometry/utils/buildUvs';\nimport { transformVertices } from '../../../../rendering/renderers/shared/geometry/utils/transformVertices';\nimport { Texture } from '../../../../rendering/renderers/shared/texture/Texture';\nimport { BigPool } from '../../../../utils/pool/PoolGroup';\nimport { BatchableGraphics } from '../BatchableGraphics';\nimport { buildCircle, buildEllipse, buildRoundedRectangle } from '../buildCommands/buildCircle';\nimport { buildLine } from '../buildCommands/buildLine';\nimport { buildPixelLine } from '../buildCommands/buildPixelLine';\nimport { buildPolygon } from '../buildCommands/buildPolygon';\nimport { buildRectangle } from '../buildCommands/buildRectangle';\nimport { buildTriangle } from '../buildCommands/buildTriangle';\nimport { generateTextureMatrix as generateTextureFillMatrix } from './generateTextureFillMatrix';\nimport { triangulateWithHoles } from './triangulateWithHoles';\n\nimport type { Polygon } from '../../../../maths/shapes/Polygon';\nimport type { Topology } from '../../../../rendering/renderers/shared/geometry/const';\nimport type { ShapeBuildCommand } from '../buildCommands/ShapeBuildCommand';\nimport type { ConvertedFillStyle, ConvertedStrokeStyle } from '../FillTypes';\nimport type { GraphicsContext, TextureInstruction } from '../GraphicsContext';\nimport type { GpuGraphicsContext } from '../GraphicsContextSystem';\nimport type { ShapePath, ShapePrimitiveWithHoles } from '../path/ShapePath';\n\n/**\n * A record of shape builders, keyed by shape type.\n * @category scene\n * @advanced\n */\nexport const shapeBuilders: Record<string, ShapeBuildCommand> = {};\n\nextensions.handleByMap(ExtensionType.ShapeBuilder, shapeBuilders);\nextensions.add(buildRectangle, buildPolygon, buildTriangle, buildCircle, buildEllipse, buildRoundedRectangle);\n\nconst tempRect = new Rectangle();\nconst tempTextureMatrix = new Matrix();\n\n/**\n * @param context\n * @param gpuContext\n * @internal\n */\nexport function buildContextBatches(context: GraphicsContext, gpuContext: GpuGraphicsContext)\n{\n const { geometryData, batches } = gpuContext;\n\n // reset them..\n batches.length = 0;\n geometryData.indices.length = 0;\n geometryData.vertices.length = 0;\n geometryData.uvs.length = 0;\n\n for (let i = 0; i < context.instructions.length; i++)\n {\n const instruction = context.instructions[i];\n\n if (instruction.action === 'texture')\n {\n // add a quad!\n addTextureToGeometryData(instruction.data, batches, geometryData);\n }\n else if (instruction.action === 'fill' || instruction.action === 'stroke')\n {\n const isStroke = instruction.action === 'stroke';\n\n // build path collection of polys and shapes points..\n const shapePath = instruction.data.path.shapePath;\n\n const style = instruction.data.style;\n\n const hole = instruction.data.hole;\n\n if (isStroke && hole)\n {\n addShapePathToGeometryData(hole.shapePath, style, true, batches, geometryData);\n }\n\n if (hole)\n {\n // add the holes to the last shape primitive\n shapePath.shapePrimitives[shapePath.shapePrimitives.length - 1].holes = hole.shapePath.shapePrimitives;\n }\n\n addShapePathToGeometryData(shapePath, style, isStroke, batches, geometryData);\n }\n }\n}\n\nfunction addTextureToGeometryData(\n data: TextureInstruction['data'],\n batches: BatchableGraphics[],\n geometryData: {\n vertices: number[];\n uvs: number[];\n indices: number[];\n }\n)\n{\n const points: number[] = [];\n\n const build = shapeBuilders.rectangle;\n\n const rect = tempRect;\n\n rect.x = data.dx;\n rect.y = data.dy;\n rect.width = data.dw;\n rect.height = data.dh;\n\n const matrix = data.transform;\n\n // TODO - this can be cached...\n if (!build.build(rect, points))\n {\n return;\n }\n\n const { vertices, uvs, indices } = geometryData;\n\n const indexOffset = indices.length;\n const vertOffset = vertices.length / 2;\n\n if (matrix)\n {\n transformVertices(points, matrix);\n }\n\n build.triangulate(points, vertices, 2, vertOffset, indices, indexOffset);\n\n const texture = data.image;\n const textureUvs = texture.uvs;\n\n uvs.push(\n textureUvs.x0, textureUvs.y0,\n textureUvs.x1, textureUvs.y1,\n textureUvs.x3, textureUvs.y3,\n textureUvs.x2, textureUvs.y2,\n );\n\n const graphicsBatch = BigPool.get(BatchableGraphics);\n\n graphicsBatch.indexOffset = indexOffset;\n graphicsBatch.indexSize = indices.length - indexOffset;\n\n graphicsBatch.attributeOffset = vertOffset;\n graphicsBatch.attributeSize = (vertices.length / 2) - vertOffset;\n\n graphicsBatch.baseColor = data.style;\n graphicsBatch.alpha = data.alpha;\n\n graphicsBatch.texture = texture;\n graphicsBatch.geometryData = geometryData;\n\n batches.push(graphicsBatch);\n}\n\nfunction addShapePathToGeometryData(\n shapePath: ShapePath,\n style: ConvertedFillStyle | ConvertedStrokeStyle,\n isStroke: boolean,\n batches: BatchableGraphics[],\n geometryData: {\n vertices: number[];\n uvs: number[];\n indices: number[];\n }\n)\n{\n const { vertices, uvs, indices } = geometryData;\n\n shapePath.shapePrimitives.forEach(({ shape, transform: matrix, holes }) =>\n {\n const points: number[] = [];\n const build = shapeBuilders[shape.type];\n // TODO - this can be cached...\n // TODO - THIS IS DONE TWICE!!!!!!\n // ONCE FOR STROKE AND ONCE FOR FILL\n // move to the ShapePath2D class itself?\n\n if (!build.build(shape, points))\n {\n return;\n }\n\n const indexOffset = indices.length;\n const vertOffset = vertices.length / 2;\n let topology: Topology = 'triangle-list';\n\n if (matrix)\n {\n transformVertices(points, matrix);\n }\n\n if (!isStroke)\n {\n if (holes)\n {\n const holeIndices: number[] = [];\n\n const otherPoints = points.slice();\n\n const holeArrays = getHoleArrays(holes);\n\n holeArrays.forEach((holePoints) =>\n {\n holeIndices.push(otherPoints.length / 2);\n otherPoints.push(...holePoints);\n });\n\n triangulateWithHoles(otherPoints, holeIndices, vertices, 2, vertOffset, indices, indexOffset);\n }\n else\n {\n build.triangulate(points, vertices, 2, vertOffset, indices, indexOffset);\n }\n }\n else\n {\n const close = (shape as Polygon).closePath ?? true;\n const lineStyle = style as ConvertedStrokeStyle;\n\n if (!lineStyle.pixelLine)\n {\n buildLine(points, lineStyle, false, close, vertices, indices);\n }\n else\n {\n buildPixelLine(points, close, vertices, indices);\n topology = 'line-list';\n }\n }\n\n const uvsOffset = uvs.length / 2;\n\n const texture = style.texture;\n\n if (texture !== Texture.WHITE)\n {\n const textureMatrix = generateTextureFillMatrix(tempTextureMatrix, style, shape, matrix);\n\n buildUvs(vertices, 2, vertOffset, uvs, uvsOffset, 2, (vertices.length / 2) - vertOffset, textureMatrix);\n }\n else\n {\n buildSimpleUvs(uvs, uvsOffset, 2, (vertices.length / 2) - vertOffset);\n }\n\n const graphicsBatch = BigPool.get(BatchableGraphics);\n\n graphicsBatch.indexOffset = indexOffset;\n graphicsBatch.indexSize = indices.length - indexOffset;\n\n graphicsBatch.attributeOffset = vertOffset;\n graphicsBatch.attributeSize = (vertices.length / 2) - vertOffset;\n\n graphicsBatch.baseColor = style.color;\n graphicsBatch.alpha = style.alpha;\n\n graphicsBatch.texture = texture;\n graphicsBatch.geometryData = geometryData;\n graphicsBatch.topology = topology;\n\n batches.push(graphicsBatch);\n });\n}\n\nfunction getHoleArrays(holePrimitives: ShapePrimitiveWithHoles[])\n{\n const holeArrays = [];\n\n for (let k = 0; k < holePrimitives.length; k++)\n {\n const holePrimitive = holePrimitives[k].shape;\n\n // TODO - need to transform the points via there transform here..\n const holePoints: number[] = [];\n\n const holeBuilder = shapeBuilders[holePrimitive.type] as ShapeBuildCommand;\n\n if (holeBuilder.build(holePrimitive, holePoints))\n {\n holeArrays.push(holePoints);\n }\n }\n\n return holeArrays;\n}\n"],"names":["y2","x0","y0","x1","x2","y1","out","id","length","a","c","h","l","m","q","s","t","v","z","segment","number","parse","path","data","replace","_","cmd","args","type","toLowerCase","command","values","parseValues","push","splice","Error","numbers","match","map","Number","generateTextureFillMatrix"],"mappings":"wDAOO,SAAgC,AAAvB,CAAuB,EAEnC,AADJ,IACU,EAAI,EAAO,IAAP,EAAO,CAEjB,GAAI,EAAI,CAAA,CAEJ,CADJ,MACW,CAAA,CAGX,IAAI,EAAO,CAAA,CAAP,AAEJ,IAAA,IAAS,CAAA,CAAI,CAAA,CAAG,EAAK,AAAL,CAAK,CAAO,EAAI,CAAC,CAAA,CAAG,EAAA,AAAK,CAAA,CAAO,E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