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-22 07:35:59 -05:00
|
|
|
transformEffects,
|
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
|
|
|
|
2024-05-06 01:06:14 -05:00
|
|
|
import { RectShape } from '@ui/lib/types/shapes/rectShape';
|
2024-04-12 06:55:42 -05:00
|
|
|
|
2024-05-09 09:59:27 -05:00
|
|
|
export const transformRectangleNode = async (
|
2024-04-12 06:55:42 -05:00
|
|
|
node: RectangleNode,
|
|
|
|
baseX: number,
|
|
|
|
baseY: number
|
2024-05-09 09:59:27 -05:00
|
|
|
): Promise<RectShape> => {
|
2024-04-12 06:55:42 -05:00
|
|
|
return {
|
|
|
|
type: 'rect',
|
|
|
|
name: node.name,
|
2024-05-09 09:59:27 -05:00
|
|
|
...(await transformFills(node)),
|
2024-04-22 07:35:59 -05:00
|
|
|
...transformEffects(node),
|
2024-05-09 09:59:27 -05:00
|
|
|
...(await 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
|
|
|
};
|
|
|
|
};
|