Comments (8)
The Document
internals should not be public. Why do you need them?
A simple fix is to pub use dom::*; in src/lib.rs.
There are no docs there, so it's not that simple =)
from resvg.
Well, Document
contains Element
s publicly, but this type is not made public, nor are the types used by the transitive public members of Element
.
from resvg.
It's because you shouldn't use them outside the backend code. The Document
is just a container of SVG data. You should not care about what inside. You can treat it as an opaque pointer.
from resvg.
In that case you should probably make the members of Document
pub(crate)
instead of pub
.
Though if someone wanted to use the document processing capabilities of resvg for writing their own SVG renderer, making these things public would be very handy (i.e. that's what I'm doing right now, with a fork making these types public).
from resvg.
Hm... The idea is the backend code should be inside the library. But if you want to use it just as preprocessor (all backend are optional already), then yes - it will be handy.
I will make them public and add docs and Debug
.
from resvg.
Thanks!
from resvg.
Done. Documentation is pretty simple, but I hope it help.
from resvg.
Thanks again
from resvg.
Related Issues (20)
- PNG output rendering issue HOT 2
- Improve fontconfig integration HOT 14
- Rendering should not access FS by default (ImageHrefResolver) HOT 7
- Add resvg.dll the new export function (interface to commad line option --list-fonts) and describe it in the resvg.h file. HOT 12
- Incorrect background merging (antialias) HOT 3
- Link-Time Optimization (LTO), Profile-Guided Optimization (PGO), Post-Link Optimization (PLO) benchmark results HOT 1
- SVG 2 CMYK colors and CMYK JPEG output? HOT 1
- Add support context-fill / context-stroke for external SVG, used as object <image... /> HOT 15
- Allow setting the default `currentColor` HOT 3
- Increase local fonts priority (resvg.exe) HOT 4
- usvg: allow custom image decoding in FormatKind HOT 1
- Is there a way to get original SVG command data using `usvg`? HOT 2
- viewsvg should have ability to resize itself HOT 1
- how to render a single element? HOT 1
- Some Microsoft Segoe UI Emoji emojis look off HOT 1
- Enforce width/height arguments to be respected HOT 5
- High memory usage when use image href data uri base64 HOT 5
- Try to resize large JPEGs during decoding
- Switch to zune-jpeg HOT 1
- Specific SVG has greyed out colours HOT 5
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 resvg.