https://doc.qt.io/qt-5/qtsvg-index.html



There is a SVG module for Qt. And there are C++ libraries:



https://github.com/igagis/svgren



http://www.svgpp.org/









============ Forwarded message ============
From: Darcy Shen <[email protected]>
To: "Darcy Shen"<[email protected]>, <[email protected]>, <[email protected]>, 
<[email protected]>
Date: Sat, 2019-11-09 01:46:07
Subject: [bug #57193] The imported SVG/PNG images is too vague
============ Forwarded message ============



Follow-up Comment #1, bug #57193 (project texmacs): 
 
For SVG images under TeXmacs with Qt, we use qt_image_size to determine the 
size of the image. 
 
 
bool 
qt_image_size (url image, int& w, int& h) {// w, h in points 
 if (DEBUG_CONVERT) debug_convert << "qt_image_size :" <<LF; 
 QImage im= QImage (utf8_to_qstring (concretize (image))); 
 if (im.isNull ()) { 
 convert_error << "Cannot read image file '" << image << "'" 
 << " in qt_image_size" << LF; 
 w= 35; h= 35; 
 return false; 
 } 
 else { 
 w= (int) rint ((((double) im.width ())*2834)/im.dotsPerMeterX()); 
 h= (int) rint ((((double) im.height())*2834)/im.dotsPerMeterY()); 
 if (DEBUG_CONVERT) debug_convert <<"QT dotsPerMeter: " 
 <<w<<" x "<<h<<LF; 
 return true; 
 } 
} 
 
 
 
 
But QImage will fail to work without Qt SVG support. 
 
 _______________________________________________________ 
 
Reply to this item at: 
 
 <https://savannah.gnu.org/bugs/?57193> 
 
_______________________________________________ 
 Message sent via Savannah 
 https://savannah.gnu.org/
_______________________________________________
Texmacs-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/texmacs-dev

Reply via email to