@leafer-ui/paint
Advanced tools
+5
-5
| { | ||
| "name": "@leafer-ui/paint", | ||
| "version": "1.9.0", | ||
| "version": "1.9.1", | ||
| "description": "@leafer-ui/paint", | ||
@@ -25,9 +25,9 @@ "author": "Chao (Leafer) Wan", | ||
| "dependencies": { | ||
| "@leafer/core": "1.9.0", | ||
| "@leafer-ui/draw": "1.9.0" | ||
| "@leafer/core": "1.9.1", | ||
| "@leafer-ui/draw": "1.9.1" | ||
| }, | ||
| "devDependencies": { | ||
| "@leafer/interface": "1.9.0", | ||
| "@leafer-ui/interface": "1.9.0" | ||
| "@leafer/interface": "1.9.1", | ||
| "@leafer-ui/interface": "1.9.1" | ||
| } | ||
| } |
+15
-8
| import { IBoundsData, ILeaferCanvas, IRenderOptions, IMatrix } from '@leafer/interface' | ||
| import { BoundsHelper, Matrix } from '@leafer/core' | ||
| import { BoundsHelper, Matrix, Platform } from '@leafer/core' | ||
@@ -11,11 +11,9 @@ import { IUI, ICachedShape } from '@leafer-ui/interface' | ||
| const canvas = current.getSameCanvas() | ||
| const nowWorld = ui.__nowWorld | ||
| const nowWorld = ui.__nowWorld, currentBounds = current.bounds | ||
| let bounds: IBoundsData, matrix: IMatrix, fitMatrix: IMatrix, shapeBounds: IBoundsData, worldCanvas: ILeaferCanvas | ||
| let { scaleX, scaleY } = nowWorld | ||
| if (scaleX < 0) scaleX = -scaleX | ||
| if (scaleY < 0) scaleY = -scaleY | ||
| let { scaleX, scaleY } = ui.getRenderScaleData(true) | ||
| if (current.bounds.includes(nowWorld)) { | ||
| if (currentBounds.includes(nowWorld)) { | ||
@@ -28,4 +26,13 @@ worldCanvas = canvas | ||
| const { renderShapeSpread: spread } = ui.__layout | ||
| const worldClipBounds = getIntersectData(spread ? getSpread(current.bounds, scaleX === scaleY ? spread * scaleX : [spread * scaleY, spread * scaleX]) : current.bounds, nowWorld) | ||
| fitMatrix = current.bounds.getFitMatrix(worldClipBounds) | ||
| let worldClipBounds: IBoundsData // 作为绘制阴影的裁剪形状 | ||
| if (Platform.fullImageShadow) { // fix: iOS Safari 18.5 以上, 只裁剪部分区域渲染阴影会有问题 | ||
| worldClipBounds = nowWorld | ||
| } else { | ||
| const spreadBounds = spread ? getSpread(currentBounds, scaleX === scaleY ? spread * scaleX : [spread * scaleY, spread * scaleX]) : currentBounds | ||
| worldClipBounds = getIntersectData(spreadBounds, nowWorld) | ||
| } | ||
| fitMatrix = currentBounds.getFitMatrix(worldClipBounds) | ||
| let { a: fitScaleX, d: fitScaleY } = fitMatrix | ||
@@ -32,0 +39,0 @@ |
16466
1.81%326
1.24%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated