Skip to content

How do I get a more accurate linetype rendering for the drawing add-on #562

Answered by mozman
radheygupta asked this question in Q&A
Discussion options

You must be logged in to vote

The default rendering mode for line types in the drawing add-on is APPROIXIMATE, which uses the line type rendering provided by the backend. Matplotlib and PyQt render line types in such a way that the same line pattern is always displayed regardless of the view scaling or zoom level. The ACCURATE line policy is implemented for both backends, which shows a more precise rendering. The modified code uses the new configuration system for the drawing add-on and requires ezdxf v0.17 run:

from pathlib import Path

import matplotlib.figure as figure
import ezdxf
from ezdxf.addons.drawing import RenderContext, Frontend
from ezdxf.addons.drawing.matplotlib import MatplotlibBackend
from ezdxf.addons.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by radheygupta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #561 on October 21, 2021 06:30.