mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 13:43:03 -05:00
e5f2943532
* Implement rotation for frames and sections * wip * finish implementation * add changelog
34 lines
881 B
TypeScript
34 lines
881 B
TypeScript
import {
|
|
transformBlend,
|
|
transformConstraints,
|
|
transformEffects,
|
|
transformFigmaIds,
|
|
transformFills,
|
|
transformLayoutAttributes,
|
|
transformProportion,
|
|
transformSceneNode,
|
|
transformStrokes
|
|
} from '@plugin/transformers/partials';
|
|
import { translatePathNode } from '@plugin/translators/vectors';
|
|
|
|
import { PathShape } from '@ui/lib/types/shapes/pathShape';
|
|
|
|
export const transformPathNode = (
|
|
node: StarNode | PolygonNode,
|
|
baseRotation: number
|
|
): PathShape => {
|
|
return {
|
|
type: 'path',
|
|
name: node.name,
|
|
content: translatePathNode(node, baseRotation),
|
|
...transformFigmaIds(node),
|
|
...transformFills(node),
|
|
...transformStrokes(node),
|
|
...transformEffects(node),
|
|
...transformSceneNode(node),
|
|
...transformBlend(node),
|
|
...transformProportion(node),
|
|
...transformLayoutAttributes(node),
|
|
...transformConstraints(node)
|
|
};
|
|
};
|