author | ar <ar> | 2005-01-21 19:56:15 (UTC) |
---|---|---|
committer | ar <ar> | 2005-01-21 19:56:15 (UTC) |
commit | cd51d382be50bc021739395309e23760f1619759 (patch) (unidiff) | |
tree | e76155f772df7faea5fcf38667c6da8c916208db /noncore/unsupported/qpdf/QOutputDev.cpp | |
parent | fdc37fbd908472e28735a8f0b01e3e66a43535e0 (diff) | |
download | opie-cd51d382be50bc021739395309e23760f1619759.zip opie-cd51d382be50bc021739395309e23760f1619759.tar.gz opie-cd51d382be50bc021739395309e23760f1619759.tar.bz2 |
- make opie compilable against qte 2.3.10 snapshot
check QT_VERSION against 0x030000 instead of 300
Diffstat (limited to 'noncore/unsupported/qpdf/QOutputDev.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/qpdf/QOutputDev.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/unsupported/qpdf/QOutputDev.cpp b/noncore/unsupported/qpdf/QOutputDev.cpp index 022d938..487177c 100644 --- a/noncore/unsupported/qpdf/QOutputDev.cpp +++ b/noncore/unsupported/qpdf/QOutputDev.cpp | |||
@@ -565,65 +565,65 @@ int QOutputDev::convertPath ( GfxState *state, QPointArray &points, QArray<int> | |||
565 | for ( int i = 0; i < n; i++ ) { | 565 | for ( int i = 0; i < n; i++ ) { |
566 | // transform the points | 566 | // transform the points |
567 | lengths [i] = convertSubpath ( state, path-> getSubpath ( i ), points ); | 567 | lengths [i] = convertSubpath ( state, path-> getSubpath ( i ), points ); |
568 | } | 568 | } |
569 | 569 | ||
570 | return n; | 570 | return n; |
571 | } | 571 | } |
572 | 572 | ||
573 | // | 573 | // |
574 | // Transform points in a single subpath and convert curves to line | 574 | // Transform points in a single subpath and convert curves to line |
575 | // segments. | 575 | // segments. |
576 | // | 576 | // |
577 | int QOutputDev::convertSubpath ( GfxState *state, GfxSubpath *subpath, QPointArray &points ) | 577 | int QOutputDev::convertSubpath ( GfxState *state, GfxSubpath *subpath, QPointArray &points ) |
578 | { | 578 | { |
579 | int oldcnt = points. count ( ); | 579 | int oldcnt = points. count ( ); |
580 | 580 | ||
581 | fp_t x0, y0, x1, y1, x2, y2, x3, y3; | 581 | fp_t x0, y0, x1, y1, x2, y2, x3, y3; |
582 | 582 | ||
583 | int m = subpath-> getNumPoints ( ); | 583 | int m = subpath-> getNumPoints ( ); |
584 | int i = 0; | 584 | int i = 0; |
585 | 585 | ||
586 | while ( i < m ) { | 586 | while ( i < m ) { |
587 | if ( i >= 1 && subpath-> getCurve ( i )) { | 587 | if ( i >= 1 && subpath-> getCurve ( i )) { |
588 | state-> transform ( subpath-> getX ( i - 1 ), subpath-> getY ( i - 1 ), &x0, &y0 ); | 588 | state-> transform ( subpath-> getX ( i - 1 ), subpath-> getY ( i - 1 ), &x0, &y0 ); |
589 | state-> transform ( subpath-> getX ( i ), subpath-> getY ( i ), &x1, &y1 ); | 589 | state-> transform ( subpath-> getX ( i ), subpath-> getY ( i ), &x1, &y1 ); |
590 | state-> transform ( subpath-> getX ( i + 1 ), subpath-> getY ( i + 1 ), &x2, &y2 ); | 590 | state-> transform ( subpath-> getX ( i + 1 ), subpath-> getY ( i + 1 ), &x2, &y2 ); |
591 | state-> transform ( subpath-> getX ( i + 2 ), subpath-> getY ( i + 2 ), &x3, &y3 ); | 591 | state-> transform ( subpath-> getX ( i + 2 ), subpath-> getY ( i + 2 ), &x3, &y3 ); |
592 | 592 | ||
593 | QPointArray tmp; | 593 | QPointArray tmp; |
594 | tmp. setPoints ( 4, lrint ( x0 ), lrint ( y0 ), lrint ( x1 ), lrint ( y1 ), | 594 | tmp. setPoints ( 4, lrint ( x0 ), lrint ( y0 ), lrint ( x1 ), lrint ( y1 ), |
595 | lrint ( x2 ), lrint ( y2 ), lrint ( x3 ), lrint ( y3 )); | 595 | lrint ( x2 ), lrint ( y2 ), lrint ( x3 ), lrint ( y3 )); |
596 | 596 | ||
597 | #if QT_VERSION < 300 | 597 | #if QT_VERSION < 0x030000 |
598 | tmp = tmp. quadBezier ( ); | 598 | tmp = tmp. quadBezier ( ); |
599 | 599 | ||
600 | for ( uint loop = 0; loop < tmp. count ( ); loop++ ) { | 600 | for ( uint loop = 0; loop < tmp. count ( ); loop++ ) { |
601 | QPoint p = tmp. point ( loop ); | 601 | QPoint p = tmp. point ( loop ); |
602 | points. putPoints ( points. count ( ), 1, p. x ( ), p. y ( )); | 602 | points. putPoints ( points. count ( ), 1, p. x ( ), p. y ( )); |
603 | } | 603 | } |
604 | #else | 604 | #else |
605 | tmp = tmp. cubicBezier ( ); | 605 | tmp = tmp. cubicBezier ( ); |
606 | points. putPoints ( points. count ( ), tmp. count ( ), tmp ); | 606 | points. putPoints ( points. count ( ), tmp. count ( ), tmp ); |
607 | #endif | 607 | #endif |
608 | 608 | ||
609 | i += 3; | 609 | i += 3; |
610 | } | 610 | } |
611 | else { | 611 | else { |
612 | state-> transform ( subpath-> getX ( i ), subpath-> getY ( i ), &x1, &y1 ); | 612 | state-> transform ( subpath-> getX ( i ), subpath-> getY ( i ), &x1, &y1 ); |
613 | 613 | ||
614 | points. putPoints ( points. count ( ), 1, lrint ( x1 ), lrint ( y1 )); | 614 | points. putPoints ( points. count ( ), 1, lrint ( x1 ), lrint ( y1 )); |
615 | ++i; | 615 | ++i; |
616 | } | 616 | } |
617 | } | 617 | } |
618 | return points. count ( ) - oldcnt; | 618 | return points. count ( ) - oldcnt; |
619 | } | 619 | } |
620 | 620 | ||
621 | 621 | ||
622 | void QOutputDev::beginString ( GfxState *state, GString */*s*/ ) | 622 | void QOutputDev::beginString ( GfxState *state, GString */*s*/ ) |
623 | { | 623 | { |
624 | m_text-> beginString ( state ); | 624 | m_text-> beginString ( state ); |
625 | } | 625 | } |
626 | 626 | ||
627 | void QOutputDev::endString ( GfxState */*state*/ ) | 627 | void QOutputDev::endString ( GfxState */*state*/ ) |
628 | { | 628 | { |
629 | m_text-> endString ( ); | 629 | m_text-> endString ( ); |