Refer to the examples in the example/ directory for other port This can be // used to render a combination of glyphs specified in the same SVG // document. The Render() function may get called multiple times. Pass drawing commands for SVG document to renderer the element (and // its descendants) // with the XML ID "ref1". Pass drawing commands for SVG document to renderer. Setup SkSurface for drawing auto skRasterSurface = SkSurface::MakeRasterN32Premul(doc-> Width(),Īuto skRasterCanvas = skRasterSurface-> getCanvas() (SVGNative::SVGDocument::CreateSVGDocument(svgInput.c_str(), renderer)) Create SVGDocument object and parse the passed SVG string. Create the renderer object auto renderer = std::make_shared() Here an example how to use SVG Native Viewer with Skia New ports need to inherit from SVGRenderer and implement the
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |