public class VRectangleOr<T> extends VRectangle
VRectangle
,
PRectangle
,
FRectangle
,
SIRectangle
ar, pc, vh, vw
bColor, borderColor, cursorInsideFColor, HSVb
alphaC, coef, color, cursorInsideColor, ENTERED_GLYPH, EXITED_GLYPH, fColor, HSV, NO_CURSOR_EVENT, orient, sensit, size, stickedTo, stroke, visible, vx, vy, vz
acO
Constructor and Description |
---|
VRectangleOr() |
VRectangleOr(double x,
double y,
int z,
double w,
double h,
Color c,
Color bc,
double or) |
VRectangleOr(double x,
double y,
int z,
double w,
double h,
Color c,
Color bc,
double or,
float alpha) |
VRectangleOr(double x,
double y,
int z,
double w,
double h,
Color c,
double or) |
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
boolean |
coordInside(int jpx,
int jpy,
Camera c,
double cvx,
double cvy)
Detect whether the given point is inside this glyph or not.
|
boolean |
coordInsideP(int jpx,
int jpy,
Camera c)
Detect whether the given point is inside this glyph or not.
|
boolean |
coordInsideV(double cvx,
double cvy,
Camera c)
Detect whether the given point is inside this glyph or not.
|
void |
draw(Graphics2D g,
int vW,
int vH,
int i,
Stroke stdS,
AffineTransform stdT,
int dx,
int dy)
Draw this glyph.
|
void |
drawForLens(Graphics2D g,
int vW,
int vH,
int i,
Stroke stdS,
AffineTransform stdT,
int dx,
int dy)
Draw this glyph through a lens.
|
boolean |
fillsView(double w,
double h,
int camIndex)
Find out if this glyph completely fills a view.
|
double |
getOrient()
Get the glyph's orientation.
|
void |
move(double x,
double y)
Translate the glyph by (x,y) - relative translation.
|
void |
moveTo(double x,
double y)
Translate the glyph to (x,y) - absolute translation.
|
void |
orientTo(double angle)
Set the glyph's absolute orientation.
|
void |
project(Camera c,
Dimension d)
Project glyph w.r.t a given camera's coordinate system, prior to actual painting.
|
void |
projectForLens(Camera c,
int lensWidth,
int lensHeight,
float lensMag,
double lensx,
double lensy)
Project glyph w.r.t a given camera's coordinate system, prior to actual painting through a lens.
|
void |
reSize(double factor)
Set glyph's size by multiplying its bounding circle diameter by a factor.
|
void |
setHeight(double h)
Set height in virtual space.
|
void |
setWidth(double w)
Set width in virtual space.
|
void |
sizeTo(double s)
Set glyph's size by setting its bounding circle's diameter.
|
boolean |
visibleInDisc(double dvx,
double dvy,
double dvr,
Shape dvs,
int camIndex,
int jpx,
int jpy,
int dpr)
The disc is actually approximated to its bounding box here.
|
boolean |
visibleInRegion(double wb,
double nb,
double eb,
double sb,
int i)
Method used internally to find out if it is necessary to project and draw this glyph for a given camera.
|
addCamera, getBounds, getHeight, getJava2DShape, getSize, getWidth, initCams, removeCamera
addHSVbColor, getBorderColor, getDefaultBorderColor, getHSVbColor, highlight, isBorderDrawn, isFilled, setBorderColor, setCursorInsideFillColor, setDrawBorder, setFilled, setHSVbColor
addHSVColor, containedInRegion, getColor, getDefaultColor, getDefaultCursorInsideHighlightColor, getHSVColor, getLocation, getOwner, getStickedGlyphArray, getStroke, getTranslucencyValue, getType, getZindex, isSelected, isSensitive, isVisible, isVisibleThroughLens, propagateMove, select, setColor, setCursorInsideHighlightColor, setDefaultCursorInsideHighlightColor, setHSVColor, setOwner, setSensitivity, setStroke, setTranslucencyValue, setType, setVisible, setZindex, stick, stickToGlyph, toString, unstick, unstickAllGlyphs, unstickAllGlyphs, unstickFromGlyph, visibleInViewport
public VRectangleOr()
public VRectangleOr(double x, double y, int z, double w, double h, Color c, double or)
x
- coordinate in virtual spacey
- coordinate in virtual spacez
- z-index (pass 0 if you do not use z-ordering)w
- width in virtual spaceh
- height in virtual spacec
- fill coloror
- orientationpublic VRectangleOr(double x, double y, int z, double w, double h, Color c, Color bc, double or)
x
- coordinate in virtual spacey
- coordinate in virtual spacez
- z-index (pass 0 if you do not use z-ordering)w
- width in virtual spaceh
- height in virtual spacec
- fill colorbc
- border coloror
- orientationpublic VRectangleOr(double x, double y, int z, double w, double h, Color c, Color bc, double or, float alpha)
x
- coordinate in virtual spacey
- coordinate in virtual spacez
- z-index (pass 0 if you do not use z-ordering)w
- width in virtual spaceh
- height in virtual spacec
- fill colorbc
- border coloror
- orientationalpha
- in [0;1.0]. 0 is fully transparent, 1 is opaquepublic void moveTo(double x, double y)
Glyph
moveTo
in class Glyph
Glyph.move(double x, double y)
public void move(double x, double y)
Glyph
move
in class Glyph
Glyph.moveTo(double x, double y)
public double getOrient()
Glyph
getOrient
in class VRectangle
public void orientTo(double angle)
orientTo
in class VRectangle
angle
- in [0:2Pi[public void sizeTo(double s)
Glyph
sizeTo
in class VRectangle
Glyph.reSize(double factor)
public void setWidth(double w)
RectangularShape
setWidth
in interface RectangularShape
setWidth
in class VRectangle
public void setHeight(double h)
RectangularShape
setHeight
in interface RectangularShape
setHeight
in class VRectangle
public void reSize(double factor)
Glyph
reSize
in class VRectangle
Glyph.sizeTo(double s)
public boolean fillsView(double w, double h, int camIndex)
Glyph
fillsView
in class VRectangle
public boolean visibleInDisc(double dvx, double dvy, double dvr, Shape dvs, int camIndex, int jpx, int jpy, int dpr)
visibleInDisc
in class VRectangle
public boolean visibleInRegion(double wb, double nb, double eb, double sb, int i)
Glyph
visibleInRegion
in class VRectangle
wb
- west region boundary (virtual space coordinates)nb
- north region boundary (virtual space coordinates)eb
- east region boundary (virtual space coordinates)sb
- south region boundary (virtual space coordinates)i
- camera index (useuful only for some glyph classes redefining this method)public boolean coordInside(int jpx, int jpy, Camera c, double cvx, double cvy)
Glyph
coordInside
in class VRectangle
jpx
- provide projected JPanel coordinates of the associated view, not virtual space coordinatesjpy
- provide projected JPanel coordinates of the associated view, not virtual space coordinatesc
- camera through which the glyph is observed (only a few types of Glyph actually require this information: SICircle, SIRectangle, VText)cvx
- virtual space coordinatescvy
- virtual space coordinatesGlyph.coordInsideV(double cvx, double cvy, Camera c)
,
Glyph.coordInsideP(int jpx, int jpy, Camera c)
public boolean coordInsideV(double cvx, double cvy, Camera c)
Glyph
coordInsideV
in class VRectangle
cvx
- virtual space coordinatescvy
- virtual space coordinatesc
- camera through which the glyph is observed (only a few types of Glyph actually require this information: SICircle, SIRectangle, VText)Glyph.coordInside(int jpx, int jpy, Camera c, double cvx, double cvy)
,
Glyph.coordInsideP(int jpx, int jpy, Camera c)
public boolean coordInsideP(int jpx, int jpy, Camera c)
Glyph
coordInsideP
in class VRectangle
jpx
- provide projected JPanel coordinates of the associated view, not virtual space coordinatesjpy
- provide projected JPanel coordinates of the associated view, not virtual space coordinatesc
- camera through which the glyph is observedGlyph.coordInsideV(double cvx, double cvy, Camera c)
,
Glyph.coordInside(int jpx, int jpy, Camera c, double cvx, double cvy)
public void project(Camera c, Dimension d)
Glyph
project
in class VRectangle
c
- camerad
- dimension of View using camera cpublic void projectForLens(Camera c, int lensWidth, int lensHeight, float lensMag, double lensx, double lensy)
Glyph
projectForLens
in class VRectangle
c
- cameralensWidth
- width of lens activated in View using this cameralensHeight
- height of lens activated in View using this cameralensMag
- magnification factor of lens activated in View using this cameralensx
- horizontal coordinateof lens activated in View using this cameralensy
- vertical coordinate of lens activated in View using this camerapublic void draw(Graphics2D g, int vW, int vH, int i, Stroke stdS, AffineTransform stdT, int dx, int dy)
Glyph
draw
in class VRectangle
g
- graphics context in which the glyph should be drawnvW
- associated View width (used by some closed shapes to determine if it is worth painting the glyph's border)vH
- associated View height (used by some closed shapes to determine if it is worth painting the glyph's border)i
- camera index in the virtual space containing the glyphstdS
- default strokestdT
- identity transformdx
- horizontal offsetdy
- vertical offsetpublic void drawForLens(Graphics2D g, int vW, int vH, int i, Stroke stdS, AffineTransform stdT, int dx, int dy)
Glyph
drawForLens
in class VRectangle
g
- graphics context in which the glyph should be drawnvW
- associated View width (used by some closed shapes to determine if it is worth painting the glyph's border)vH
- associated View height (used by some closed shapes to determine if it is worth painting the glyph's border)i
- camera index in the virtual space containing the glyphstdS
- default strokestdT
- identity transformdx
- horizontal offsetdy
- vertical offsetpublic Object clone()
clone
in class VRectangle
Copyright © 2000-2002 Xerox Corporation. All Rights Reserved
Copyright © 2003 World Wide Web Consortium. All Rights Reserved
Copyright © 2004-2015 INRIA. All Rights Reserved
Licensed under the GNU LGPL. For full terms see the file COPYING.