public class Line extends Roi
| Modifier and Type | Field and Description |
|---|---|
protected double |
startxd |
protected double |
startyd |
int |
x1 |
double |
x1d |
protected double |
x1R |
int |
x2 |
double |
x2d |
protected double |
x2R |
int |
y1 |
double |
y1d |
protected double |
y1R |
int |
y2 |
double |
y2d |
protected double |
y2R |
ANGLE, asp_bk, aspect, center, clipHeight, clipWidth, clipX, clipY, COMPOSITE, constrain, CONSTRUCTING, defaultFillColor, fillColor, FREELINE, FREEROI, HANDLE_SIZE, handleColor, ignoreClipRect, instanceColor, LINE, lineWidth, mag, MOVING, MOVING_HANDLE, nonScalable, NORMAL, NOT_PASTING, oldHeight, oldWidth, oldX, oldY, onePixelWide, OVAL, overlay, POINT, POLYGON, POLYLINE, previousRoi, RECTANGLE, RESIZING, ROIColor, stroke, strokeColor, TRACED_ROI, type, updateFullWindow, wideLine, xMax, yMax| Constructor and Description |
|---|
Line(double ox1,
double oy1,
double ox2,
double oy2)
Creates a new straight line selection using the specified starting and
ending offscreen double coordinates.
|
Line(int ox1,
int oy1,
int ox2,
int oy2)
Creates a new straight line selection using the specified starting and
ending offscreen integer coordinates.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
clipRectMargin() |
boolean |
contains(int x,
int y) |
void |
draw(Graphics g)
Draws this line on the image.
|
protected void |
drawLine(int sx,
int sy) |
Rectangle |
getBounds()
Return the bounding rectangle of this line.
|
boolean |
getDrawOffset()
Returns true if this is a PolygonRoi that supports sub-pixel resolution
and polygons are drawn on zoomed images offset down and to the right by
0.5 pixels..
|
Polygon |
getPoints()
Returns, as a Polygon, the two points that define this line.
|
double |
getRawLength()
Returns the length of this line in pixels.
|
static int |
getWidth() |
protected void |
grow(int sx,
int sy) |
void |
mouseMoved(MouseEvent e) |
void |
setDrawOffset(boolean drawOffset) |
void |
setLocation(int x,
int y)
Set the location of the ROI in image coordinates.
|
void |
setStrokeWidth(float width)
Sets the width of the line used to draw this ROI.
|
static void |
setWidth(int w) |
boolean |
subPixelResolution()
Always returns true.
|
copyAttributes, drawOverlay, enableSubPixelResolution, getAngle, getBoundingRect, getColor, getConvexHull, getCornerDiameter, getCPosition, getDebugInfo, getDefaultFillColor, getFillColor, getFloatBounds, getFloatHeight, getFloatWidth, getHashCode, getName, getPolygon, getPosition, getProperties, getProperty, getPropertyCount, getPrototypeOverlay, getRoundRectArcSize, getState, getStroke, getStrokeColor, getStrokeWidth, getTPosition, getType, getTypeAsString, getXBase, getYBase, getZPosition, isArea, isCursor, isDrawingTool, isLine, setColor, setCornerDiameter, setDefaultFillColor, setFillColor, setIgnoreClipRect, setIsCursor, setLocation, setName, setNonScalable, setPosition, setPosition, setProperty, setPrototypeOverlay, setRotationCenter, setRoundRectArcSize, setStroke, setStrokeColor, setStrokeWidth, temporarilyHide, toFloat, toInt, toInt, toIntR, toStringpublic int x1
public int y1
public int x2
public int y2
public double x1d
public double y1d
public double x2d
public double y2d
protected double x1R
protected double y1R
protected double x2R
protected double y2R
protected double startxd
protected double startyd
public Line(int ox1,
int oy1,
int ox2,
int oy2)
public Line(double ox1,
double oy1,
double ox2,
double oy2)
protected void grow(int sx,
int sy)
public void mouseMoved(MouseEvent e)
protected void drawLine(int sx,
int sy)
public double getRawLength()
public Polygon getPoints()
public static int getWidth()
public static void setWidth(int w)
public void setStrokeWidth(float width)
RoisetStrokeWidth in class RoiRoi.setStrokeColor(Color)public Rectangle getBounds()
protected int clipRectMargin()
clipRectMargin in class Roipublic boolean getDrawOffset()
RoigetDrawOffset in class Roipublic void setDrawOffset(boolean drawOffset)
setDrawOffset in class Roipublic boolean subPixelResolution()
subPixelResolution in class Roipublic void setLocation(int x,
int y)
RoisetLocation in class RoiCopyright © 2023. All rights reserved.