public class RenderingTransformAid extends Object
Constructor and Description |
---|
RenderingTransformAid(int width,
int height,
int pad,
double x0,
double y0,
double x1,
double y1)
Constructs resources for a coordinate system appropriate for the
presentation of a rectangular region defined by the specified coordinates.
|
Modifier and Type | Method and Description |
---|---|
AffineTransform |
getCartesianToPixelTransform()
Gets the affine transform for mapping Cartesian coordinates to pixel
coordinates.
|
Rectangle2D |
getDomainRectangle()
Gets the rectangle for the drawing area corresponding to the coordinate
domain that was specified for the constructor.
|
double |
getPixelsPerUnit()
Gets the distance in pixels across one unit of distance in
the Cartesian coordinate system.
|
AffineTransform |
getPixelToCartesianTransform()
Gets the affine transform for mapping pixel coordinates to Cartesian
coordinates.
|
double |
getUnitsPerPixel()
Gets the distance across a pixel in the corresponding Cartesian
coordinate system.
|
public RenderingTransformAid(int width, int height, int pad, double x0, double y0, double x1, double y1)
width
- the width of the drawing surface, in pixelsheight
- the height of the drawing surface, in pixelspad
- an arbitrary padding to be added to each side of the rectangle,
in pixelsx0
- Cartesian x coordinate for the lower-left corner of the domainy0
- Cartesian y coordinate for the lower-left corner of the domainx1
- Cartesian x coordinate for the upper-right corner of the domainy1
- Cartesian y coordinate for the upper-right corner of the domainpublic AffineTransform getCartesianToPixelTransform()
public AffineTransform getPixelToCartesianTransform()
public Rectangle2D getDomainRectangle()
public double getUnitsPerPixel()
public double getPixelsPerUnit()
Copyright © 2021. All rights reserved.