Skip to content

feat(draw): add fillStyle support for shapes#1137

Open
Kripu77 wants to merge 1 commit intoworktile:developfrom
Kripu77:feature/fillstyle-support
Open

feat(draw): add fillStyle support for shapes#1137
Kripu77 wants to merge 1 commit intoworktile:developfrom
Kripu77:feature/fillstyle-support

Conversation

@Kripu77
Copy link

@Kripu77 Kripu77 commented Feb 21, 2026

Changes

  • Introduced FillStyle type and added fillStyle to PlaitCommonGeometry
  • Passed fillStyle from element props to rough.js renderer
  • Removed hardcoded fillStyle: 'solid' from all shape engines
  • Enabled full support for rough.js fill styles: solid, hachure, zigzag, cross-hatch, dots, dashed, zigzag-line

This allows shapes to render using any rough.js supported fill pattern instead of defaulting to solid.

@vercel
Copy link

vercel bot commented Feb 21, 2026

@Kripu77 is attempting to deploy a commit to the tethys Team on Vercel.

A member of the Team first needs to authorize it.

@Kripu77
Copy link
Author

Kripu77 commented Feb 24, 2026

@pubuzhixing8 could you review this please?

@pubuzhixing8
Copy link
Collaborator

@pubuzhixing8 could you review this please?

I would review it soon.

board = createTestingBoard([withDraw], []);
});

describe('PlaitCommonGeometry interface', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The unit tests do not verify any business logic

const result = drawGeometry(board, rectangle, BasicShapes.rectangle, roughOptions);

expect(result).toBeDefined();
expect(result instanceof SVGGElement).toBe(true);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we verify whether the result include hachure style?

@pubuzhixing8
Copy link
Collaborator

@Kripu77 Could you add some functional examples for this feature, such as the mark of below image:
Screenshot 2026-03-06 at 10 15 20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants