mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2025-01-03 13:20:37 -05:00
73ccf83657
* path shapes * add polygon node * wip vector * implement translation of commands and paths * vectors and polygon * strokes * star * deformed shapes * simplify star * simplify star * fix transformers --------- Co-authored-by: Alex Sánchez <sion333@gmail.com>
21 lines
590 B
TypeScript
21 lines
590 B
TypeScript
import { PenpotFile } from '@ui/lib/penpot';
|
|
import { PATH_TYPE } from '@ui/lib/types/path/pathAttributes';
|
|
import { PathShape } from '@ui/lib/types/path/pathShape';
|
|
import {
|
|
translateFillGradients,
|
|
translatePathContent,
|
|
translateUiBlendMode
|
|
} from '@ui/translators';
|
|
|
|
export const createPenpotPath = (
|
|
file: PenpotFile,
|
|
{ type, fills, blendMode, content, ...rest }: PathShape
|
|
) => {
|
|
file.createPath({
|
|
type: PATH_TYPE,
|
|
fills: translateFillGradients(fills),
|
|
blendMode: translateUiBlendMode(blendMode),
|
|
content: translatePathContent(content),
|
|
...rest
|
|
});
|
|
};
|