Example usage for java.awt.geom Rectangle2D.Float Rectangle2D.Float

List of usage examples for java.awt.geom Rectangle2D.Float Rectangle2D.Float

Introduction

In this page you can find the example usage for java.awt.geom Rectangle2D.Float Rectangle2D.Float.

Prototype

public Float(float x, float y, float w, float h) 

Source Link

Document

Constructs and initializes a Rectangle2D from the specified float coordinates.

Usage

From source file:tufts.vue.LWComponent.java

/**
 * @return the raw, zero based, non-scaled bounds.
 *
 * Altho the x/y of the rectangle will normally be 0,0 (suggesting we could just use
 * a size object here), that's not always the case: a component who shares it's
 * coordinate space with it's parent (such as a link) will usually have a non-zero
 * x/y in the zero bounds./*from w  ww.j  ava2 s .co  m*/
 */
protected Rectangle2D.Float getZeroBounds() {
    return new Rectangle2D.Float(0, 0, getWidth(), getHeight());
}

From source file:tufts.vue.LWComponent.java

/** @return the PARENT based bounds  -- this is the local component x,y  width*scale,height*scale, where scale
 * is any local scale this component has (not the total map scale: the scale that includes the scaling of all ancestors) */
public Rectangle2D.Float getLocalBounds() {
    return new Rectangle2D.Float(getX(), getY(), getLocalWidth(), getLocalHeight());
}

From source file:tufts.vue.LWComponent.java

/** @return map-coord (absolute) bounds of the stroke shape (not including any stroke width) */
public Rectangle2D.Float getMapBounds() {
    return new Rectangle2D.Float(getMapX(), getMapY(), getMapWidth(), getMapHeight());
}