cppfw / svgren

:camera: SVG rendering library in C++
MIT License
206 stars 41 forks source link

how to render an svgresult to a new window ? #63

Closed goodyes closed 5 years ago

goodyes commented 5 years ago

Hello, can you point in how to render, position (move position) and clear an svgreen result to a screen or new window ? under windows, Gdiplus. So how to convert the pixels returned by svgren::render , std_vector uint32_t to an Image (microsoft mfc gdiplus)

Justr after the wiki says "After that one can use the rendered image data to display it on any physical display or whatever", how to ?

igagis commented 5 years ago

there is a project for Visual Studio, look for it in msvs_solution directory. There is a test application there which draws an SVG image in the window.

goodyes commented 5 years ago

under msvs_solution, project libsvgreen, render.cpp error: cannot open source file for includes: 

include <utki/config.hpp>#include <utki/util.hpp>

under msvs_solution, project render_test, render_test.cpp error:

cannot open source file for includes: 

include <svgdom/dom.hpp>#include <papki/FSFile.hpp>

En jueves, 20 de diciembre de 2018 10:57:37 CET, Ivan Gagis <notifications@github.com> escribió:  

there is a project for Visual Studio, look for it in msvs_solution directory. There is a test application there which draws an SVG image in the window.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

goodyes commented 5 years ago

Also on trying to compile, unable to start program .. libsvgren.lib is not a valid win32 application

image

goodyes commented 5 years ago

chaging to debug x86 (from previous debug x64) also same error:

image

igagis commented 5 years ago

there are 2 projects in the solutiuon, you need to start render_test one, not libsvgren. Right click render_test and select set default startup project or something like that, then try to run

goodyes commented 5 years ago

solved, thks

goodyes commented 5 years ago

Is there any way to fit the image on to window ? (width and height)

saeitsystems commented 5 years ago

Just set the desired with and height in render parameters