0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2025-01-02 21:00:12 -05:00

add circle shape

This commit is contained in:
Jordi Sala Morales 2024-04-10 10:49:05 +00:00
parent 7e79137a52
commit 5ba81d3282
No known key found for this signature in database
GPG key ID: C5127140107F55FD
4 changed files with 11 additions and 1 deletions

View file

@ -8,6 +8,7 @@ export const createPenpotCircle = (
baseY: number
) => {
file.penpotFile.createCircle({
type: Symbol.for('circle'),
name: node.name,
x: node.x + baseX,
y: node.y + baseY,

View file

@ -1,4 +1,5 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { CircleShape } from './types/circle/circleShape';
import { TextShape } from './types/text/textShape';
export interface PenpotFile {
@ -11,7 +12,7 @@ export interface PenpotFile {
addGroup(group: any): void;
closeGroup(): void;
createRect(rect: any): void;
createCircle(circle: any): void;
createCircle(circle: CircleShape): void;
createText(options: TextShape): void;
createImage(image: any): void;
}

View file

@ -0,0 +1,4 @@
export type CircleAttributes = {
id?: string;
type: symbol;
};

View file

@ -0,0 +1,4 @@
import { Shape } from '../shape';
import { CircleAttributes } from './circleAttributes';
export type CircleShape = Shape & CircleAttributes;