Mercurial > hg > svgui
comparison view/Pane.cpp @ 1202:6828735468c9 svg
Implement "Export SVG file..."
author | Chris Cannam |
---|---|
date | Mon, 19 Dec 2016 16:32:34 +0000 |
parents | 54e6be7ebe11 |
children | f91cf4a60ad6 |
comparison
equal
deleted
inserted
replaced
1201:a68c25ba1153 | 1202:6828735468c9 |
---|---|
1121 | 1121 |
1122 return true; | 1122 return true; |
1123 } | 1123 } |
1124 | 1124 |
1125 QImage * | 1125 QImage * |
1126 Pane::toNewImage(sv_frame_t f0, sv_frame_t f1) | 1126 Pane::renderPartToNewImage(sv_frame_t f0, sv_frame_t f1) |
1127 { | 1127 { |
1128 int x0 = int(f0 / getZoomLevel()); | 1128 int x0 = int(f0 / getZoomLevel()); |
1129 int x1 = int(f1 / getZoomLevel()); | 1129 int x1 = int(f1 / getZoomLevel()); |
1130 | 1130 |
1131 QImage *image = new QImage(x1 - x0 + m_scaleWidth, | 1131 QImage *image = new QImage(x1 - x0 + m_scaleWidth, |
1160 return image; | 1160 return image; |
1161 } | 1161 } |
1162 } | 1162 } |
1163 | 1163 |
1164 QSize | 1164 QSize |
1165 Pane::getImageSize(sv_frame_t f0, sv_frame_t f1) | 1165 Pane::getRenderedPartImageSize(sv_frame_t f0, sv_frame_t f1) |
1166 { | 1166 { |
1167 QSize s = View::getImageSize(f0, f1); | 1167 QSize s = View::getRenderedPartImageSize(f0, f1); |
1168 QImage *image = new QImage(100, 100, QImage::Format_RGB32); | 1168 QImage *image = new QImage(100, 100, QImage::Format_RGB32); |
1169 QPainter paint(image); | 1169 QPainter paint(image); |
1170 | 1170 |
1171 int sw = 0; | 1171 int sw = 0; |
1172 if (m_manager && m_manager->shouldShowVerticalScale()) { | 1172 if (m_manager && m_manager->shouldShowVerticalScale()) { |