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

javamorph::CPolygonDecorator::CPolygonDecorator ( CFrame  parent,
Vector< Point >  polygon,
BufferedImage  image,
File  f_poly,
double  clip[][],
File  f_clip 
) [inline]

Constructor.

Parameters:
parent Parent JComponent to paint to.
polygon Points of the clip polygon.
image Picture of the own side.
f_poly File to save the polygon to after shutdown.
clip Smoothed clip matrix.
f_clip File to store a debug copy of the to.

Definition at line 60 of file CPolygonDecorator.java.

References init(), and load().

                        {
        Runtime.getRuntime().addShutdownHook(new Thread(this));
        /* Assign parameters. */
        this.parent = parent;
        this.polygon = polygon;
        this.image = image;
        this.clip = clip;
        this.f_poly = f_poly;
        this.f_clip = f_clip;
        /* Provide the polygon points. */
        if(f_poly.exists())load();
        else init();
        /* Add listeners. */
        parent.addMouseListener(this);
        parent.addMouseMotionListener(this);
    }


Generated by  Doxygen 1.6.0   Back to index