You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Question] [XPS] Drawing a Visual is always being rasterized #4466
Do you have a simple repro? Does adding the visual directly to the FixedPage instead of rendering it on its DrawingContext work for you? (I tried with an ellipse but it looked vector in a DocumentViewer)
I don't have a separate solution with a small repro but the code already posted above shows the problem.
First you have to open an XPS document
Get a FixedPage from the document
Pass that FixedPage as a visual to the code below
The code below takes the vector drawing via the VisualTreeHelper.GetDrawing. When we try to draw the Visual on a differentDrawingContext of a differentFixedPage it gets rasterized. When drawing the Visual on the sameDrawingContext of the FixedPage it is Vector/goodquality.
Activity
miloush commentedon May 4, 2021
Do you have a simple repro? Does adding the visual directly to the
FixedPageinstead of rendering it on itsDrawingContextwork for you? (I tried with an ellipse but it looked vector in aDocumentViewer)wstaelens commentedon May 10, 2021
I don't have a separate solution with a small repro but the code already posted above shows the problem.
When drawing the Visual on the same DrawingContext of the FixedPage it is Vector/good quality.
wstaelens commentedon Oct 28, 2021
any updates?
wstaelens commentedon Jan 28, 2022
🥱