2024-04-15 11:30:51 -05:00
|
|
|
import {
|
|
|
|
transformBlend,
|
2024-04-22 05:50:38 -05:00
|
|
|
transformCornerRadius,
|
2024-04-15 11:30:51 -05:00
|
|
|
transformDimensionAndPosition,
|
2024-04-17 08:27:53 -05:00
|
|
|
transformFills,
|
2024-04-19 05:18:12 -05:00
|
|
|
transformProportion,
|
2024-04-17 03:53:38 -05:00
|
|
|
transformSceneNode,
|
|
|
|
transformStrokes
|
2024-04-15 11:30:51 -05:00
|
|
|
} from '@plugin/transformers/partials';
|
2024-04-12 09:52:36 -05:00
|
|
|
|
|
|
|
import { RectShape } from '@ui/lib/types/rect/rectShape';
|
2024-04-12 06:55:42 -05:00
|
|
|
|
|
|
|
export const transformRectangleNode = (
|
|
|
|
node: RectangleNode,
|
|
|
|
baseX: number,
|
|
|
|
baseY: number
|
|
|
|
): RectShape => {
|
|
|
|
return {
|
|
|
|
type: 'rect',
|
|
|
|
name: node.name,
|
2024-04-17 08:27:53 -05:00
|
|
|
...transformFills(node),
|
2024-04-17 03:53:38 -05:00
|
|
|
...transformStrokes(node),
|
2024-04-15 11:30:51 -05:00
|
|
|
...transformDimensionAndPosition(node, baseX, baseY),
|
|
|
|
...transformSceneNode(node),
|
2024-04-19 05:18:12 -05:00
|
|
|
...transformBlend(node),
|
2024-04-22 05:50:38 -05:00
|
|
|
...transformProportion(node),
|
|
|
|
...transformCornerRadius(node)
|
2024-04-12 06:55:42 -05:00
|
|
|
};
|
|
|
|
};
|