Comments (4)
Hairlines 😄
This looks like a bug on the ScottPlot end (though it is an amazing library!). I would suggest clearing the space with just:
canvas.Clear(SKColors.Transparent);
However, this workaround works as expected:
.SkiaSharpCanvas((canvas, size) => {
canvas.ClipRect(new SKRect(1, 1, size.Width - 1, size.Height - 1)); // here
canvas.Clear();
canvas.Clear(SKColors.White);
});
from questpdf.
Hairlines 😄
This looks like a bug on the ScottPlot end (though it is an amazing library!). I would suggest clearing the space with just:
canvas.Clear(SKColors.Transparent);However, this workaround works as expected:
.SkiaSharpCanvas((canvas, size) => { canvas.ClipRect(new SKRect(1, 1, size.Width - 1, size.Height - 1)); // here canvas.Clear(); canvas.Clear(SKColors.White); });
Thank you for the quick reply!
Unfortunately, your suggested change results in the following SVG and does not work either:
<?xml version="1.0" encoding="utf-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="536" height="357">
<clipPath id="cl_8">
<rect x="1" y="1" width="533.40002" height="354.93335"/>
</clipPath>
<g clip-path="url(#cl_8)">
<rect width="536" height="357"/>
<rect fill="white" width="536" height="357"/>
</g>
</svg>
Any clues on where the issue lies?
EDIT:
Pardon me for my very limited SVG knowledge. I originally thought the rectangles were being drawn separately from the clip path, but upon looking into it more, it seems that the g
element references the correct clip path and it should theoretically work. Still, I see the frame in the resulting PDF.
from questpdf.
It really looks like a ScottPlot problem. I've managed to spot the hairlines viewing the SVG with InkScape's inkview
, too. Therefore it seems like it's not a QuestPDF bug and I'll try to discuss this further at ScottPlot's GitHub.
from questpdf.
It really looks like a ScottPlot problem.
I wouldn't say it's ScottPlot problem per se. It is very close to how Skia converts drawing instructions to SVG content. Then, about how is that content rendered in non-native resolutions (where points do not match integer pixels). I needed to try hard to see this issue on my 4k screen.
But taking into account that ScottPlot officially supports SVG, they can make this small improvement.
from questpdf.
Related Issues (20)
- Rounded Borders
- Add Support for AcroFields
- The previewer doesn't show any buttons HOT 1
- Showing an svg image spams the log HOT 4
- Random segfaults caused by trying to dispose a `null` `SkSvgImage` object in `SvgImage` class finalizer HOT 4
- Unable to find an entry point named 'svg_get_size' in DLL 'QuestPdfSkia' HOT 3
- Reintroduce Win-x86 support HOT 10
- License related question HOT 2
- Colors in SVG which are specified by name do not work HOT 1
- Query regarding License HOT 4
- Text Padding Issue
- Generating PDF produces blank document when using async/await HOT 2
- Header not working as expected HOT 3
- border-radius HOT 3
- Is there an asynchronous version of GeneratePdf to write to an output stream (web API)? HOT 2
- Underline is coming over the text HOT 6
- Copy of native DLL does not work for restricted processes HOT 3
- Align text and number into Content HOT 2
- Missing Calling Convention for x86 platform produces debugging issues HOT 8
- .Text automatically trims spaces in strings HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from questpdf.