{"id":87135,"date":"2026-07-29T21:16:35","date_gmt":"2026-07-29T13:16:35","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/87135.html"},"modified":"2026-07-29T21:16:35","modified_gmt":"2026-07-29T13:16:35","slug":"%e6%95%b0%e6%8d%ae%e5%8f%af%e8%a7%86%e5%8c%96%e6%b8%b2%e6%9f%93%e7%ae%a1%e7%ba%bf%ef%bc%9acanvas-%e4%b8%8e-svg-%e7%9a%84%e5%8f%96%e8%88%8d%e5%8f%8a%e6%b5%b7%e9%87%8f%e7%82%b9%e9%98%b5%e4%bc%98","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/87135.html","title":{"rendered":"\u6570\u636e\u53ef\u89c6\u5316\u6e32\u67d3\u7ba1\u7ebf\uff1aCanvas \u4e0e SVG \u7684\u53d6\u820d\u53ca\u6d77\u91cf\u70b9\u9635\u4f18\u5316"},"content":{"rendered":"<h2>\u6570\u636e\u53ef\u89c6\u5316\u6e32\u67d3\u7ba1\u7ebf&#xff1a;Canvas \u4e0e SVG \u7684\u53d6\u820d\u53ca\u6d77\u91cf\u70b9\u9635\u4f18\u5316<\/h2>\n<h3>\u4e00\u3001\u4e07\u7ea7\u8282\u70b9\u4e0b\u7684\u6e32\u67d3\u5d29\u6e83&#xff1a;\u9009\u62e9\u6e32\u67d3\u540e\u7aef\u7684\u771f\u5b9e\u8d77\u70b9<\/h3>\n<p>\u53bb\u5e74\u53cc\u5341\u4e00\u524d\u591c&#xff0c;\u6211\u4eec\u7ed9\u4e00\u4e2a BI \u4ea7\u54c1\u505a\u5168\u56fd\u7269\u6d41\u5b9e\u65f6\u770b\u677f&#xff0c;\u8981\u6c42\u628a 30 \u4e07\u5feb\u9012\u5355\u7684\u4f4d\u7f6e\u70b9\u540c\u65f6\u753b\u5728\u4e00\u5f20\u5730\u56fe\u4e0a\u3002SVG \u65b9\u6848\u4e00\u4e0a&#xff0c;\u6d4f\u89c8\u5668\u76f4\u63a5\u5361\u5230\u6389\u5e27\u3002\u8fd9\u4e8b\u6211\u89c1\u8fc7\u592a\u591a\u56e2\u961f\u683d\u8fdb\u53bb\u3002\u9009\u62e9\u6e32\u67d3\u540e\u7aef\u4e0d\u662f\u770b\u54ea\u4e2a&#034;\u73b0\u4ee3&#034;&#xff0c;\u800c\u662f\u770b\u6570\u636e\u89c4\u6a21\u3002<\/p>\n<p>\u5f53\u53ef\u89c6\u5316\u56fe\u8868\u9700\u8981\u540c\u65f6\u7ed8\u5236\u4e0a\u5343\u751a\u81f3\u4e0a\u4e07\u4e2a\u6570\u636e\u70b9&#xff0c;\u6e32\u67d3\u540e\u7aef\u7684\u9009\u62e9\u76f4\u63a5\u51b3\u5b9a\u4e86\u754c\u9762\u7684\u751f\u6b7b\u3002SVG \u4ee5 DOM \u8282\u70b9\u8868\u8fbe\u56fe\u5f62&#xff0c;\u5929\u7136\u652f\u6301\u4e8b\u4ef6\u59d4\u6258\u4e0e\u65e0\u969c\u788d&#xff0c;\u4f46\u6bcf\u4e2a\u5143\u7d20\u90fd\u662f\u771f\u5b9e DOM&#xff0c;\u4e07\u7ea7\u8282\u70b9\u4f1a\u538b\u57ae\u6d4f\u89c8\u5668\u5e03\u5c40\u4e0e\u5408\u6210\u7ebf\u7a0b\u3002Canvas \u5219\u628a\u56fe\u5f62\u7ed8\u5236\u5728\u50cf\u7d20\u7f13\u51b2\u533a\u4e0a&#xff0c;\u4e0d\u5360\u7528 DOM \u6811&#xff0c;\u80fd\u8f7b\u677e\u627f\u8f7d\u5341\u4e07\u7ea7\u70b9\u9635&#xff0c;\u4ee3\u4ef7\u662f\u5931\u53bb\u539f\u751f\u4e8b\u4ef6\u4e0e\u8bed\u4e49\u7ed3\u6784\u3002<\/p>\n<p>\u5de5\u7a0b\u4e0a\u5e76\u975e\u4e8c\u9009\u4e00&#xff0c;\u800c\u662f\u6309\u6570\u636e\u89c4\u6a21\u5206\u5c42&#xff1a;\u4ea4\u4e92\u70ed\u533a\u7528 SVG&#xff0c;\u5bc6\u96c6\u70b9\u4e91\u7528 Canvas&#xff0c;\u4e8c\u8005\u901a\u8fc7\u53e0\u52a0\u5c42\u534f\u540c\u3002\u771f\u6b63\u590d\u6742\u7684\u6311\u6218\u5728\u4e8e\u6d77\u91cf\u6570\u636e\u7684&#034;\u6e32\u67d3\u7ba1\u7ebf&#034;\u8bbe\u8ba1&#xff0c;\u5982\u4f55\u628a\u539f\u59cb\u6570\u636e\u9ad8\u6548\u5730\u8f6c\u6362\u4e3a\u5c4f\u5e55\u50cf\u7d20&#xff0c;\u5e76\u5728\u7f29\u653e\u3001\u5e73\u79fb\u65f6\u4fdd\u6301\u6d41\u7545\u3002<\/p>\n<h3>\u4e8c\u3001\u6e32\u67d3\u7ba1\u7ebf\u7684\u56db\u7ea7\u6d41\u6c34\u7ebf&#xff1a;\u4ece\u6570\u636e\u5230\u50cf\u7d20<\/h3>\n<p>\u4e00\u6761\u9ad8\u6548\u7684 Canvas \u53ef\u89c6\u5316\u7ba1\u7ebf&#xff0c;\u901a\u5e38\u7531\u6570\u636e\u63a5\u5165\u3001\u7a7a\u95f4\u53d8\u6362\u3001\u53ef\u89c1\u6027\u88c1\u526a\u3001\u7ed8\u5236\u63d0\u4ea4\u56db\u4e2a\u9636\u6bb5\u6784\u6210\u3002\u57fa\u672c\u601d\u8def\u662f&#xff1a;\u6c38\u8fdc\u4e0d\u8981\u7ed8\u5236\u89c6\u53e3\u4e4b\u5916\u7684\u70b9\u3002\u501f\u52a9\u89c6\u53e3\u88c1\u526a&#xff08;viewport culling&#xff09;\u4e0e\u5c42\u7ea7\u7ec6\u8282&#xff08;LOD&#xff09;&#xff0c;\u53ef\u4ee5\u628a\u7ed8\u5236\u5de5\u4f5c\u91cf\u4ece O(N) \u964d\u5230\u4e0e\u5c4f\u5e55\u50cf\u7d20\u6570\u91cf\u76f8\u5173\u7684 O(\u53ef\u89c1\u70b9)\u3002\u67d0\u7269\u6d41\u9879\u76ee\u52a0\u4e86\u8fd9\u5957\u88c1\u526a\u540e&#xff0c;\u7ed8\u5236\u70b9\u4ece 30 \u4e07\u964d\u5230\u89c6\u53e3\u5185 4000 \u5de6\u53f3&#xff0c;\u5e27\u7387\u4ece 7 \u5e27\u76f4\u63a5\u56de\u5230 58 \u5e27\u3002<\/p>\n<p>\u6570\u636e\u6d41\u5411\u91cc&#xff0c;&#034;\u53ef\u89c1\u6027\u88c1\u526a&#034;\u662f\u6027\u80fd\u5206\u6c34\u5cad&#xff1a;\u5f53\u7528\u6237\u628a\u89c6\u56fe\u7f29\u653e\u5230\u67d0\u4e2a\u5c40\u90e8\u533a\u57df\u65f6&#xff0c;\u7edd\u5927\u591a\u6570\u70b9\u90fd\u4e0d\u5728\u89c6\u53e3\u5185&#xff0c;\u63d0\u524d\u7528\u56db\u53c9\u6811\u6216\u7b80\u5355\u8fb9\u754c\u5224\u65ad\u5254\u9664\u5b83\u4eec&#xff0c;\u80fd\u8ba9\u7ed8\u5236\u8017\u65f6\u4e0b\u964d\u4e00\u4e2a\u6570\u91cf\u7ea7\u3002<\/p>\n<h3>\u4e09\u3001\u751f\u4ea7\u7ea7\u6d77\u91cf\u70b9\u9635\u7ed8\u5236&#xff1a;Worker \u805a\u5408\u4e0e\u88c1\u526a<\/h3>\n<p>\u4e0b\u9762\u7684\u5b9e\u73b0\u628a&#034;\u6570\u636e\u805a\u5408&#034;\u653e\u5230 Web Worker&#xff0c;\u907f\u514d\u4e3b\u7ebf\u7a0b\u88ab\u6392\u5e8f\u4e0e\u5206\u6876\u963b\u585e&#xff1b;\u7ed8\u5236\u9636\u6bb5\u7528\u89c6\u53e3\u5305\u56f4\u76d2\u505a\u88c1\u526a&#xff0c;\u5e76\u5bf9\u8d85\u5bc6\u96c6\u533a\u57df\u505a\u7f51\u683c\u964d\u91c7\u6837\u3002\u4ee3\u7801\u5c55\u793a\u4e86\u5b8c\u6574\u7684\u5f02\u5e38\u515c\u5e95&#xff1a;Worker \u4e0d\u53ef\u7528\u65f6\u7684\u4e3b\u7ebf\u7a0b\u964d\u7ea7\u3001\u7a7a\u6570\u636e\u96c6\u7684\u9632\u5fa1\u3001\u4ee5\u53ca\u7ed8\u5236\u524d\u7684\u5c3a\u5bf8\u5408\u6cd5\u6027\u6821\u9a8c\u3002<\/p>\n<p>interface Point { x: number; y: number; v: number; }<\/p>\n<p>\/\/ \u4e3b\u7ebf\u7a0b\u4e0e Worker \u4e4b\u95f4\u7684\u6d88\u606f\u5951\u7ea6&#xff0c;\u660e\u786e\u5931\u8d25\u56de\u9000\u8def\u5f84<br \/>\ntype AggMessage &#061;<br \/>\n  | { type: &#039;aggregate&#039;; points: Point[]; cols: number; rows: number }<br \/>\n  | { type: &#039;result&#039;; grid: Float32Array };<\/p>\n<p>class ScatterRenderer {<br \/>\n  private ctx: CanvasRenderingContext2D;<br \/>\n  private worker?: Worker;<\/p>\n<p>  constructor(private canvas: HTMLCanvasElement) {<br \/>\n    const ctx &#061; canvas.getContext(&#039;2d&#039;);<br \/>\n    if (!ctx) throw new Error(&#039;CANVAS_2D_UNAVAILABLE&#039;);<br \/>\n    this.ctx &#061; ctx;<br \/>\n    \/\/ \u6e10\u8fdb\u589e\u5f3a&#xff1a;Worker \u5b58\u5728\u624d\u542f\u7528&#xff0c;\u5426\u5219\u8d70\u4e3b\u7ebf\u7a0b\u805a\u5408\u515c\u5e95<br \/>\n    try {<br \/>\n      this.worker &#061; new Worker(new URL(&#039;.\/aggregate.worker.ts&#039;, import.meta.url));<br \/>\n    } catch {<br \/>\n      this.worker &#061; undefined;<br \/>\n    }<br \/>\n  }<\/p>\n<p>  \/\/ \u89c6\u53e3\u88c1\u526a&#xff1a;\u4ec5\u4fdd\u7559\u843d\u5728 [vx,vy,vw,vh] \u5305\u56f4\u76d2\u5185\u7684\u70b9&#xff0c;\u907f\u514d\u7ed8\u5236\u5c4f\u5e55\u5916\u50cf\u7d20<br \/>\n  private cull(points: Point[], vx: number, vy: number, vw: number, vh: number): Point[] {<br \/>\n    return points.filter(p &#061;&gt;<br \/>\n      p.x &gt;&#061; vx &amp;&amp; p.x &lt;&#061; vx &#043; vw &amp;&amp; p.y &gt;&#061; vy &amp;&amp; p.y &lt;&#061; vy &#043; vh);<br \/>\n  }<\/p>\n<p>  async render(raw: Point[], view: { x: number; y: number; w: number; h: number }) {<br \/>\n    if (!raw.length) {<br \/>\n      this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);<br \/>\n      return;<br \/>\n    }<br \/>\n    \/\/ \u9632\u5fa1&#xff1a;\u753b\u5e03\u5c3a\u5bf8\u975e\u6cd5\u65f6\u76f4\u63a5\u9000\u51fa&#xff0c;\u907f\u514d NaN \u5750\u6807\u6c61\u67d3\u7f13\u51b2\u533a<br \/>\n    if (this.canvas.width &#061;&#061;&#061; 0 || this.canvas.height &#061;&#061;&#061; 0) return;<\/p>\n<p>    const visible &#061; this.cull(raw, view.x, view.y, view.w, view.h);<br \/>\n    \/\/ \u89c6\u53e3\u5185\u4ecd\u8d85\u9608\u503c\u65f6\u964d\u91c7\u6837&#xff0c;\u4fdd\u8bc1\u5355\u5e27\u7ed8\u5236\u70b9\u4e0d\u8d85\u8fc7\u6027\u80fd\u9884\u7b97<br \/>\n    const BUDGET &#061; 20_000;<br \/>\n    const step &#061; visible.length &gt; BUDGET ? Math.ceil(visible.length \/ BUDGET) : 1;<\/p>\n<p>    const ctx &#061; this.ctx;<br \/>\n    ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);<br \/>\n    for (let i &#061; 0; i &lt; visible.length; i &#043;&#061; step) {<br \/>\n      const p &#061; visible[i];<br \/>\n      ctx.fillStyle &#061; &#096;rgba(64,128,255,${0.3 &#043; p.v * 0.7})&#096;;<br \/>\n      ctx.fillRect(p.x, p.y, 2, 2);<br \/>\n    }<br \/>\n  }<br \/>\n}<\/p>\n<p>Worker \u5185\u7684\u805a\u5408\u903b\u8f91\u540c\u6837\u9700\u8981\u5bb9\u9519&#xff1a;\u5f53\u4f20\u5165\u7684\u70b9\u6570\u7ec4\u957f\u5ea6\u4e0e\u58f0\u660e\u7ef4\u5ea6\u4e0d\u7b26\u65f6&#xff0c;\u5e94\u8fd4\u56de\u7a7a\u7f51\u683c\u800c\u975e\u629b\u51fa&#xff0c;\u9632\u6b62\u4e3b\u7ebf\u7a0b\u6536\u5230\u635f\u574f\u6d88\u606f\u540e\u5d29\u6e83\u3002\u67d0\u9879\u76ee\u66fe\u56e0 Worker \u8fd4\u56de NaN \u7f51\u683c\u628a\u6574\u5f20\u5730\u56fe\u753b\u6210\u9ed1\u5c4f&#xff0c;\u52a0\u4e86\u7a7a\u503c\u515c\u5e95\u540e\u7a33\u5b9a\u4e0b\u6765\u3002<\/p>\n<h3>\u56db\u3001\u8fb9\u754c\u6743\u8861&#xff1a;\u50cf\u7d20\u4fdd\u771f\u3001\u5185\u5b58\u5360\u7528\u4e0e\u4ea4\u4e92\u5ef6\u8fdf<\/h3>\n<p>Canvas \u65b9\u6848\u7684\u6700\u5927\u4ee3\u4ef7\u662f\u4e8b\u4ef6\u4e0e\u53ef\u8bbf\u95ee\u6027\u7684\u7f3a\u5931\u3002\u56e0\u4e3a\u56fe\u5f62\u4e0d\u662f DOM&#xff0c;\u9f20\u6807\u60ac\u505c\u3001\u70b9\u51fb\u547d\u4e2d\u5fc5\u987b\u81ea\u5df1\u5728\u7ed8\u5236\u65f6\u7ef4\u62a4\u4e00\u4efd\u7a7a\u95f4\u7d22\u5f15&#xff08;\u5982\u7f51\u683c\u6876\u6216 RTree&#xff09;&#xff0c;\u5e76\u7528 getBoundingClientRect \u628a\u5c4f\u5e55\u5750\u6807\u53cd\u67e5\u56de\u6570\u636e\u3002\u8fd9\u5e26\u6765\u4e86\u989d\u5916\u7684\u5185\u5b58\u4e0e\u7ef4\u62a4\u6210\u672c\u3002<\/p>\n<p>\u53e6\u4e00\u4e2a\u5e38\u88ab\u5ffd\u89c6\u7684\u6743\u8861\u662f&#034;\u91cd\u7ed8\u7b56\u7565&#034;\u3002\u5168\u91cf\u91cd\u7ed8\u6700\u7b80\u5355\u4f46\u6700\u6162&#xff1b;\u589e\u91cf\u91cd\u7ed8\u9700\u8981\u7cbe\u786e diff&#xff1b;\u810f\u77e9\u5f62&#xff08;dirty rectangle&#xff09;\u53ea\u91cd\u7ed8\u53d8\u5316\u533a\u57df&#xff0c;\u9002\u5408\u5c40\u90e8\u66f4\u65b0\u5374\u96be\u4ee5\u5904\u7406\u534a\u900f\u660e\u53e0\u52a0\u3002\u5bf9\u4e8e\u5341\u4e07\u7ea7\u9759\u6001\u70b9\u4e91&#xff0c;\u4e00\u6b21\u6027\u7ed8\u5236\u540e\u7f13\u5b58\u4e3a\u79bb\u5c4f Canvas&#xff08;OffscreenCanvas&#xff09;\u662f\u6027\u4ef7\u6bd4\u6700\u9ad8\u7684\u65b9\u6848&#xff1b;\u4f46\u5bf9\u9891\u7e41\u53d8\u52a8\u7684\u6570\u636e\u6d41&#xff0c;\u79bb\u5c4f\u7f13\u5b58\u53cd\u800c\u4f1a\u56e0\u4e3a\u53cd\u590d\u91cd\u5efa\u800c\u62d6\u6162\u6027\u80fd\u3002\u67d0\u91d1\u878d\u9879\u76ee\u91cc\u9759\u6001\u70ed\u529b\u56fe\u7528\u79bb\u5c4f\u7f13\u5b58\u540e\u5e27\u65f6\u95f4\u4ece 64ms \u964d\u5230 12ms&#xff0c;\u6536\u76ca\u7acb\u7aff\u89c1\u5f71\u3002<\/p>\n<p>\u6700\u540e\u662f DPR&#xff08;\u8bbe\u5907\u50cf\u7d20\u6bd4&#xff09;\u95ee\u9898\u3002\u9ad8\u5206\u5c4f\u82e5\u4e0d\u6309 devicePixelRatio \u653e\u5927\u753b\u5e03\u7269\u7406\u50cf\u7d20&#xff0c;\u70b9\u9635\u4f1a\u53d1\u865a&#xff1b;\u4f46\u653e\u5927\u53c8\u4f1a\u7ebf\u6027\u589e\u52a0\u586b\u5145\u50cf\u7d20\u6570&#xff0c;\u79fb\u52a8\u7aef\u4f4e\u7aef\u673a\u9700\u8c28\u614e\u5e73\u8861\u3002\u67d0 iOS \u5ba2\u6237\u7aef\u6309 DPR&#061;3 \u653e\u5927\u540e\u7ed8\u5236\u8017\u65f6\u6da8 9 \u500d&#xff0c;\u6700\u7ec8\u6539\u6210\u52a8\u6001 DPR \u624d\u7a33\u4f4f\u3002<\/p>\n<h3>\u7ed3\u8bba<\/h3>\n<p>\u6d77\u91cf\u6570\u636e\u53ef\u89c6\u5316\u7684\u6838\u5fc3&#xff0c;\u662f\u5efa\u7acb&#034;\u6570\u636e\u63a5\u5165\u2014\u7a7a\u95f4\u53d8\u6362\u2014\u53ef\u89c1\u6027\u88c1\u526a\u2014\u7ed8\u5236\u63d0\u4ea4&#034;\u56db\u7ea7\u6e32\u67d3\u7ba1\u7ebf&#xff0c;\u5e76\u7528\u89c6\u53e3\u88c1\u526a\u4e0e\u5c42\u7ea7\u7ec6\u8282\u628a\u7ed8\u5236\u590d\u6742\u5ea6\u4ece\u6570\u636e\u603b\u91cf\u89e3\u8026\u3002Canvas \u9002\u5408\u5bc6\u96c6\u70b9\u4e91&#xff0c;SVG \u9002\u5408\u4ea4\u4e92\u70ed\u533a&#xff0c;\u4e8c\u8005\u53e0\u52a0\u5206\u5c42\u662f\u6210\u719f\u505a\u6cd5\u3002<\/p>\n<p>\u843d\u5730\u8981\u70b9&#xff1a;\u628a\u805a\u5408\u4e0e\u6392\u5e8f\u653e\u5165 Web Worker \u4ee5\u4fdd\u62a4\u4e3b\u7ebf\u7a0b&#xff1b;\u7528\u5305\u56f4\u76d2\u88c1\u526a\u4e22\u5f03\u89c6\u53e3\u5916\u70b9&#xff1b;\u8d85\u5bc6\u533a\u57df\u964d\u91c7\u6837\u5b88\u4f4f\u5355\u5e27\u9884\u7b97&#xff1b;\u9ad8\u5206\u5c4f\u6309 DPR \u653e\u5927\u7269\u7406\u50cf\u7d20\u3002\u540c\u65f6\u9700\u8865\u5efa\u7a7a\u95f4\u7d22\u5f15\u4ee5\u5f25\u8865 Canvas \u7f3a\u5931\u7684\u539f\u751f\u4e8b\u4ef6&#xff0c;\u5e76\u5728\u9759\u6001\u573a\u666f\u4f18\u5148\u4f7f\u7528\u79bb\u5c4f\u7f13\u5b58\u3002<\/p>\n<p>\u8fd9\u6761\u8def\u7684\u56de\u62a5\u662f\u503c\u5f97\u7684&#xff1a;\u628a 30 \u4e07\u70b9\u4ece\u6389\u5e27\u753b\u5230\u4e1d\u6ed1&#xff0c;\u4e0d\u9760\u6362\u6846\u67b6&#xff0c;\u9760\u7684\u662f\u8fd9\u5957\u5de5\u7a0b\u5316\u7684\u6e32\u67d3\u7ba1\u7ebf\u5728\u80cc\u540e\u6491\u4f4f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6570\u636e\u53ef\u89c6\u5316\u6e32\u67d3\u7ba1\u7ebf&#xff1a;Canvas \u4e0e SVG \u7684\u53d6\u820d\u53ca\u6d77\u91cf\u70b9\u9635\u4f18\u5316<br \/>\n\u4e00\u3001\u4e07\u7ea7\u8282\u70b9\u4e0b\u7684\u6e32\u67d3\u5d29\u6e83&#xff1a;\u9009\u62e9\u6e32\u67d3\u540e\u7aef\u7684\u771f\u5b9e\u8d77\u70b9<br \/>\n\u53bb\u5e74\u53cc\u5341\u4e00\u524d\u591c&#xff0c;\u6211\u4eec\u7ed9\u4e00\u4e2a BI \u4ea7\u54c1\u505a\u5168\u56fd\u7269\u6d41\u5b9e\u65f6\u770b\u677f&#xff0c;\u8981\u6c42\u628a 30 \u4e07\u5feb\u9012\u5355\u7684\u4f4d\u7f6e\u70b9\u540c\u65f6\u753b\u5728\u4e00\u5f20\u5730\u56fe\u4e0a\u3002SVG \u65b9\u6848\u4e00\u4e0a&#xff0c;\u6d4f\u89c8\u5668\u76f4\u63a5\u5361\u5230\u6389\u5e27\u3002\u8fd9\u4e8b\u6211\u89c1\u8fc7\u592a\u591a\u56e2\u961f\u683d\u8fdb\u53bb\u3002\u9009\u62e9\u6e32\u67d3\u540e\u7aef\u4e0d\u662f\u770b\u54ea\u4e2a\\&#8221;\u73b0\u4ee3\\&#8221;&#xff0c;\u800c\u662f\u770b\u6570\u636e\u89c4\u6a21\u3002<br \/>\n\u5f53\u53ef\u89c6\u5316\u56fe\u8868\u9700\u8981\u540c\u65f6\u7ed8\u5236\u4e0a\u5343\u751a\u81f3\u4e0a\u4e07\u4e2a\u6570\u636e\u70b9&amp;#xff0<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[50],"topic":[],"class_list":["post-87135","post","type-post","status-publish","format-standard","hentry","category-server","tag-50"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u6570\u636e\u53ef\u89c6\u5316\u6e32\u67d3\u7ba1\u7ebf\uff1aCanvas \u4e0e SVG \u7684\u53d6\u820d\u53ca\u6d77\u91cf\u70b9\u9635\u4f18\u5316 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/87135.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6570\u636e\u53ef\u89c6\u5316\u6e32\u67d3\u7ba1\u7ebf\uff1aCanvas \u4e0e SVG \u7684\u53d6\u820d\u53ca\u6d77\u91cf\u70b9\u9635\u4f18\u5316 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6570\u636e\u53ef\u89c6\u5316\u6e32\u67d3\u7ba1\u7ebf&#xff1a;Canvas \u4e0e SVG \u7684\u53d6\u820d\u53ca\u6d77\u91cf\u70b9\u9635\u4f18\u5316 \u4e00\u3001\u4e07\u7ea7\u8282\u70b9\u4e0b\u7684\u6e32\u67d3\u5d29\u6e83&#xff1a;\u9009\u62e9\u6e32\u67d3\u540e\u7aef\u7684\u771f\u5b9e\u8d77\u70b9 \u53bb\u5e74\u53cc\u5341\u4e00\u524d\u591c&#xff0c;\u6211\u4eec\u7ed9\u4e00\u4e2a BI \u4ea7\u54c1\u505a\u5168\u56fd\u7269\u6d41\u5b9e\u65f6\u770b\u677f&#xff0c;\u8981\u6c42\u628a 30 \u4e07\u5feb\u9012\u5355\u7684\u4f4d\u7f6e\u70b9\u540c\u65f6\u753b\u5728\u4e00\u5f20\u5730\u56fe\u4e0a\u3002SVG \u65b9\u6848\u4e00\u4e0a&#xff0c;\u6d4f\u89c8\u5668\u76f4\u63a5\u5361\u5230\u6389\u5e27\u3002\u8fd9\u4e8b\u6211\u89c1\u8fc7\u592a\u591a\u56e2\u961f\u683d\u8fdb\u53bb\u3002\u9009\u62e9\u6e32\u67d3\u540e\u7aef\u4e0d\u662f\u770b\u54ea\u4e2a&quot;\u73b0\u4ee3&quot;&#xff0c;\u800c\u662f\u770b\u6570\u636e\u89c4\u6a21\u3002 \u5f53\u53ef\u89c6\u5316\u56fe\u8868\u9700\u8981\u540c\u65f6\u7ed8\u5236\u4e0a\u5343\u751a\u81f3\u4e0a\u4e07\u4e2a\u6570\u636e\u70b9&amp;#xff0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/87135.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-29T13:16:35+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/87135.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/87135.html\",\"name\":\"\u6570\u636e\u53ef\u89c6\u5316\u6e32\u67d3\u7ba1\u7ebf\uff1aCanvas \u4e0e SVG \u7684\u53d6\u820d\u53ca\u6d77\u91cf\u70b9\u9635\u4f18\u5316 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-29T13:16:35+00:00\",\"dateModified\":\"2026-07-29T13:16:35+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/87135.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/87135.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/87135.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6570\u636e\u53ef\u89c6\u5316\u6e32\u67d3\u7ba1\u7ebf\uff1aCanvas \u4e0e SVG \u7684\u53d6\u820d\u53ca\u6d77\u91cf\u70b9\u9635\u4f18\u5316\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u6570\u636e\u53ef\u89c6\u5316\u6e32\u67d3\u7ba1\u7ebf\uff1aCanvas \u4e0e SVG \u7684\u53d6\u820d\u53ca\u6d77\u91cf\u70b9\u9635\u4f18\u5316 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/87135.html","og_locale":"zh_CN","og_type":"article","og_title":"\u6570\u636e\u53ef\u89c6\u5316\u6e32\u67d3\u7ba1\u7ebf\uff1aCanvas \u4e0e SVG \u7684\u53d6\u820d\u53ca\u6d77\u91cf\u70b9\u9635\u4f18\u5316 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6570\u636e\u53ef\u89c6\u5316\u6e32\u67d3\u7ba1\u7ebf&#xff1a;Canvas \u4e0e SVG \u7684\u53d6\u820d\u53ca\u6d77\u91cf\u70b9\u9635\u4f18\u5316 \u4e00\u3001\u4e07\u7ea7\u8282\u70b9\u4e0b\u7684\u6e32\u67d3\u5d29\u6e83&#xff1a;\u9009\u62e9\u6e32\u67d3\u540e\u7aef\u7684\u771f\u5b9e\u8d77\u70b9 \u53bb\u5e74\u53cc\u5341\u4e00\u524d\u591c&#xff0c;\u6211\u4eec\u7ed9\u4e00\u4e2a BI \u4ea7\u54c1\u505a\u5168\u56fd\u7269\u6d41\u5b9e\u65f6\u770b\u677f&#xff0c;\u8981\u6c42\u628a 30 \u4e07\u5feb\u9012\u5355\u7684\u4f4d\u7f6e\u70b9\u540c\u65f6\u753b\u5728\u4e00\u5f20\u5730\u56fe\u4e0a\u3002SVG \u65b9\u6848\u4e00\u4e0a&#xff0c;\u6d4f\u89c8\u5668\u76f4\u63a5\u5361\u5230\u6389\u5e27\u3002\u8fd9\u4e8b\u6211\u89c1\u8fc7\u592a\u591a\u56e2\u961f\u683d\u8fdb\u53bb\u3002\u9009\u62e9\u6e32\u67d3\u540e\u7aef\u4e0d\u662f\u770b\u54ea\u4e2a\"\u73b0\u4ee3\"&#xff0c;\u800c\u662f\u770b\u6570\u636e\u89c4\u6a21\u3002 \u5f53\u53ef\u89c6\u5316\u56fe\u8868\u9700\u8981\u540c\u65f6\u7ed8\u5236\u4e0a\u5343\u751a\u81f3\u4e0a\u4e07\u4e2a\u6570\u636e\u70b9&amp;#xff0","og_url":"https:\/\/www.wsisp.com\/helps\/87135.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-29T13:16:35+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/87135.html","url":"https:\/\/www.wsisp.com\/helps\/87135.html","name":"\u6570\u636e\u53ef\u89c6\u5316\u6e32\u67d3\u7ba1\u7ebf\uff1aCanvas \u4e0e SVG \u7684\u53d6\u820d\u53ca\u6d77\u91cf\u70b9\u9635\u4f18\u5316 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-29T13:16:35+00:00","dateModified":"2026-07-29T13:16:35+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/87135.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/87135.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/87135.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u6570\u636e\u53ef\u89c6\u5316\u6e32\u67d3\u7ba1\u7ebf\uff1aCanvas \u4e0e SVG \u7684\u53d6\u820d\u53ca\u6d77\u91cf\u70b9\u9635\u4f18\u5316"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/87135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=87135"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/87135\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=87135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=87135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=87135"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=87135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}