Code example for PointF

Methods: set

0
     *  
     * @return The (x, y) coordinates. 
     */ 
    public static PointF coordinates(final biz.oesf.graphchartlib.afree.graphics.geom.RectShape RectShape,
            final RectangleAnchor anchor) {
        PointF result = new PointF();
        if (anchor == RectangleAnchor.CENTER) {
            result.set(RectShape.getCenterX(), RectShape.getCenterY());
        } else if (anchor == RectangleAnchor.TOP) {
            result.set(RectShape.getCenterX(), RectShape.getMinY());
        } else if (anchor == RectangleAnchor.BOTTOM) {
            result.set(RectShape.getCenterX(), RectShape.getMaxY());
        } else if (anchor == RectangleAnchor.LEFT) {
            result.set(RectShape.getMinX(), RectShape.getCenterY());
        } else if (anchor == RectangleAnchor.RIGHT) {
            result.set(RectShape.getMaxX(), RectShape.getCenterY());
        } else if (anchor == RectangleAnchor.TOP_LEFT) {
            result.set(RectShape.getMinX(), RectShape.getMinY());
        } else if (anchor == RectangleAnchor.TOP_RIGHT) {
            result.set(RectShape.getMaxX(), RectShape.getMinY());
        } else if (anchor == RectangleAnchor.BOTTOM_LEFT) {
            result.set(RectShape.getMinX(), RectShape.getMaxY());
        } else if (anchor == RectangleAnchor.BOTTOM_RIGHT) {
            result.set(RectShape.getMaxX(), RectShape.getMaxY());
        } 
        return result;
    } 
 
    /**