DXF Export: Added Ellipse and Element Text Document for export.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2746 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
abhishekm71
2014-01-18 12:23:35 +00:00
parent efa2381f6f
commit 9699f8d010
2 changed files with 19 additions and 3 deletions

View File

@@ -422,7 +422,8 @@ void ExportDialog::generateDxf(Diagram *diagram, int width, int height, bool kee
QStringList lines = dti -> toPlainText().split('\n');
y += (fontSize/2) * (lines.count()-1);
foreach (QString line, lines) {
Createdxf::drawText(file_path, line, x, y, fontSize, dti -> rotationAngle(), 0 );
if (line.size() > 0)
Createdxf::drawText(file_path, line, x, y, fontSize, dti -> rotationAngle(), 0 );
y -= fontSize*1.06;
}
@@ -486,7 +487,10 @@ void ExportDialog::generateDxf(Diagram *diagram, int width, int height, bool kee
qreal center_y = y - w/2;
qreal radius = (w+h)/4;
qreal endAngle = startAngle + spanAngle;
Createdxf::drawArc(file_path, center_x, center_y, radius, endAngle, startAngle, 0);
if (startAngle == 0 && spanAngle == 360)
Createdxf::drawCircle(file_path, radius, center_x, center_y, 0);
else
Createdxf::drawArc(file_path, center_x, center_y, radius, endAngle, startAngle, 0);
}
}