[Digikam-devel] [Bug 179548] additional guide for aspect ratio crop

simon at margo.student.utwente.nl simon at margo.student.utwente.nl
Mon Jan 5 19:45:51 GMT 2009


http://bugs.kde.org/show_bug.cgi?id=179548





--- Comment #6 from simon margo student utwente nl  2009-01-05 20:45:50 ---
I don't know how to make all the right changes in the code, but the drawing
section in imageselectionwidget.cpp should be somewhat like this I presume?

case DiagonalMethod:
{
// Move coordinates to top, left
        p.translate(d->localRegionSelection.topLeft().x(),
                d->localRegionSelection.topLeft().y());

// Flip horizontal.
// Flip verical.
        // noop; DiagonalMethod is symmetrical

        float w = (float)d->localRegionSelection.width();
        float h = (float)d->localRegionSelection.height();
        p.setPen(QPen(Qt::white, d->guideSize, Qt::SolidLine));

        if (w > h) {
                p.drawLine( 0, 0, h, h);
                p.drawLine( 0, h, h, 0);
                p.drawLine( w-h, 0, w, h);
                p.drawLine( w-h, h, w, 0);

        } else {
                p.drawLine( 0, 0, w, w);
                p.drawLine( 0, w, w, 0);
                p.drawLine( 0, h-w, w, h);
                p.drawLine( 0, h, w, w-h);
        }
        break;
}


-- 
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Digikam-devel mailing list