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

void javamorph::CPolygonDecorator::smoothLine ( Point  p1,
Point  p2 
) [inline, private]

Smooth the contour of the clip matrix as dilatation. Work on the contour of clip & write to shadow.

Parameters:
p1 First point.
p2 Second point.

Definition at line 359 of file CPolygonDecorator.java.

References smoothCircle().

Referenced by genClip().

                                               {
        if(p1.equals(p2))return;
            int 
            x1 = p1.x,
            x2 = p2.x,
            y1 = p1.y,
            y2 = p2.y,
            dx = x2 - x1,
            dy = y2 - y1,
        param = Math.max(Math.abs(dx), Math.abs(dy));
        Point pt = new Point();
        for(int p = 0; p <= param; ++p){
            pt.x = (int)(x1 + (double)p * dx / (double)param);
            pt.y = (int)(y1 + (double)p * dy / (double)param);
            smoothCircle(pt);
        }
    }


Generated by  Doxygen 1.6.0   Back to index