@visactor/vrender 0.13.5 → 0.13.6
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/cjs/common/render-curve.js +1 -0
- package/cjs/common/render-curve.js.map +1 -1
- package/cjs/graphic/graphic-service/graphic-service.js +5 -1
- package/cjs/graphic/graphic-service/graphic-service.js.map +1 -1
- package/cjs/graphic/wrap-text.js +5 -1
- package/cjs/graphic/wrap-text.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/render/contributions/render/arc-render.js +4 -4
- package/cjs/render/contributions/render/arc-render.js.map +1 -1
- package/cjs/render/contributions/render/arc3d-render.js +3 -3
- package/cjs/render/contributions/render/arc3d-render.js.map +1 -1
- package/cjs/render/contributions/render/area-render.js +3 -2
- package/cjs/render/contributions/render/area-render.js.map +1 -1
- package/cjs/render/contributions/render/circle-render.js +3 -3
- package/cjs/render/contributions/render/circle-render.js.map +1 -1
- package/cjs/render/contributions/render/group-render.js +4 -3
- package/cjs/render/contributions/render/group-render.js.map +1 -1
- package/cjs/render/contributions/render/image-render.js +1 -1
- package/cjs/render/contributions/render/image-render.js.map +1 -1
- package/cjs/render/contributions/render/incremental-area-render.js +1 -1
- package/cjs/render/contributions/render/incremental-area-render.js.map +1 -1
- package/cjs/render/contributions/render/incremental-line-render.js +1 -1
- package/cjs/render/contributions/render/incremental-line-render.js.map +1 -1
- package/cjs/render/contributions/render/line-render.js +2 -1
- package/cjs/render/contributions/render/line-render.js.map +1 -1
- package/cjs/render/contributions/render/path-render.js +3 -3
- package/cjs/render/contributions/render/path-render.js.map +1 -1
- package/cjs/render/contributions/render/polygon-render.js +3 -3
- package/cjs/render/contributions/render/polygon-render.js.map +1 -1
- package/cjs/render/contributions/render/pyramid3d-render.js +1 -1
- package/cjs/render/contributions/render/pyramid3d-render.js.map +1 -1
- package/cjs/render/contributions/render/rect-render.js +4 -3
- package/cjs/render/contributions/render/rect-render.js.map +1 -1
- package/cjs/render/contributions/render/rect3d-render.js +2 -1
- package/cjs/render/contributions/render/rect3d-render.js.map +1 -1
- package/cjs/render/contributions/render/richtext-render.js +1 -1
- package/cjs/render/contributions/render/richtext-render.js.map +1 -1
- package/cjs/render/contributions/render/symbol-render.js +3 -3
- package/cjs/render/contributions/render/symbol-render.js.map +1 -1
- package/cjs/render/contributions/render/text-render.js +1 -1
- package/cjs/render/contributions/render/text-render.js.map +1 -1
- package/cjs/render/contributions/render/utils.d.ts +3 -3
- package/cjs/render/contributions/render/utils.js +7 -7
- package/cjs/render/contributions/render/utils.js.map +1 -1
- package/dist/index.js +70 -45
- package/dist/index.min.js +1 -1
- package/es/common/render-curve.js +1 -0
- package/es/common/render-curve.js.map +1 -1
- package/es/graphic/graphic-service/graphic-service.js +5 -1
- package/es/graphic/graphic-service/graphic-service.js.map +1 -1
- package/es/graphic/wrap-text.js +5 -1
- package/es/graphic/wrap-text.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/render/contributions/render/arc-render.js +3 -3
- package/es/render/contributions/render/arc-render.js.map +1 -1
- package/es/render/contributions/render/arc3d-render.js +2 -2
- package/es/render/contributions/render/arc3d-render.js.map +1 -1
- package/es/render/contributions/render/area-render.js +2 -1
- package/es/render/contributions/render/area-render.js.map +1 -1
- package/es/render/contributions/render/circle-render.js +2 -2
- package/es/render/contributions/render/circle-render.js.map +1 -1
- package/es/render/contributions/render/group-render.js +2 -2
- package/es/render/contributions/render/group-render.js.map +1 -1
- package/es/render/contributions/render/image-render.js +1 -1
- package/es/render/contributions/render/image-render.js.map +1 -1
- package/es/render/contributions/render/incremental-area-render.js +1 -1
- package/es/render/contributions/render/incremental-area-render.js.map +1 -1
- package/es/render/contributions/render/incremental-line-render.js +1 -1
- package/es/render/contributions/render/incremental-line-render.js.map +1 -1
- package/es/render/contributions/render/line-render.js +2 -1
- package/es/render/contributions/render/line-render.js.map +1 -1
- package/es/render/contributions/render/path-render.js +2 -2
- package/es/render/contributions/render/path-render.js.map +1 -1
- package/es/render/contributions/render/polygon-render.js +2 -2
- package/es/render/contributions/render/polygon-render.js.map +1 -1
- package/es/render/contributions/render/pyramid3d-render.js +1 -1
- package/es/render/contributions/render/pyramid3d-render.js.map +1 -1
- package/es/render/contributions/render/rect-render.js +2 -2
- package/es/render/contributions/render/rect-render.js.map +1 -1
- package/es/render/contributions/render/rect3d-render.js +1 -1
- package/es/render/contributions/render/rect3d-render.js.map +1 -1
- package/es/render/contributions/render/richtext-render.js +1 -1
- package/es/render/contributions/render/richtext-render.js.map +1 -1
- package/es/render/contributions/render/symbol-render.js +2 -2
- package/es/render/contributions/render/symbol-render.js.map +1 -1
- package/es/render/contributions/render/text-render.js +1 -1
- package/es/render/contributions/render/text-render.js.map +1 -1
- package/es/render/contributions/render/utils.d.ts +3 -3
- package/es/render/contributions/render/utils.js +7 -7
- package/es/render/contributions/render/utils.js.map +1 -1
- package/es/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/render/contributions/render/utils.ts"],"names":[],"mappings":";;;AAAA,6CAAoG;AACpG,6EAAwE;AACxE,kDAAkD;AAoBlD,SAAgB,OAAO,CAAC,IAAe;IACrC,OAAO,CAAC,CAAC,IAAI,CAAC;AAChB,CAAC;AAFD,0BAEC;AAMD,SAAgB,SAAS,CAAC,MAAmC,EAAE,SAAiB;IAC9E,IAAI,CAAmB,CAAC;IACxB,IAAI,IAAA,gBAAO,EAAC,MAAM,CAAC,EAAE;QACnB,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,IAAI,KAAK,SAAS,CAAC,CAAC;KACrD;SAAM;QACL,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;KACd;IACD,OAAO,CAAC,IAAI,SAAS,GAAG,CAAC,CAAC;AAC5B,CAAC;AARD,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EAAE,aAAa,EAAE,eAAe,EAAE,SAAS,CAAC,CAAC;aAC7E;iBAAM;gBACL,OAAO,CAAC,MAAM,CAAC,EAAE,GAAG,WAAW,GAAG,IAAA,YAAG,EAAC,eAAe,CAAC,EAAE,EAAE,GAAG,WAAW,GAAG,IAAA,YAAG,EAAC,eAAe,CAAC,CAAC,CAAC;aAClG;SACF;KACF;IAED,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,CAAC,SAAS,EAAE,CAAC;KACrB;SAAM,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE;QACxB,OAAO,CAAC,MAAM,CAAC,EAAE,GAAG,WAAW,GAAG,IAAA,YAAG,EAAC,QAAQ,CAAC,EAAE,EAAE,GAAG,WAAW,GAAG,IAAA,YAAG,EAAC,QAAQ,CAAC,CAAC,CAAC;KACpF;IAED,OAAO,eAAe,CAAC;AACzB,CAAC;AA1PD,kCA0PC","file":"utils.js","sourcesContent":["import { isArray, abs, acos, atan2, cos, epsilon, min, pi, sin, sqrt, pi2 } from '@visactor/vutils';\nimport { renderCommandList } from '../../../common/render-command-list';\nimport { getTheme } from '../../../graphic/theme';\nimport type {\n IGraphicAttribute,\n IContext2d,\n IGraphic,\n IMarkAttribute,\n IThemeAttribute,\n IFillType,\n IStrokeType,\n IArc,\n IPath2D,\n IGraphicRenderDrawParams,\n IDrawContext\n} from '../../../interface';\n\n/**\n * 是否需要执行fill逻辑\n * @param fill\n * @returns\n */\nexport function runFill(fill: IFillType) {\n return !!fill;\n}\n/**\n * 是否需要执行stroke逻辑\n * @param stroke\n * @returns\n */\nexport function runStroke(stroke: IStrokeType | IStrokeType[], lineWidth: number) {\n let s: boolean | number;\n if (isArray(stroke)) {\n s = stroke.some(item => item || item === undefined);\n } else {\n s = !!stroke;\n }\n return s && lineWidth > 0;\n}\n\n/**\n * 是否fill部分可见\n * @param opacity\n * @param fillOpacity\n * @returns\n */\nexport function fillVisible(opacity: number, fillOpacity: number) {\n return opacity * fillOpacity > 0;\n}\n\nexport function rectFillVisible(opacity: number, fillOpacity: number, width: number, height: number) {\n return opacity * fillOpacity > 0 && width > 0 && height > 0;\n}\n\n/**\n * 是否stroke部分可见\n * @param opacity\n * @param strokeOpacity\n * @param lineWidth\n * @returns\n */\nexport function strokeVisible(opacity: number, strokeOpacity: number) {\n return opacity * strokeOpacity > 0;\n}\n\nexport function rectStrokeVisible(opacity: number, strokeOpacity: number, width: number, height: number) {\n return opacity * strokeOpacity > 0 && width > 0 && height > 0;\n}\n\nexport function drawPathProxy(\n graphic: IGraphic,\n context: IContext2d,\n x: number,\n y: number,\n drawContext: IDrawContext,\n params?: IGraphicRenderDrawParams,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n) {\n if (!graphic.pathProxy) {\n return false;\n }\n\n const themeAttributes = getTheme(graphic, params?.theme)[graphic.type];\n\n const {\n fill = themeAttributes.fill,\n stroke = themeAttributes.stroke,\n opacity = themeAttributes.opacity,\n fillOpacity = themeAttributes.fillOpacity,\n lineWidth = themeAttributes.lineWidth,\n strokeOpacity = themeAttributes.strokeOpacity,\n visible = themeAttributes.visible\n } = graphic.attribute;\n // 不绘制或者透明\n const fVisible = fillVisible(opacity, fillOpacity);\n const sVisible = strokeVisible(opacity, strokeOpacity);\n const doFill = runFill(fill);\n const doStroke = runStroke(stroke, lineWidth);\n\n if (!visible) {\n return true;\n }\n\n if (!(doFill || doStroke)) {\n return true;\n }\n\n // 如果存在fillCb和strokeCb,那就不直接跳过\n if (!(fVisible || sVisible || fillCb || strokeCb)) {\n return true;\n }\n\n context.beginPath();\n const path = typeof graphic.pathProxy === 'function' ? graphic.pathProxy(graphic.attribute) : graphic.pathProxy;\n renderCommandList(path.commandList, context, x, y);\n\n // shadow\n context.setShadowStyle && context.setShadowStyle(graphic, graphic.attribute, themeAttributes);\n\n if (doStroke) {\n if (strokeCb) {\n strokeCb(context, graphic.attribute, themeAttributes);\n } else if (sVisible) {\n context.setStrokeStyle(graphic, graphic.attribute, x, y, themeAttributes);\n context.stroke();\n }\n }\n if (doFill) {\n if (fillCb) {\n fillCb(context, graphic.attribute, themeAttributes);\n } else if (fVisible) {\n context.setCommonStyle(graphic, graphic.attribute, x, y, themeAttributes);\n context.fill();\n }\n }\n return true;\n}\n\n/**\n * 部分源码参考 https://github.com/d3/d3-shape/\n * Copyright 2010-2022 Mike Bostock\n\n Permission to use, copy, modify, and/or distribute this software for any purpose\n with or without fee is hereby granted, provided that the above copyright notice\n and this permission notice appear in all copies.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS\n OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\n TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\n THIS SOFTWARE.\n */\n\n// 基于d3-shape\n// https://github.com/d3/d3-shape/blob/main/src/arc.js\nexport function intersect(\n x0: number,\n y0: number,\n x1: number,\n y1: number,\n x2: number,\n y2: number,\n x3: number,\n y3: number\n) {\n const x10 = x1 - x0;\n const y10 = y1 - y0;\n const x32 = x3 - x2;\n const y32 = y3 - y2;\n let t = y32 * x10 - x32 * y10;\n if (t * t < epsilon) {\n return [];\n }\n t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n\n return [x0 + t * x10, y0 + t * y10];\n}\n\n// 基于d3-shape\n// https://github.com/d3/d3-shape/blob/main/src/arc.js\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nexport function cornerTangents(\n x0: number,\n y0: number,\n x1: number,\n y1: number,\n r1: number,\n rc: number,\n clockwise: number\n) {\n const x01 = x0 - x1;\n const y01 = y0 - y1;\n const lo = (clockwise ? rc : -rc) / Math.sqrt(x01 * x01 + y01 * y01);\n const ox = lo * y01;\n const oy = -lo * x01;\n const x11 = x0 + ox;\n const y11 = y0 + oy;\n const x10 = x1 + ox;\n const y10 = y1 + oy;\n const x00 = (x11 + x10) / 2;\n const y00 = (y11 + y10) / 2;\n const dx = x10 - x11;\n const dy = y10 - y11;\n const d2 = dx * dx + dy * dy;\n const r = r1 - rc;\n const D = x11 * y10 - x10 * y11;\n const d = (dy < 0 ? -1 : 1) * Math.sqrt(Math.max(0, r * r * d2 - D * D));\n let cx0 = (D * dy - dx * d) / d2;\n let cy0 = (-D * dx - dy * d) / d2;\n const cx1 = (D * dy + dx * d) / d2;\n const cy1 = (-D * dx + dy * d) / d2;\n const dx0 = cx0 - x00;\n const dy0 = cy0 - y00;\n const dx1 = cx1 - x00;\n const dy1 = cy1 - y00;\n\n // Pick the closer of the two intersection points.\n // TODO Is there a faster way to determine which intersection to use?\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) {\n (cx0 = cx1), (cy0 = cy1);\n }\n\n return {\n cx: cx0,\n cy: cy0,\n x01: -ox,\n y01: -oy,\n x11: cx0 * (r1 / r - 1),\n y11: cy0 * (r1 / r - 1)\n };\n}\n\n// 基于d3-shape\n// https://github.com/d3/d3-shape/blob/main/src/arc.js\nexport function drawArcPath(\n arc: IArc,\n context: IContext2d | IPath2D,\n cx: number,\n cy: number,\n outerRadius: number,\n innerRadius: number,\n partStroke?: (boolean | string)[]\n) {\n const { startAngle, endAngle } = arc.getParsedAngle();\n\n const deltaAngle = abs(endAngle - startAngle);\n const clockwise: boolean = endAngle > startAngle;\n let collapsedToLine: boolean = false;\n // 规范化outerRadius和innerRadius\n if (outerRadius < innerRadius) {\n const temp = outerRadius;\n outerRadius = innerRadius;\n innerRadius = temp;\n }\n // Is it a point?\n if (outerRadius <= epsilon) {\n context.moveTo(cx, cy);\n } else if (deltaAngle >= pi2 - epsilon) {\n // 是个完整的圆环\n // Or is it a circle or annulus?\n context.moveTo(cx + outerRadius * cos(startAngle), cy + outerRadius * sin(startAngle));\n context.arc(cx, cy, outerRadius, startAngle, endAngle, !clockwise);\n if (innerRadius > epsilon) {\n context.moveTo(cx + innerRadius * cos(endAngle), cy + innerRadius * sin(endAngle));\n context.arc(cx, cy, innerRadius, endAngle, startAngle, clockwise);\n }\n } else {\n const cornerRadius = arc.getParsedCornerRadius();\n // Or is it a circular or annular sector?\n const { outerDeltaAngle, innerDeltaAngle, outerStartAngle, outerEndAngle, innerEndAngle, innerStartAngle } =\n arc.getParsePadAngle(startAngle, endAngle);\n\n const outerCornerRadiusStart = cornerRadius;\n const outerCornerRadiusEnd = cornerRadius;\n const innerCornerRadiusEnd = cornerRadius;\n const innerCornerRadiusStart = cornerRadius;\n const maxOuterCornerRadius = Math.max(outerCornerRadiusEnd, outerCornerRadiusStart);\n const maxInnerCornerRadius = Math.max(innerCornerRadiusEnd, innerCornerRadiusStart);\n let limitedOcr = maxOuterCornerRadius;\n let limitedIcr = maxInnerCornerRadius;\n\n const xors = outerRadius * cos(outerStartAngle);\n const yors = outerRadius * sin(outerStartAngle);\n const xire = innerRadius * cos(innerEndAngle);\n const yire = innerRadius * sin(innerEndAngle);\n\n // Apply rounded corners?\n let xore: number;\n let yore: number;\n let xirs: number;\n let yirs: number;\n\n if (maxInnerCornerRadius > epsilon || maxOuterCornerRadius > epsilon) {\n xore = outerRadius * cos(outerEndAngle);\n yore = outerRadius * sin(outerEndAngle);\n xirs = innerRadius * cos(innerStartAngle);\n yirs = innerRadius * sin(innerStartAngle);\n\n // Restrict the corner radius according to the sector angle.\n if (deltaAngle < pi) {\n const oc = intersect(xors, yors, xirs, yirs, xore, yore, xire, yire);\n\n if (oc) {\n const ax = xors - oc[0];\n const ay = yors - oc[1];\n const bx = xore - oc[0];\n const by = yore - oc[1];\n const kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2);\n const lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n\n limitedIcr = min(maxInnerCornerRadius, (innerRadius - lc) / (kc - 1));\n limitedOcr = min(maxOuterCornerRadius, (outerRadius - lc) / (kc + 1));\n }\n }\n }\n\n // Is the sector collapsed to a line?\n // 角度过小,会将acr处理为圆心到半径的一条线\n if (outerDeltaAngle < 0.001) {\n // 如果有左右边的话\n if (partStroke && (partStroke[3] || partStroke[1])) {\n context.moveTo(cx + xors, cy + yors);\n }\n collapsedToLine = true;\n } else if (limitedOcr > epsilon) {\n const cornerRadiusStart = min(outerCornerRadiusStart, limitedOcr);\n const cornerRadiusEnd = min(outerCornerRadiusEnd, limitedOcr);\n // Does the sector’s outer ring have rounded corners?\n const t0 = cornerTangents(xirs, yirs, xors, yors, outerRadius, cornerRadiusStart, Number(clockwise));\n const t1 = cornerTangents(xore, yore, xire, yire, outerRadius, cornerRadiusEnd, Number(clockwise));\n\n // Have the corners merged?\n if (limitedOcr < maxOuterCornerRadius && cornerRadiusStart === cornerRadiusEnd) {\n if (!partStroke || partStroke[0]) {\n context.moveTo(cx + t0.cx + t0.x01, cy + t0.cy + t0.y01);\n context.arc(cx + t0.cx, cy + t0.cy, limitedOcr, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !clockwise);\n } else {\n context.moveTo(\n cx + t0.cx + limitedOcr * cos(atan2(t1.y01, t1.x01)),\n cy + t0.cy + limitedOcr * sin(atan2(t1.y01, t1.x01))\n );\n }\n } else {\n // Otherwise, draw the two corners and the ring.\n if (!partStroke || partStroke[0]) {\n context.moveTo(cx + t0.cx + t0.x01, cy + t0.cy + t0.y01);\n cornerRadiusStart > 0 &&\n context.arc(\n cx + t0.cx,\n cy + t0.cy,\n cornerRadiusStart,\n atan2(t0.y01, t0.x01),\n atan2(t0.y11, t0.x11),\n !clockwise\n );\n context.arc(\n cx,\n cy,\n outerRadius,\n atan2(t0.cy + t0.y11, t0.cx + t0.x11),\n atan2(t1.cy + t1.y11, t1.cx + t1.x11),\n !clockwise\n );\n cornerRadiusEnd > 0 &&\n context.arc(\n cx + t1.cx,\n cy + t1.cy,\n cornerRadiusEnd,\n atan2(t1.y11, t1.x11),\n atan2(t1.y01, t1.x01),\n !clockwise\n );\n } else {\n if (cornerRadiusEnd > 0) {\n context.moveTo(\n cx + t1.cx + cornerRadiusEnd * cos(atan2(t1.y01, t1.x01)),\n cy + t1.cy + cornerRadiusEnd * sin(atan2(t1.y01, t1.x01))\n );\n } else {\n context.moveTo(cx + xore, cy + outerRadius * sin(outerEndAngle));\n }\n }\n }\n } else {\n // Or is the outer ring just a circular arc?\n if (!partStroke || partStroke[0]) {\n context.moveTo(cx + xors, cy + yors);\n context.arc(cx, cy, outerRadius, outerStartAngle, outerEndAngle, !clockwise);\n } else {\n // context.moveTo(cx + outerRadius * cos(outerEndAngle), cy + yore);\n }\n }\n // Is there no inner ring, and it’s a circular sector?\n // Or perhaps it’s an annular sector collapsed due to padding?\n if (!(innerRadius > epsilon) || innerDeltaAngle < 0.001) {\n if (!partStroke || partStroke[1]) {\n context.lineTo(cx + xire, cy + yire);\n } else {\n context.moveTo(cx + xire, cy + yire);\n }\n collapsedToLine = true;\n } else if (limitedIcr > epsilon) {\n const cornerRadiusStart = min(innerCornerRadiusStart, limitedIcr);\n const cornerRadiusEnd = min(innerCornerRadiusEnd, limitedIcr);\n // Does the sector’s inner ring (or point) have rounded corners?\n const t0 = cornerTangents(xire, yire, xore, yore, innerRadius, -cornerRadiusEnd, Number(clockwise));\n const t1 = cornerTangents(xors, yors, xirs, yirs, innerRadius, -cornerRadiusStart, Number(clockwise));\n\n if (!partStroke || partStroke[1]) {\n context.lineTo(cx + t0.cx + t0.x01, cy + t0.cy + t0.y01);\n } else {\n context.moveTo(cx + t0.cx + t0.x01, cy + t0.cy + t0.y01);\n }\n\n // Have the corners merged?\n if (limitedIcr < maxInnerCornerRadius && cornerRadiusStart === cornerRadiusEnd) {\n const arcEndAngle = atan2(t1.y01, t1.x01);\n if (!partStroke || partStroke[2]) {\n context.arc(cx + t0.cx, cy + t0.cy, limitedIcr, atan2(t0.y01, t0.x01), arcEndAngle, !clockwise);\n } else {\n context.moveTo(cx + t0.cx + cos(arcEndAngle), cy + t0.cy + sin(arcEndAngle));\n }\n } else {\n // Otherwise, draw the two corners and the ring.\n if (!partStroke || partStroke[2]) {\n cornerRadiusEnd > 0 &&\n context.arc(\n cx + t0.cx,\n cy + t0.cy,\n cornerRadiusEnd,\n atan2(t0.y01, t0.x01),\n atan2(t0.y11, t0.x11),\n !clockwise\n );\n context.arc(\n cx,\n cy,\n innerRadius,\n atan2(t0.cy + t0.y11, t0.cx + t0.x11),\n atan2(t1.cy + t1.y11, t1.cx + t1.x11),\n clockwise\n );\n cornerRadiusStart > 0 &&\n context.arc(\n cx + t1.cx,\n cy + t1.cy,\n cornerRadiusStart,\n atan2(t1.y11, t1.x11),\n atan2(t1.y01, t1.x01),\n !clockwise\n );\n } else {\n if (cornerRadiusStart > 0) {\n context.moveTo(\n cx + t1.cx + cornerRadiusStart * cos(atan2(t1.y01, t1.x01)),\n cy + t1.cy + cornerRadiusStart * sin(atan2(t1.y01, t1.x01))\n );\n } else {\n context.moveTo(cx + xirs, cy + yirs);\n }\n }\n }\n } else {\n // Or is the inner ring just a circular arc?\n if (!partStroke || partStroke[1]) {\n context.lineTo(cx + xire, cy + yire);\n } else {\n context.moveTo(cx + xire, cy + yire);\n }\n if (!partStroke || partStroke[2]) {\n context.arc(cx, cy, innerRadius, innerEndAngle, innerStartAngle, clockwise);\n } else {\n context.moveTo(cx + innerRadius * cos(innerStartAngle), cy + innerRadius * sin(innerStartAngle));\n }\n }\n }\n\n if (!partStroke) {\n context.closePath();\n } else if (partStroke[3]) {\n context.lineTo(cx + outerRadius * cos(endAngle), cy + outerRadius * cos(endAngle));\n }\n\n return collapsedToLine;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/render/contributions/render/utils.ts"],"names":[],"mappings":";;;AAAA,6CAAoG;AACpG,6EAAwE;AACxE,kDAAkD;AAoBlD,SAAgB,OAAO,CAAC,IAAe,EAAE,UAA0D;IACjG,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI,UAAU,CAAC,CAAC;AAChC,CAAC;AAFD,0BAEC;AAMD,SAAgB,SAAS,CAAC,MAAmC,EAAE,SAAiB;IAC9E,IAAI,CAAmB,CAAC;IACxB,IAAI,IAAA,gBAAO,EAAC,MAAM,CAAC,EAAE;QACnB,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,IAAI,KAAK,SAAS,CAAC,CAAC;KACrD;SAAM;QACL,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;KACd;IACD,OAAO,CAAC,IAAI,SAAS,GAAG,CAAC,CAAC;AAC5B,CAAC;AARD,8BAQC;AAQD,SAAgB,WAAW,CAAC,OAAe,EAAE,WAAmB,EAAE,IAAe;IAC/E,OAAO,IAAI,IAAI,OAAO,GAAG,WAAW,GAAG,CAAC,CAAC;AAC3C,CAAC;AAFD,kCAEC;AAED,SAAgB,eAAe,CAAC,OAAe,EAAE,WAAmB,EAAE,KAAa,EAAE,MAAc,EAAE,IAAe;IAClH,OAAO,IAAI,IAAI,OAAO,GAAG,WAAW,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC;AACtE,CAAC;AAFD,0CAEC;AASD,SAAgB,aAAa,CAAC,OAAe,EAAE,aAAqB;IAClE,OAAO,OAAO,GAAG,aAAa,GAAG,CAAC,CAAC;AACrC,CAAC;AAFD,sCAEC;AAED,SAAgB,iBAAiB,CAAC,OAAe,EAAE,aAAqB,EAAE,KAAa,EAAE,MAAc;IACrG,OA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CAAC;KACpF;IAED,OAAO,eAAe,CAAC;AACzB,CAAC;AA1PD,kCA0PC","file":"utils.js","sourcesContent":["import { isArray, abs, acos, atan2, cos, epsilon, min, pi, sin, sqrt, pi2 } from '@visactor/vutils';\nimport { renderCommandList } from '../../../common/render-command-list';\nimport { getTheme } from '../../../graphic/theme';\nimport type {\n IGraphicAttribute,\n IContext2d,\n IGraphic,\n IMarkAttribute,\n IThemeAttribute,\n IFillType,\n IStrokeType,\n IArc,\n IPath2D,\n IGraphicRenderDrawParams,\n IDrawContext\n} from '../../../interface';\n\n/**\n * 是否需要执行fill逻辑\n * @param fill\n * @returns\n */\nexport function runFill(fill: IFillType, background?: string | HTMLImageElement | HTMLCanvasElement) {\n return !!(fill || background);\n}\n/**\n * 是否需要执行stroke逻辑\n * @param stroke\n * @returns\n */\nexport function runStroke(stroke: IStrokeType | IStrokeType[], lineWidth: number) {\n let s: boolean | number;\n if (isArray(stroke)) {\n s = stroke.some(item => item || item === undefined);\n } else {\n s = !!stroke;\n }\n return s && lineWidth > 0;\n}\n\n/**\n * 是否fill部分可见\n * @param opacity\n * @param fillOpacity\n * @returns\n */\nexport function fillVisible(opacity: number, fillOpacity: number, fill: IFillType) {\n return fill && opacity * fillOpacity > 0;\n}\n\nexport function rectFillVisible(opacity: number, fillOpacity: number, width: number, height: number, fill: IFillType) {\n return fill && opacity * fillOpacity > 0 && width > 0 && height > 0;\n}\n\n/**\n * 是否stroke部分可见\n * @param opacity\n * @param strokeOpacity\n * @param lineWidth\n * @returns\n */\nexport function strokeVisible(opacity: number, strokeOpacity: number) {\n return opacity * strokeOpacity > 0;\n}\n\nexport function rectStrokeVisible(opacity: number, strokeOpacity: number, width: number, height: number) {\n return opacity * strokeOpacity > 0 && width > 0 && height > 0;\n}\n\nexport function drawPathProxy(\n graphic: IGraphic,\n context: IContext2d,\n x: number,\n y: number,\n drawContext: IDrawContext,\n params?: IGraphicRenderDrawParams,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n) {\n if (!graphic.pathProxy) {\n return false;\n }\n\n const themeAttributes = getTheme(graphic, params?.theme)[graphic.type];\n\n const {\n fill = themeAttributes.fill,\n stroke = themeAttributes.stroke,\n opacity = themeAttributes.opacity,\n fillOpacity = themeAttributes.fillOpacity,\n lineWidth = themeAttributes.lineWidth,\n strokeOpacity = themeAttributes.strokeOpacity,\n visible = themeAttributes.visible\n } = graphic.attribute;\n // 不绘制或者透明\n const fVisible = fillVisible(opacity, fillOpacity, fill);\n const sVisible = strokeVisible(opacity, strokeOpacity);\n const doFill = runFill(fill);\n const doStroke = runStroke(stroke, lineWidth);\n\n if (!visible) {\n return true;\n }\n\n if (!(doFill || doStroke)) {\n return true;\n }\n\n // 如果存在fillCb和strokeCb,那就不直接跳过\n if (!(fVisible || sVisible || fillCb || strokeCb)) {\n return true;\n }\n\n context.beginPath();\n const path = typeof graphic.pathProxy === 'function' ? graphic.pathProxy(graphic.attribute) : graphic.pathProxy;\n renderCommandList(path.commandList, context, x, y);\n\n // shadow\n context.setShadowStyle && context.setShadowStyle(graphic, graphic.attribute, themeAttributes);\n\n if (doStroke) {\n if (strokeCb) {\n strokeCb(context, graphic.attribute, themeAttributes);\n } else if (sVisible) {\n context.setStrokeStyle(graphic, graphic.attribute, x, y, themeAttributes);\n context.stroke();\n }\n }\n if (doFill) {\n if (fillCb) {\n fillCb(context, graphic.attribute, themeAttributes);\n } else if (fVisible) {\n context.setCommonStyle(graphic, graphic.attribute, x, y, themeAttributes);\n context.fill();\n }\n }\n return true;\n}\n\n/**\n * 部分源码参考 https://github.com/d3/d3-shape/\n * Copyright 2010-2022 Mike Bostock\n\n Permission to use, copy, modify, and/or distribute this software for any purpose\n with or without fee is hereby granted, provided that the above copyright notice\n and this permission notice appear in all copies.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS\n OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\n TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\n THIS SOFTWARE.\n */\n\n// 基于d3-shape\n// https://github.com/d3/d3-shape/blob/main/src/arc.js\nexport function intersect(\n x0: number,\n y0: number,\n x1: number,\n y1: number,\n x2: number,\n y2: number,\n x3: number,\n y3: number\n) {\n const x10 = x1 - x0;\n const y10 = y1 - y0;\n const x32 = x3 - x2;\n const y32 = y3 - y2;\n let t = y32 * x10 - x32 * y10;\n if (t * t < epsilon) {\n return [];\n }\n t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n\n return [x0 + t * x10, y0 + t * y10];\n}\n\n// 基于d3-shape\n// https://github.com/d3/d3-shape/blob/main/src/arc.js\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nexport function cornerTangents(\n x0: number,\n y0: number,\n x1: number,\n y1: number,\n r1: number,\n rc: number,\n clockwise: number\n) {\n const x01 = x0 - x1;\n const y01 = y0 - y1;\n const lo = (clockwise ? rc : -rc) / Math.sqrt(x01 * x01 + y01 * y01);\n const ox = lo * y01;\n const oy = -lo * x01;\n const x11 = x0 + ox;\n const y11 = y0 + oy;\n const x10 = x1 + ox;\n const y10 = y1 + oy;\n const x00 = (x11 + x10) / 2;\n const y00 = (y11 + y10) / 2;\n const dx = x10 - x11;\n const dy = y10 - y11;\n const d2 = dx * dx + dy * dy;\n const r = r1 - rc;\n const D = x11 * y10 - x10 * y11;\n const d = (dy < 0 ? -1 : 1) * Math.sqrt(Math.max(0, r * r * d2 - D * D));\n let cx0 = (D * dy - dx * d) / d2;\n let cy0 = (-D * dx - dy * d) / d2;\n const cx1 = (D * dy + dx * d) / d2;\n const cy1 = (-D * dx + dy * d) / d2;\n const dx0 = cx0 - x00;\n const dy0 = cy0 - y00;\n const dx1 = cx1 - x00;\n const dy1 = cy1 - y00;\n\n // Pick the closer of the two intersection points.\n // TODO Is there a faster way to determine which intersection to use?\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) {\n (cx0 = cx1), (cy0 = cy1);\n }\n\n return {\n cx: cx0,\n cy: cy0,\n x01: -ox,\n y01: -oy,\n x11: cx0 * (r1 / r - 1),\n y11: cy0 * (r1 / r - 1)\n };\n}\n\n// 基于d3-shape\n// https://github.com/d3/d3-shape/blob/main/src/arc.js\nexport function drawArcPath(\n arc: IArc,\n context: IContext2d | IPath2D,\n cx: number,\n cy: number,\n outerRadius: number,\n innerRadius: number,\n partStroke?: (boolean | string)[]\n) {\n const { startAngle, endAngle } = arc.getParsedAngle();\n\n const deltaAngle = abs(endAngle - startAngle);\n const clockwise: boolean = endAngle > startAngle;\n let collapsedToLine: boolean = false;\n // 规范化outerRadius和innerRadius\n if (outerRadius < innerRadius) {\n const temp = outerRadius;\n outerRadius = innerRadius;\n innerRadius = temp;\n }\n // Is it a point?\n if (outerRadius <= epsilon) {\n context.moveTo(cx, cy);\n } else if (deltaAngle >= pi2 - epsilon) {\n // 是个完整的圆环\n // Or is it a circle or annulus?\n context.moveTo(cx + outerRadius * cos(startAngle), cy + outerRadius * sin(startAngle));\n context.arc(cx, cy, outerRadius, startAngle, endAngle, !clockwise);\n if (innerRadius > epsilon) {\n context.moveTo(cx + innerRadius * cos(endAngle), cy + innerRadius * sin(endAngle));\n context.arc(cx, cy, innerRadius, endAngle, startAngle, clockwise);\n }\n } else {\n const cornerRadius = arc.getParsedCornerRadius();\n // Or is it a circular or annular sector?\n const { outerDeltaAngle, innerDeltaAngle, outerStartAngle, outerEndAngle, innerEndAngle, innerStartAngle } =\n arc.getParsePadAngle(startAngle, endAngle);\n\n const outerCornerRadiusStart = cornerRadius;\n const outerCornerRadiusEnd = cornerRadius;\n const innerCornerRadiusEnd = cornerRadius;\n const innerCornerRadiusStart = cornerRadius;\n const maxOuterCornerRadius = Math.max(outerCornerRadiusEnd, outerCornerRadiusStart);\n const maxInnerCornerRadius = Math.max(innerCornerRadiusEnd, innerCornerRadiusStart);\n let limitedOcr = maxOuterCornerRadius;\n let limitedIcr = maxInnerCornerRadius;\n\n const xors = outerRadius * cos(outerStartAngle);\n const yors = outerRadius * sin(outerStartAngle);\n const xire = innerRadius * cos(innerEndAngle);\n const yire = innerRadius * sin(innerEndAngle);\n\n // Apply rounded corners?\n let xore: number;\n let yore: number;\n let xirs: number;\n let yirs: number;\n\n if (maxInnerCornerRadius > epsilon || maxOuterCornerRadius > epsilon) {\n xore = outerRadius * cos(outerEndAngle);\n yore = outerRadius * sin(outerEndAngle);\n xirs = innerRadius * cos(innerStartAngle);\n yirs = innerRadius * sin(innerStartAngle);\n\n // Restrict the corner radius according to the sector angle.\n if (deltaAngle < pi) {\n const oc = intersect(xors, yors, xirs, yirs, xore, yore, xire, yire);\n\n if (oc) {\n const ax = xors - oc[0];\n const ay = yors - oc[1];\n const bx = xore - oc[0];\n const by = yore - oc[1];\n const kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2);\n const lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n\n limitedIcr = min(maxInnerCornerRadius, (innerRadius - lc) / (kc - 1));\n limitedOcr = min(maxOuterCornerRadius, (outerRadius - lc) / (kc + 1));\n }\n }\n }\n\n // Is the sector collapsed to a line?\n // 角度过小,会将acr处理为圆心到半径的一条线\n if (outerDeltaAngle < 0.001) {\n // 如果有左右边的话\n if (partStroke && (partStroke[3] || partStroke[1])) {\n context.moveTo(cx + xors, cy + yors);\n }\n collapsedToLine = true;\n } else if (limitedOcr > epsilon) {\n const cornerRadiusStart = min(outerCornerRadiusStart, limitedOcr);\n const cornerRadiusEnd = min(outerCornerRadiusEnd, limitedOcr);\n // Does the sector’s outer ring have rounded corners?\n const t0 = cornerTangents(xirs, yirs, xors, yors, outerRadius, cornerRadiusStart, Number(clockwise));\n const t1 = cornerTangents(xore, yore, xire, yire, outerRadius, cornerRadiusEnd, Number(clockwise));\n\n // Have the corners merged?\n if (limitedOcr < maxOuterCornerRadius && cornerRadiusStart === cornerRadiusEnd) {\n if (!partStroke || partStroke[0]) {\n context.moveTo(cx + t0.cx + t0.x01, cy + t0.cy + t0.y01);\n context.arc(cx + t0.cx, cy + t0.cy, limitedOcr, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !clockwise);\n } else {\n context.moveTo(\n cx + t0.cx + limitedOcr * cos(atan2(t1.y01, t1.x01)),\n cy + t0.cy + limitedOcr * sin(atan2(t1.y01, t1.x01))\n );\n }\n } else {\n // Otherwise, draw the two corners and the ring.\n if (!partStroke || partStroke[0]) {\n context.moveTo(cx + t0.cx + t0.x01, cy + t0.cy + t0.y01);\n cornerRadiusStart > 0 &&\n context.arc(\n cx + t0.cx,\n cy + t0.cy,\n cornerRadiusStart,\n atan2(t0.y01, t0.x01),\n atan2(t0.y11, t0.x11),\n !clockwise\n );\n context.arc(\n cx,\n cy,\n outerRadius,\n atan2(t0.cy + t0.y11, t0.cx + t0.x11),\n atan2(t1.cy + t1.y11, t1.cx + t1.x11),\n !clockwise\n );\n cornerRadiusEnd > 0 &&\n context.arc(\n cx + t1.cx,\n cy + t1.cy,\n cornerRadiusEnd,\n atan2(t1.y11, t1.x11),\n atan2(t1.y01, t1.x01),\n !clockwise\n );\n } else {\n if (cornerRadiusEnd > 0) {\n context.moveTo(\n cx + t1.cx + cornerRadiusEnd * cos(atan2(t1.y01, t1.x01)),\n cy + t1.cy + cornerRadiusEnd * sin(atan2(t1.y01, t1.x01))\n );\n } else {\n context.moveTo(cx + xore, cy + outerRadius * sin(outerEndAngle));\n }\n }\n }\n } else {\n // Or is the outer ring just a circular arc?\n if (!partStroke || partStroke[0]) {\n context.moveTo(cx + xors, cy + yors);\n context.arc(cx, cy, outerRadius, outerStartAngle, outerEndAngle, !clockwise);\n } else {\n // context.moveTo(cx + outerRadius * cos(outerEndAngle), cy + yore);\n }\n }\n // Is there no inner ring, and it’s a circular sector?\n // Or perhaps it’s an annular sector collapsed due to padding?\n if (!(innerRadius > epsilon) || innerDeltaAngle < 0.001) {\n if (!partStroke || partStroke[1]) {\n context.lineTo(cx + xire, cy + yire);\n } else {\n context.moveTo(cx + xire, cy + yire);\n }\n collapsedToLine = true;\n } else if (limitedIcr > epsilon) {\n const cornerRadiusStart = min(innerCornerRadiusStart, limitedIcr);\n const cornerRadiusEnd = min(innerCornerRadiusEnd, limitedIcr);\n // Does the sector’s inner ring (or point) have rounded corners?\n const t0 = cornerTangents(xire, yire, xore, yore, innerRadius, -cornerRadiusEnd, Number(clockwise));\n const t1 = cornerTangents(xors, yors, xirs, yirs, innerRadius, -cornerRadiusStart, Number(clockwise));\n\n if (!partStroke || partStroke[1]) {\n context.lineTo(cx + t0.cx + t0.x01, cy + t0.cy + t0.y01);\n } else {\n context.moveTo(cx + t0.cx + t0.x01, cy + t0.cy + t0.y01);\n }\n\n // Have the corners merged?\n if (limitedIcr < maxInnerCornerRadius && cornerRadiusStart === cornerRadiusEnd) {\n const arcEndAngle = atan2(t1.y01, t1.x01);\n if (!partStroke || partStroke[2]) {\n context.arc(cx + t0.cx, cy + t0.cy, limitedIcr, atan2(t0.y01, t0.x01), arcEndAngle, !clockwise);\n } else {\n context.moveTo(cx + t0.cx + cos(arcEndAngle), cy + t0.cy + sin(arcEndAngle));\n }\n } else {\n // Otherwise, draw the two corners and the ring.\n if (!partStroke || partStroke[2]) {\n cornerRadiusEnd > 0 &&\n context.arc(\n cx + t0.cx,\n cy + t0.cy,\n cornerRadiusEnd,\n atan2(t0.y01, t0.x01),\n atan2(t0.y11, t0.x11),\n !clockwise\n );\n context.arc(\n cx,\n cy,\n innerRadius,\n atan2(t0.cy + t0.y11, t0.cx + t0.x11),\n atan2(t1.cy + t1.y11, t1.cx + t1.x11),\n clockwise\n );\n cornerRadiusStart > 0 &&\n context.arc(\n cx + t1.cx,\n cy + t1.cy,\n cornerRadiusStart,\n atan2(t1.y11, t1.x11),\n atan2(t1.y01, t1.x01),\n !clockwise\n );\n } else {\n if (cornerRadiusStart > 0) {\n context.moveTo(\n cx + t1.cx + cornerRadiusStart * cos(atan2(t1.y01, t1.x01)),\n cy + t1.cy + cornerRadiusStart * sin(atan2(t1.y01, t1.x01))\n );\n } else {\n context.moveTo(cx + xirs, cy + yirs);\n }\n }\n }\n } else {\n // Or is the inner ring just a circular arc?\n if (!partStroke || partStroke[1]) {\n context.lineTo(cx + xire, cy + yire);\n } else {\n context.moveTo(cx + xire, cy + yire);\n }\n if (!partStroke || partStroke[2]) {\n context.arc(cx, cy, innerRadius, innerEndAngle, innerStartAngle, clockwise);\n } else {\n context.moveTo(cx + innerRadius * cos(innerStartAngle), cy + innerRadius * sin(innerStartAngle));\n }\n }\n }\n\n if (!partStroke) {\n context.closePath();\n } else if (partStroke[3]) {\n context.lineTo(cx + outerRadius * cos(endAngle), cy + outerRadius * cos(endAngle));\n }\n\n return collapsedToLine;\n}\n"]}
|
package/dist/index.js
CHANGED
|
@@ -18490,8 +18490,8 @@
|
|
|
18490
18490
|
bind(LayerService).toService(exports.DefaultLayerService);
|
|
18491
18491
|
});
|
|
18492
18492
|
|
|
18493
|
-
function runFill(fill) {
|
|
18494
|
-
return !!fill;
|
|
18493
|
+
function runFill(fill, background) {
|
|
18494
|
+
return !!(fill || background);
|
|
18495
18495
|
}
|
|
18496
18496
|
function runStroke(stroke, lineWidth) {
|
|
18497
18497
|
let s;
|
|
@@ -18503,11 +18503,11 @@
|
|
|
18503
18503
|
}
|
|
18504
18504
|
return s && lineWidth > 0;
|
|
18505
18505
|
}
|
|
18506
|
-
function fillVisible(opacity, fillOpacity) {
|
|
18507
|
-
return opacity * fillOpacity > 0;
|
|
18506
|
+
function fillVisible(opacity, fillOpacity, fill) {
|
|
18507
|
+
return fill && opacity * fillOpacity > 0;
|
|
18508
18508
|
}
|
|
18509
|
-
function rectFillVisible(opacity, fillOpacity, width, height) {
|
|
18510
|
-
return opacity * fillOpacity > 0 && width > 0 && height > 0;
|
|
18509
|
+
function rectFillVisible(opacity, fillOpacity, width, height, fill) {
|
|
18510
|
+
return fill && opacity * fillOpacity > 0 && width > 0 && height > 0;
|
|
18511
18511
|
}
|
|
18512
18512
|
function strokeVisible(opacity, strokeOpacity) {
|
|
18513
18513
|
return opacity * strokeOpacity > 0;
|
|
@@ -18521,7 +18521,7 @@
|
|
|
18521
18521
|
}
|
|
18522
18522
|
const themeAttributes = getTheme(graphic, params?.theme)[graphic.type];
|
|
18523
18523
|
const { fill = themeAttributes.fill, stroke = themeAttributes.stroke, opacity = themeAttributes.opacity, fillOpacity = themeAttributes.fillOpacity, lineWidth = themeAttributes.lineWidth, strokeOpacity = themeAttributes.strokeOpacity, visible = themeAttributes.visible } = graphic.attribute;
|
|
18524
|
-
const fVisible = fillVisible(opacity, fillOpacity);
|
|
18524
|
+
const fVisible = fillVisible(opacity, fillOpacity, fill);
|
|
18525
18525
|
const sVisible = strokeVisible(opacity, strokeOpacity);
|
|
18526
18526
|
const doFill = runFill(fill);
|
|
18527
18527
|
const doStroke = runStroke(stroke, lineWidth);
|
|
@@ -19093,14 +19093,14 @@
|
|
|
19093
19093
|
drawShape(arc, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
19094
19094
|
const arcAttribute = getTheme(arc, params?.theme).arc;
|
|
19095
19095
|
const { fill = arcAttribute.fill, background, stroke = arcAttribute.stroke, opacity = arcAttribute.opacity, fillOpacity = arcAttribute.fillOpacity, lineWidth = arcAttribute.lineWidth, strokeOpacity = arcAttribute.strokeOpacity, visible = arcAttribute.visible, x: originX = arcAttribute.x, y: originY = arcAttribute.y } = arc.attribute;
|
|
19096
|
-
const fVisible = fillVisible(opacity, fillOpacity);
|
|
19096
|
+
const fVisible = fillVisible(opacity, fillOpacity, fill);
|
|
19097
19097
|
const sVisible = strokeVisible(opacity, strokeOpacity);
|
|
19098
|
-
const doFill = runFill(fill);
|
|
19098
|
+
const doFill = runFill(fill, background);
|
|
19099
19099
|
const doStroke = runStroke(stroke, lineWidth);
|
|
19100
19100
|
if (!(arc.valid && visible)) {
|
|
19101
19101
|
return;
|
|
19102
19102
|
}
|
|
19103
|
-
if (!(doFill || doStroke
|
|
19103
|
+
if (!(doFill || doStroke)) {
|
|
19104
19104
|
return;
|
|
19105
19105
|
}
|
|
19106
19106
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) {
|
|
@@ -19109,7 +19109,7 @@
|
|
|
19109
19109
|
const { outerRadius = arcAttribute.outerRadius, innerRadius = arcAttribute.innerRadius, cap = arcAttribute.cap, forceShowCap = arcAttribute.forceShowCap } = arc.attribute;
|
|
19110
19110
|
let beforeRenderContribitionsRuned = false;
|
|
19111
19111
|
const { isFullStroke, stroke: arrayStroke } = parseStroke(stroke);
|
|
19112
|
-
if (doFill || isFullStroke
|
|
19112
|
+
if (doFill || isFullStroke) {
|
|
19113
19113
|
context.beginPath();
|
|
19114
19114
|
drawArcPath$1(arc, context, x, y, outerRadius, innerRadius);
|
|
19115
19115
|
if (!this._arcBeforeRenderContribitions) {
|
|
@@ -19281,14 +19281,14 @@
|
|
|
19281
19281
|
drawShape(circle, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
19282
19282
|
const circleAttribute = getTheme(circle, params?.theme).circle;
|
|
19283
19283
|
const { fill = circleAttribute.fill, background, stroke = circleAttribute.stroke, radius = circleAttribute.radius, startAngle = circleAttribute.startAngle, endAngle = circleAttribute.endAngle, fillOpacity = circleAttribute.fillOpacity, strokeOpacity = circleAttribute.strokeOpacity, opacity = circleAttribute.opacity, lineWidth = circleAttribute.lineWidth, visible = circleAttribute.visible, x: originX = circleAttribute.x, y: originY = circleAttribute.y } = circle.attribute;
|
|
19284
|
-
const fVisible = fillVisible(opacity, fillOpacity);
|
|
19284
|
+
const fVisible = fillVisible(opacity, fillOpacity, fill);
|
|
19285
19285
|
const sVisible = strokeVisible(opacity, strokeOpacity);
|
|
19286
|
-
const doFill = runFill(fill);
|
|
19286
|
+
const doFill = runFill(fill, background);
|
|
19287
19287
|
const doStroke = runStroke(stroke, lineWidth);
|
|
19288
19288
|
if (!(circle.valid && visible)) {
|
|
19289
19289
|
return;
|
|
19290
19290
|
}
|
|
19291
|
-
if (!(doFill || doStroke
|
|
19291
|
+
if (!(doFill || doStroke)) {
|
|
19292
19292
|
return;
|
|
19293
19293
|
}
|
|
19294
19294
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) {
|
|
@@ -23900,7 +23900,12 @@
|
|
|
23900
23900
|
return aabbBounds;
|
|
23901
23901
|
}
|
|
23902
23902
|
updateArcAABBBoundsAccurate(attribute, arcTheme, aabbBounds, graphic) {
|
|
23903
|
-
|
|
23903
|
+
let { outerRadius = arcTheme.outerRadius, innerRadius = arcTheme.innerRadius } = attribute;
|
|
23904
|
+
if (outerRadius < innerRadius) {
|
|
23905
|
+
const temp = outerRadius;
|
|
23906
|
+
outerRadius = innerRadius;
|
|
23907
|
+
innerRadius = temp;
|
|
23908
|
+
}
|
|
23904
23909
|
let { endAngle = arcTheme.endAngle, startAngle = arcTheme.startAngle } = attribute;
|
|
23905
23910
|
if (startAngle > endAngle) {
|
|
23906
23911
|
const temp = startAngle;
|
|
@@ -24113,6 +24118,17 @@
|
|
|
24113
24118
|
break;
|
|
24114
24119
|
}
|
|
24115
24120
|
const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth);
|
|
24121
|
+
if (str !== '' && clip.str === '') {
|
|
24122
|
+
if (ellipsis) {
|
|
24123
|
+
const clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis);
|
|
24124
|
+
clip.str = clipEllipsis.str ?? '';
|
|
24125
|
+
clip.width = clipEllipsis.width ?? 0;
|
|
24126
|
+
}
|
|
24127
|
+
else {
|
|
24128
|
+
clip.str = '';
|
|
24129
|
+
clip.width = 0;
|
|
24130
|
+
}
|
|
24131
|
+
}
|
|
24116
24132
|
linesLayout.push({
|
|
24117
24133
|
str: clip.str,
|
|
24118
24134
|
width: clip.width
|
|
@@ -24378,6 +24394,9 @@
|
|
|
24378
24394
|
], exports.BaseRender);
|
|
24379
24395
|
|
|
24380
24396
|
function drawSegments(path, segPath, percent, clipRangeByDimension, params) {
|
|
24397
|
+
if (!segPath) {
|
|
24398
|
+
return;
|
|
24399
|
+
}
|
|
24381
24400
|
const { offsetX = 0, offsetY = 0, offsetZ = 0 } = params || {};
|
|
24382
24401
|
let needMoveTo = true;
|
|
24383
24402
|
const { curves } = segPath;
|
|
@@ -24516,6 +24535,9 @@
|
|
|
24516
24535
|
context.highPerformanceRestore();
|
|
24517
24536
|
}
|
|
24518
24537
|
drawSegmentItem(context, cache, fill, stroke, fillOpacity, strokeOpacity, attribute, defaultAttribute, clipRange, clipRangeByDimension, offsetX, offsetY, line, fillCb, strokeCb) {
|
|
24538
|
+
if (!cache) {
|
|
24539
|
+
return;
|
|
24540
|
+
}
|
|
24519
24541
|
context.beginPath();
|
|
24520
24542
|
const z = this.z ?? 0;
|
|
24521
24543
|
drawSegments(context.camera ? context : context.nativeContext, cache, clipRange, clipRangeByDimension, {
|
|
@@ -24552,7 +24574,7 @@
|
|
|
24552
24574
|
drawShape(line, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
24553
24575
|
const lineAttribute = getTheme(line, params?.theme).line;
|
|
24554
24576
|
const { fill = lineAttribute.fill, stroke = lineAttribute.stroke, opacity = lineAttribute.opacity, fillOpacity = lineAttribute.fillOpacity, strokeOpacity = lineAttribute.strokeOpacity, lineWidth = lineAttribute.lineWidth, visible = lineAttribute.visible } = line.attribute;
|
|
24555
|
-
const fVisible = fillVisible(opacity, fillOpacity);
|
|
24577
|
+
const fVisible = fillVisible(opacity, fillOpacity, fill);
|
|
24556
24578
|
const sVisible = strokeVisible(opacity, strokeOpacity);
|
|
24557
24579
|
const doFill = runFill(fill);
|
|
24558
24580
|
const doStroke = runStroke(stroke, lineWidth);
|
|
@@ -24828,9 +24850,9 @@
|
|
|
24828
24850
|
}
|
|
24829
24851
|
drawShape(area, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
24830
24852
|
const areaAttribute = getTheme(area, params?.theme).area;
|
|
24831
|
-
const { fill = areaAttribute.fill, fillOpacity = areaAttribute.fillOpacity, opacity = areaAttribute.opacity, visible = areaAttribute.visible, z = areaAttribute.z, stroke = area.attribute.stroke, lineWidth = areaAttribute.lineWidth, strokeOpacity = areaAttribute.strokeOpacity } = area.attribute;
|
|
24832
|
-
const fVisible = fillVisible(opacity, fillOpacity);
|
|
24833
|
-
const doFill = runFill(fill);
|
|
24853
|
+
const { fill = areaAttribute.fill, fillOpacity = areaAttribute.fillOpacity, opacity = areaAttribute.opacity, visible = areaAttribute.visible, z = areaAttribute.z, background, stroke = area.attribute.stroke, lineWidth = areaAttribute.lineWidth, strokeOpacity = areaAttribute.strokeOpacity } = area.attribute;
|
|
24854
|
+
const fVisible = fillVisible(opacity, fillOpacity, fill);
|
|
24855
|
+
const doFill = runFill(fill, background);
|
|
24834
24856
|
const doStroke = runStroke(stroke, lineWidth);
|
|
24835
24857
|
const sVisible = strokeVisible(opacity, strokeOpacity);
|
|
24836
24858
|
if (!(area.valid && visible)) {
|
|
@@ -24965,6 +24987,9 @@
|
|
|
24965
24987
|
context.highPerformanceRestore();
|
|
24966
24988
|
}
|
|
24967
24989
|
drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, fillCb, strokeCb) {
|
|
24990
|
+
if (!cache) {
|
|
24991
|
+
return;
|
|
24992
|
+
}
|
|
24968
24993
|
context.beginPath();
|
|
24969
24994
|
const ret = false;
|
|
24970
24995
|
drawAreaSegments(context.camera ? context : context.nativeContext, cache, clipRange, {
|
|
@@ -25041,14 +25066,14 @@
|
|
|
25041
25066
|
const pathAttribute = getTheme(path, params?.theme).path;
|
|
25042
25067
|
const { fill = pathAttribute.fill, stroke = pathAttribute.stroke, fillOpacity = pathAttribute.fillOpacity, strokeOpacity = pathAttribute.strokeOpacity, opacity = pathAttribute.opacity, background, lineWidth = pathAttribute.lineWidth, visible = pathAttribute.visible, x: originX = pathAttribute.x, y: originY = pathAttribute.y } = path.attribute;
|
|
25043
25068
|
const z = this.z ?? 0;
|
|
25044
|
-
const fVisible = fillVisible(opacity, fillOpacity);
|
|
25069
|
+
const fVisible = fillVisible(opacity, fillOpacity, fill);
|
|
25045
25070
|
const sVisible = strokeVisible(opacity, strokeOpacity);
|
|
25046
|
-
const doFill = runFill(fill);
|
|
25071
|
+
const doFill = runFill(fill, background);
|
|
25047
25072
|
const doStroke = runStroke(stroke, lineWidth);
|
|
25048
25073
|
if (!(path.valid && visible)) {
|
|
25049
25074
|
return;
|
|
25050
25075
|
}
|
|
25051
|
-
if (!(doFill || doStroke
|
|
25076
|
+
if (!(doFill || doStroke)) {
|
|
25052
25077
|
return;
|
|
25053
25078
|
}
|
|
25054
25079
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) {
|
|
@@ -25224,14 +25249,14 @@
|
|
|
25224
25249
|
drawShape(rect, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
25225
25250
|
const rectAttribute = getTheme(rect, params?.theme).rect;
|
|
25226
25251
|
const { fill = rectAttribute.fill, background, stroke = rectAttribute.stroke, width = rectAttribute.width, height = rectAttribute.height, cornerRadius = rectAttribute.cornerRadius, opacity = rectAttribute.opacity, fillOpacity = rectAttribute.fillOpacity, lineWidth = rectAttribute.lineWidth, strokeOpacity = rectAttribute.strokeOpacity, visible = rectAttribute.visible, x: originX = rectAttribute.x, y: originY = rectAttribute.y } = rect.attribute;
|
|
25227
|
-
const fVisible = rectFillVisible(opacity, fillOpacity, width, height);
|
|
25252
|
+
const fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill);
|
|
25228
25253
|
const sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height);
|
|
25229
|
-
const doFill = runFill(fill);
|
|
25254
|
+
const doFill = runFill(fill, background);
|
|
25230
25255
|
const doStroke = runStroke(stroke, lineWidth);
|
|
25231
25256
|
if (!(rect.valid && visible)) {
|
|
25232
25257
|
return;
|
|
25233
25258
|
}
|
|
25234
|
-
if (!(doFill || doStroke
|
|
25259
|
+
if (!(doFill || doStroke)) {
|
|
25235
25260
|
return;
|
|
25236
25261
|
}
|
|
25237
25262
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) {
|
|
@@ -25329,14 +25354,14 @@
|
|
|
25329
25354
|
drawShape(symbol, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
25330
25355
|
const symbolAttribute = getTheme(symbol, params?.theme).symbol;
|
|
25331
25356
|
const { size = symbolAttribute.size, fill = symbolAttribute.fill, background, fillOpacity = symbolAttribute.fillOpacity, strokeOpacity = symbolAttribute.strokeOpacity, opacity = symbolAttribute.opacity, lineWidth = symbolAttribute.lineWidth, stroke = symbolAttribute.stroke, visible = symbolAttribute.visible, x: originX = symbolAttribute.x, y: originY = symbolAttribute.y, scaleX = symbolAttribute.scaleX, scaleY = symbolAttribute.scaleY } = symbol.attribute;
|
|
25332
|
-
const fVisible = fillVisible(opacity, fillOpacity);
|
|
25357
|
+
const fVisible = fillVisible(opacity, fillOpacity, fill);
|
|
25333
25358
|
const sVisible = strokeVisible(opacity, strokeOpacity);
|
|
25334
|
-
const doFill = runFill(fill);
|
|
25359
|
+
const doFill = runFill(fill, background);
|
|
25335
25360
|
const doStroke = runStroke(stroke, lineWidth);
|
|
25336
25361
|
if (!(symbol.valid && visible)) {
|
|
25337
25362
|
return;
|
|
25338
25363
|
}
|
|
25339
|
-
if (!(doFill || doStroke
|
|
25364
|
+
if (!(doFill || doStroke)) {
|
|
25340
25365
|
return;
|
|
25341
25366
|
}
|
|
25342
25367
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) {
|
|
@@ -25442,7 +25467,7 @@
|
|
|
25442
25467
|
const textAttribute = getTheme(text, params?.theme).text;
|
|
25443
25468
|
const { text: str, fill = textAttribute.fill, stroke = textAttribute.stroke, fillOpacity = textAttribute.fillOpacity, strokeOpacity = textAttribute.strokeOpacity, opacity = textAttribute.opacity, lineWidth = textAttribute.lineWidth, visible = textAttribute.visible, underline = textAttribute.underline, lineThrough = textAttribute.lineThrough, keepDirIn3d = textAttribute.keepDirIn3d, fontSize = textAttribute.fontSize, textBaseline = textAttribute.textBaseline, x: originX = textAttribute.x, y: originY = textAttribute.y } = text.attribute;
|
|
25444
25469
|
const lineHeight = text.attribute.lineHeight ?? fontSize;
|
|
25445
|
-
const fVisible = fillVisible(opacity, fillOpacity);
|
|
25470
|
+
const fVisible = fillVisible(opacity, fillOpacity, fill);
|
|
25446
25471
|
const sVisible = strokeVisible(opacity, strokeOpacity);
|
|
25447
25472
|
const doFill = runFill(fill);
|
|
25448
25473
|
const doStroke = runStroke(stroke, lineWidth);
|
|
@@ -25716,14 +25741,14 @@
|
|
|
25716
25741
|
drawShape(polygon, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
25717
25742
|
const polygonAttribute = getTheme(polygon, params?.theme).polygon;
|
|
25718
25743
|
const { points = polygonAttribute.points, fill = polygonAttribute.fill, stroke = polygonAttribute.stroke, cornerRadius = polygonAttribute.cornerRadius, fillOpacity = polygonAttribute.fillOpacity, background, strokeOpacity = polygonAttribute.strokeOpacity, lineWidth = polygonAttribute.lineWidth, opacity = polygonAttribute.opacity, visible = polygonAttribute.visible, x: originX = polygonAttribute.x, y: originY = polygonAttribute.y } = polygon.attribute;
|
|
25719
|
-
const fVisible = fillVisible(opacity, fillOpacity);
|
|
25744
|
+
const fVisible = fillVisible(opacity, fillOpacity, fill);
|
|
25720
25745
|
const sVisible = strokeVisible(opacity, strokeOpacity);
|
|
25721
|
-
const doFill = runFill(fill);
|
|
25746
|
+
const doFill = runFill(fill, background);
|
|
25722
25747
|
const doStroke = runStroke(stroke, lineWidth);
|
|
25723
25748
|
if (!(polygon.valid && visible)) {
|
|
25724
25749
|
return;
|
|
25725
25750
|
}
|
|
25726
|
-
if (!(doFill || doStroke
|
|
25751
|
+
if (!(doFill || doStroke)) {
|
|
25727
25752
|
return;
|
|
25728
25753
|
}
|
|
25729
25754
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) {
|
|
@@ -25817,7 +25842,7 @@
|
|
|
25817
25842
|
drawShape(image, context, x, y, drawContext, params, fillCb) {
|
|
25818
25843
|
const imageAttribute = getTheme(image).image;
|
|
25819
25844
|
const { fill = imageAttribute.fill, width = imageAttribute.width, height = imageAttribute.height, opacity = imageAttribute.opacity, fillOpacity = imageAttribute.fillOpacity, visible = imageAttribute.visible, repeatX = imageAttribute.repeatX, repeatY = imageAttribute.repeatY, image: url } = image.attribute;
|
|
25820
|
-
const fVisible = fillVisible(opacity, fillOpacity);
|
|
25845
|
+
const fVisible = fillVisible(opacity, fillOpacity, fill);
|
|
25821
25846
|
const doFill = runFill(fill);
|
|
25822
25847
|
if (!(image.valid && visible)) {
|
|
25823
25848
|
return;
|
|
@@ -32632,15 +32657,15 @@
|
|
|
32632
32657
|
drawShape(group, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
32633
32658
|
const groupAttribute = getTheme(group, params?.theme).group;
|
|
32634
32659
|
const { fill = groupAttribute.fill, background, stroke = groupAttribute.stroke, opacity = groupAttribute.opacity, width = groupAttribute.width, height = groupAttribute.height, clip = groupAttribute.clip, fillOpacity = groupAttribute.fillOpacity, strokeOpacity = groupAttribute.strokeOpacity, cornerRadius = groupAttribute.cornerRadius, path = groupAttribute.path, lineWidth = groupAttribute.lineWidth, visible = groupAttribute.visible } = group.attribute;
|
|
32635
|
-
const fVisible = rectFillVisible(opacity, fillOpacity, width, height);
|
|
32660
|
+
const fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill);
|
|
32636
32661
|
const sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height);
|
|
32637
|
-
const doFill = runFill(fill);
|
|
32662
|
+
const doFill = runFill(fill, background);
|
|
32638
32663
|
const doStroke = runStroke(stroke, lineWidth);
|
|
32639
32664
|
if (!(group.valid && visible)) {
|
|
32640
32665
|
return;
|
|
32641
32666
|
}
|
|
32642
32667
|
if (!clip) {
|
|
32643
|
-
if (!(doFill || doStroke
|
|
32668
|
+
if (!(doFill || doStroke)) {
|
|
32644
32669
|
return;
|
|
32645
32670
|
}
|
|
32646
32671
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) {
|
|
@@ -32799,7 +32824,7 @@
|
|
|
32799
32824
|
}
|
|
32800
32825
|
const lineAttribute = getTheme(line).line;
|
|
32801
32826
|
const { fill = lineAttribute.fill, stroke = lineAttribute.stroke, opacity = lineAttribute.opacity, fillOpacity = lineAttribute.fillOpacity, strokeOpacity = lineAttribute.strokeOpacity, lineWidth = lineAttribute.lineWidth, visible = lineAttribute.visible } = line.attribute;
|
|
32802
|
-
const fVisible = fillVisible(opacity, fillOpacity);
|
|
32827
|
+
const fVisible = fillVisible(opacity, fillOpacity, fill);
|
|
32803
32828
|
const sVisible = strokeVisible(opacity, strokeOpacity);
|
|
32804
32829
|
const doFill = runFill(fill);
|
|
32805
32830
|
const doStroke = runStroke(stroke, lineWidth);
|
|
@@ -32847,7 +32872,7 @@
|
|
|
32847
32872
|
}
|
|
32848
32873
|
const areaAttribute = getTheme(area).area;
|
|
32849
32874
|
const { fill = areaAttribute.fill, fillOpacity = areaAttribute.fillOpacity, opacity = areaAttribute.opacity, visible = areaAttribute.visible } = area.attribute;
|
|
32850
|
-
const fVisible = fillVisible(opacity, fillOpacity);
|
|
32875
|
+
const fVisible = fillVisible(opacity, fillOpacity, fill);
|
|
32851
32876
|
const doFill = runFill(fill);
|
|
32852
32877
|
if (!(area.valid && visible)) {
|
|
32853
32878
|
return;
|
|
@@ -33106,7 +33131,7 @@
|
|
|
33106
33131
|
const rectAttribute = getTheme(rect, params?.theme).rect3d;
|
|
33107
33132
|
const { fill = rectAttribute.fill, stroke = rectAttribute.stroke, width = rectAttribute.width, height = rectAttribute.height, opacity = rectAttribute.opacity, fillOpacity = rectAttribute.fillOpacity, lineWidth = rectAttribute.lineWidth, strokeOpacity = rectAttribute.strokeOpacity, visible = rectAttribute.visible } = rect.attribute;
|
|
33108
33133
|
const z = this.z ?? 0;
|
|
33109
|
-
const fVisible = rectFillVisible(opacity, fillOpacity, width, height);
|
|
33134
|
+
const fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill);
|
|
33110
33135
|
const sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height);
|
|
33111
33136
|
const doFill = runFill(fill);
|
|
33112
33137
|
const doStroke = runStroke(stroke, lineWidth);
|
|
@@ -33248,7 +33273,7 @@
|
|
|
33248
33273
|
if (!(richtext.valid && visible)) {
|
|
33249
33274
|
return;
|
|
33250
33275
|
}
|
|
33251
|
-
const fVisible = fillVisible(opacity, fillOpacity);
|
|
33276
|
+
const fVisible = fillVisible(opacity, fillOpacity, true);
|
|
33252
33277
|
if (!fVisible) {
|
|
33253
33278
|
return;
|
|
33254
33279
|
}
|
|
@@ -33441,15 +33466,15 @@
|
|
|
33441
33466
|
drawShape(arc, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
33442
33467
|
const arcAttribute = getTheme(arc, params?.theme).arc;
|
|
33443
33468
|
const { fill = arcAttribute.fill, background, stroke = arcAttribute.stroke, opacity = arcAttribute.opacity, fillOpacity = arcAttribute.fillOpacity, lineWidth = arcAttribute.lineWidth, strokeOpacity = arcAttribute.strokeOpacity, visible = arcAttribute.visible } = arc.attribute;
|
|
33444
|
-
const fVisible = fillVisible(opacity, fillOpacity);
|
|
33469
|
+
const fVisible = fillVisible(opacity, fillOpacity, fill);
|
|
33445
33470
|
const sVisible = strokeVisible(opacity, strokeOpacity);
|
|
33446
|
-
const doFill = runFill(fill);
|
|
33471
|
+
const doFill = runFill(fill, background);
|
|
33447
33472
|
const doStroke = runStroke(stroke, lineWidth);
|
|
33448
33473
|
const z = this.z ?? 0;
|
|
33449
33474
|
if (!(arc.valid && visible)) {
|
|
33450
33475
|
return;
|
|
33451
33476
|
}
|
|
33452
|
-
if (!(doFill || doStroke
|
|
33477
|
+
if (!(doFill || doStroke)) {
|
|
33453
33478
|
return;
|
|
33454
33479
|
}
|
|
33455
33480
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) {
|
|
@@ -33575,7 +33600,7 @@
|
|
|
33575
33600
|
const pyramidAttribute = getTheme(pyramid3d, params?.theme).polygon;
|
|
33576
33601
|
const { fill = pyramidAttribute.fill, stroke = pyramidAttribute.stroke, opacity = pyramidAttribute.opacity, fillOpacity = pyramidAttribute.fillOpacity, lineWidth = pyramidAttribute.lineWidth, strokeOpacity = pyramidAttribute.strokeOpacity, visible = pyramidAttribute.visible, points, face = [true, true, true, true, true, true] } = pyramid3d.attribute;
|
|
33577
33602
|
const z = this.z ?? 0;
|
|
33578
|
-
const fVisible = fillVisible(opacity, fillOpacity);
|
|
33603
|
+
const fVisible = fillVisible(opacity, fillOpacity, fill);
|
|
33579
33604
|
const sVisible = strokeVisible(opacity, strokeOpacity);
|
|
33580
33605
|
const doFill = runFill(fill);
|
|
33581
33606
|
const doStroke = runStroke(stroke, lineWidth);
|
|
@@ -36312,7 +36337,7 @@
|
|
|
36312
36337
|
'rect'
|
|
36313
36338
|
];
|
|
36314
36339
|
|
|
36315
|
-
const version = "0.13.
|
|
36340
|
+
const version = "0.13.6";
|
|
36316
36341
|
|
|
36317
36342
|
exports.ACustomAnimate = ACustomAnimate;
|
|
36318
36343
|
exports.ARC3D_NUMBER_TYPE = ARC3D_NUMBER_TYPE;
|