[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] Improving SVG support

From: Darcy Shen
Subject: [Texmacs-dev] Improving SVG support
Date: Sat, 09 Nov 2019 01:53:57 +0800
User-agent: ZohoCN Mail


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



============ Forwarded message ============
From: Darcy Shen <address@hidden>
To: "Darcy Shen"<address@hidden>, <address@hidden>, <address@hidden>, <address@hidden>
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.

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:


Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]