Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How to apply styles to entities? #20

Closed
ThisIsRex opened this issue May 29, 2021 · 1 comment
Closed

[Question] How to apply styles to entities? #20

ThisIsRex opened this issue May 29, 2021 · 1 comment

Comments

@ThisIsRex
Copy link

I am trying to make lines dashed, bold, etc. There are structs and enums for this: LineType, LineTypeStyle, LineWeight and so on. But I didn't find how to set these values to objects (e.g. line.style = LineTypeStyle::Dashed). How to apply styles?

@brettfo
Copy link
Member

brettfo commented Jun 1, 2021

I've added an /examples/ directory that contains more in-depth and/or complicated examples. For your scenario I've added /examples/src/line_type_examples.rs that shows how to do a simple dashed line. Note that if you're going to open the resultant drawing in AutoCAD, it's really picky about what it will accept and maintaining compatibility with AutoCAD is an ongoing battle (e.g., see #17).

@brettfo brettfo closed this as completed Jun 1, 2021
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

No branches or pull requests

2 participants