2 Attachment(s)
QMatrix rotate on QGraphicsTextItem speed on render..
I render direct a XML file to pdf on MiniScribus ( http://code.google.com/p/fop-miniscribus/ ) from the application A i call a QProcess to Application B MiniScribus... all work fine but all QMatrix rotate 90° not become time to make its.... why? is the a signal if QGraphicsTextItem as successful rotate?
i call only
QStringList cmd;
#if defined Q_WS_WIN
cmd.append("\""+Foppath+"\"");
cmd.append("-pdf");
cmd.append("\""+fopresultpdf+"\"");
cmd.append("\""+fopdestination+"\"");
#else
cmd.append(Foppath);
cmd.append("-pdf");
cmd.append(fopresultpdf);
cmd.append(fopdestination);
#endif
from the application A ... i tested to grep pdf after 1 Min. ... the result is same as 0.01 Min.... why?
IMO svn source:
svn co http://fop-miniscribus.googlecode.co...scribus.1.0.0/ miniscribus
Code:
{
/* QColor ground; */
painter
->setRenderHint
(QPainter::Antialiasing,
true);
painter
->setBrush
(QBrush(BGColor
));
if (modus == M_HOVER) {
if (PaintLockStaus) {
pen.setStyle( Qt::DotLine );
pen.setWidth( 2 );
pen.setColor( Qt::red );
painter->setPen( pen);
painter->drawRect(boundingRect());
}
} else if (modus == M_MOVE_ALL) {
if (PaintLockStaus) {
pen.setStyle( Qt::DotLine );
pen.setWidth( 2 );
pen.setColor( Qt::red );
painter->setPen( pen);
painter->drawRect(boundingRect());
}
}
if (BorderDicks > 0) {
pen.setStyle( Qt::SolidLine );
pen.setWidth( BorderDicks );
pen.setColor(MarginColor);
painter->setPen(pen);
} else {
painter->setPen(Qt::NoPen);
}
painter
->setBrush
(QBrush(BGColor
));
painter->drawRect(boundingRect());
if (PaintLockStaus) {
if (modus == M_LOCK) {
}
if (modus == M_WRITTELN) {
painter
->drawPixmap
(QPointF (wi
- 18,
3),
QPixmap(":/img/_writteln.png"));
}
}
setTransform(ActualMatrixe(BoxRotate),false);
if (BorderDicks < 1) {
painter->setPen(Qt::NoPen);
}
setToolTip(DefaultMessage);
}
QTransform FloatDiagram::ActualMatrixRotate( int r )
{
matrix.translate ( boundingRect().center().x() , boundingRect().center().y() );
matrix.rotate(r);
matrix.translate ( - boundingRect().center().x() , - boundingRect().center().y() );
return QTransform(matrix);
}
Re: QMatrix rotate on QGraphicsTextItem speed on render..
I don't know about the others, but at least I can't really make sense of what you wrote (English). (Did you use an automated translation software?)
Could you try to restate the question?
What I understand is that you have two problems, one that has to do with QProcess, and the other with timing of the transformation, but other then that I really don't understand what the actual problem is.
Re: QMatrix rotate on QGraphicsTextItem speed on render..
Tanks i resolve this , with adding a small hack ... && wake-up QGraphicsView speed
to rotate elements and item....
if qApp->processEvents() or scaleView resolve the problem, i dont know..:rolleyes:
now QProcess from the first application sender make correct job and grab pdf...
Code:
/* if start main apps having a direct order to generate pdf.. from fop file
like apache Fop command to render direct file .
http://xmlgraphics.apache.org/fop/0.94/running.html
*/
if (order_args_pdf_from_main.size() > 0) {
Current_file_from_Main_to_PDF = order_args_pdf_from_main;
/* wait to rotate layer! :-) */
PrePareToprintPaint(); /* remove drag, hover and move borders by edit */
scaleView(0.46); /* wake up all rotate elements */
qApp->processEvents();
PrePareToprintPaint();
scaleView(1.01); //// QGraphicsView
QTimer::singleShot(800,
this,
SLOT(PrintPdfCurrentMainFile
()));
}