We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Graphics.SmoothingMode resets to Default when RequiresSmoothRendering is true.
var g = Graphics.FromHwnd(IntPtr.Zero); var renderer = SvgRenderer.FromGraphics(g); var visualElement = new SvgLine { ShapeRendering = SvgShapeRendering.Auto }; g.SmoothingMode = SmoothingMode.AntiAlias; // Initializing SmoothingMode for Graphics. visualElement.RenderElement(renderer); // Calling rendering. Assert.That(g.SmoothingMode, Is.EqualTo(SmoothingMode.AntiAlias)); // Fail, coz actual is Default.
3.2.3
protected internal virtual void RenderFillAndStroke(ISvgRenderer renderer) { var smoothingMode = renderer.SmoothingMode; try { // If this element needs smoothing enabled turn anti-aliasing on if (RequiresSmoothRendering) renderer.SmoothingMode = SmoothingMode.AntiAlias; RenderFill(renderer); RenderStroke(renderer); } finally { // Reset the smoothing mode if (RequiresSmoothRendering && renderer.SmoothingMode == SmoothingMode.AntiAlias) renderer.SmoothingMode = smoothingMode; } }
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Description
Graphics.SmoothingMode resets to Default when RequiresSmoothRendering is true.
Example data
Used Versions
3.2.3
Solution
The text was updated successfully, but these errors were encountered: