Logo Search packages:      
Sourcecode: javamorph version File versions  Download package

void javamorph::CMain::morph (  )  [inline]

Perform the morph operation. Show the progress bar during rendering.

Generate right smoothed clip matrix.

Definition at line 179 of file CMain.java.

References javamorph::CFrame::genClip(), left, javamorph::CProgress::open(), progress, and right.

Referenced by javamorph::CPopupMenuDecorator::actionPerformed().

                       {
        /* Store system time to calculate the duration. */
        long time = System.currentTimeMillis();
        /* Generate left smoothed clip matrix. */
        left.genClip();
        /** Generate right smoothed clip matrix. */
        right.genClip();
        /* Split picture area into triangles. */
        CTriangulation.triangulate();
        /* Show wait cursor. */
        this.setCursor(new Cursor(Cursor.WAIT_CURSOR));
        /* Initialize morphing the pictures. */
        CMorphOperator.morph(this, progress);
        /* Start morphing as execution parallel to the modal progress bar. */
        new Thread(new CMorphOperator()).start();
        /* Blocking made here! */
        progress.open();
        /* Remove wait cursor. */
        this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
        /* Calculate duration. */
        time = System.currentTimeMillis() - time;
        time /= 1000;
        /* Print duration to the console. */
        System.out.println("Duration = " + time + " seconds.");
    }


Generated by  Doxygen 1.6.0   Back to index