|
|||||||||
| Home >> All >> com >> xerox >> VTM >> [ glyphs overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.xerox.VTM.glyphs
Class VImage

java.lang.Objectcom.xerox.VTM.glyphs.Glyph
com.xerox.VTM.glyphs.VImage
- All Implemented Interfaces:
- java.lang.Cloneable, RectangularShape
- Direct Known Subclasses:
- VImageOr
- public class VImage
- extends Glyph
- implements RectangularShape, java.lang.Cloneable
- extends Glyph
Image (rectangular) - cannot be reoriented
| Field Summary | |
(package private) float |
ar
aspect ratio (width divided by height) |
(package private) java.awt.geom.AffineTransform |
at
|
static short |
DRAW_BORDER_ALWAYS
|
static short |
DRAW_BORDER_MOUSE_INSIDE
|
static short |
DRAW_BORDER_NEVER
|
(package private) short |
drawBorder
draw border policy 0=never draw border 1=draw border if cursor inside 2=always draw border |
(package private) java.awt.Image |
image
|
(package private) ProjImage[] |
pc
|
(package private) float |
scaleFactor
|
(package private) float |
trueCoef
|
(package private) long |
vh
half width and height in virtual space |
(package private) long |
vw
half width and height in virtual space |
(package private) boolean |
zoomSensitive
|
| Fields inherited from class com.xerox.VTM.glyphs.Glyph |
bColor, borderColor, cGlyph, coef, color, dashedContour, DEFAULT_STROKE_WIDTH, dependants, filled, font, fontSize, fontSizePolicy, HSV, HSVb, ID, mouseInsideColor, orient, owner, paintBorder, selected, selectedColor, sensit, size, stickedGlyphs, stickedTo, stroke, strokeWidth, text, textHeight, textPos, textWidth, type, visible, vsm, vx, vy, vz |
| Constructor Summary | |
VImage(java.awt.Image img)
|
|
VImage(long x,
long y,
float z,
java.awt.Image img)
|
|
| Method Summary | |
void |
addCamera(int verifIndex)
used internally to create new projected coordinates to use with the new camera |
java.lang.Object |
clone()
returns a clone of this object (only basic information is cloned for now: shape, orientation, position, size) |
(package private) void |
computeSize()
compute size (bounding circle radius) |
boolean |
coordInside(int x,
int y,
int camIndex)
detects whether the given point is inside this glyph or not |
void |
draw(java.awt.Graphics2D g,
int vW,
int vH,
int i,
java.awt.Stroke stdS,
java.awt.geom.AffineTransform stdT)
draw glyph |
boolean |
fillsView(long w,
long h,
int camIndex)
used to find out if glyph completely fills the view (in which case it is not necessary to repaint objects at a lower altitude) |
long |
getHeight()
get half height |
java.awt.Image |
getImage()
get the bitmap image to be displayed |
float |
getOrient()
get orientation |
float |
getSize()
get size (bounding circle radius) |
long |
getWidth()
get half width |
void |
initCams(int nbCam)
called when glyph is created in order to create the initial set of projected coordinates wrt the number of cameras in the space |
boolean |
isZoomSensitive()
if false, text size is not sensitive to zoom |
int |
mouseInOut(int x,
int y,
int camIndex)
returns 1 if mouse has entered the glyph, -1 if it has exited the glyph, 0 if nothing has changed (meaning it was already inside or outside it) |
void |
orientTo(float angle)
set orientation (absolute) - has no effect |
void |
project(com.xerox.VTM.engine.Camera c,
com.xerox.VTM.engine.ViewPanel v)
project shape in camera coord sys prior to actual painting |
void |
removeCamera(int index)
if a camera is removed from the virtual space, we should delete the corresponding projected coordinates, but do not modify the array it self because we do not want to change other cameras' index - just point to null |
void |
resetMouseIn(int i)
reset prevMouseIn for projected coordinates nb i |
void |
reSize(float factor)
multiply bounding circle radius by factor |
void |
setDrawBorderPolicy(short p)
|
void |
setHeight(long h)
set absolute half height (no effect: use setImage) |
void |
setImage(java.awt.Image i)
set image to be displayed |
void |
setWidth(long w)
set absolute half width - aspect ratio is automatically maintained (height modified accordingly) |
void |
setZoomSensitive(boolean b)
if false, image size is not sensitive to zoom (but its size can be changed) |
void |
sizeTo(float radius)
set absolute size by setting bounding circle radius |
| Methods inherited from class com.xerox.VTM.glyphs.Glyph |
addDependant, addHSVbColor, addHSVColor, drawMe, getCGlyph, getColor, getColorb, getDependants, getFillStatus, getFont, getHSVbColor, getHSVColor, getID, getLocation, getOwner, getPaintBorderStatus, getStickedGlyphs, getStroke, getStrokeWidth, getText, getType, isSelected, isSensitive, isVisible, move, moveTo, propagateMove, removeDependant, select, setBorderColor, setCGlyph, setColor, setDashed, setFill, setFontSizePolicy, setHSVbColor, setHSVColor, setID, setMouseInsideColor, setOwner, setPaintBorder, setSelectedColor, setSensitivity, setSpecialFont, setStroke, setStrokeWidth, setText, setTextPos, setType, setVisible, setVSM, stick, toString, unstick, usesSpecialFont |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
DRAW_BORDER_NEVER
public static short DRAW_BORDER_NEVER
DRAW_BORDER_MOUSE_INSIDE
public static short DRAW_BORDER_MOUSE_INSIDE
DRAW_BORDER_ALWAYS
public static short DRAW_BORDER_ALWAYS
vw
long vw
- half width and height in virtual space
vh
long vh
- half width and height in virtual space
ar
float ar
- aspect ratio (width divided by height)
at
java.awt.geom.AffineTransform at
drawBorder
short drawBorder
- draw border policy 0=never draw border 1=draw border if cursor inside 2=always draw border
pc
ProjImage[] pc
image
java.awt.Image image
zoomSensitive
boolean zoomSensitive
scaleFactor
float scaleFactor
trueCoef
float trueCoef
| Constructor Detail |
VImage
public VImage(java.awt.Image img)
VImage
public VImage(long x,
long y,
float z,
java.awt.Image img)
| Method Detail |
initCams
public void initCams(int nbCam)
- called when glyph is created in order to create the initial set of projected coordinates wrt the number of cameras in the space
addCamera
public void addCamera(int verifIndex)
- used internally to create new projected coordinates to use with the new camera
removeCamera
public void removeCamera(int index)
- if a camera is removed from the virtual space, we should delete the corresponding projected coordinates, but do not modify the array it self because we do not want to change other cameras' index - just point to null
- Specified by:
removeCamerain classGlyph
resetMouseIn
public void resetMouseIn(int i)
- reset prevMouseIn for projected coordinates nb i
- Specified by:
resetMouseInin classGlyph
getOrient
public float getOrient()
orientTo
public void orientTo(float angle)
getSize
public float getSize()
computeSize
void computeSize()
- compute size (bounding circle radius)
setWidth
public void setWidth(long w)
- set absolute half width - aspect ratio is automatically maintained (height modified accordingly)
- Specified by:
setWidthin interfaceRectangularShape
setHeight
public void setHeight(long h)
- set absolute half height (no effect: use setImage)
- Specified by:
setHeightin interfaceRectangularShape
getWidth
public long getWidth()
- get half width
- Specified by:
getWidthin interfaceRectangularShape
getHeight
public long getHeight()
- get half height
- Specified by:
getHeightin interfaceRectangularShape
sizeTo
public void sizeTo(float radius)
reSize
public void reSize(float factor)
setImage
public void setImage(java.awt.Image i)
- set image to be displayed
getImage
public java.awt.Image getImage()
- get the bitmap image to be displayed
setZoomSensitive
public void setZoomSensitive(boolean b)
- if false, image size is not sensitive to zoom (but its size can be changed)
isZoomSensitive
public boolean isZoomSensitive()
- if false, text size is not sensitive to zoom
setDrawBorderPolicy
public void setDrawBorderPolicy(short p)
fillsView
public boolean fillsView(long w,
long h,
int camIndex)
- used to find out if glyph completely fills the view (in which case it is not necessary to repaint objects at a lower altitude)
coordInside
public boolean coordInside(int x,
int y,
int camIndex)
- detects whether the given point is inside this glyph or not
- Specified by:
coordInsidein classGlyph
mouseInOut
public int mouseInOut(int x,
int y,
int camIndex)
- returns 1 if mouse has entered the glyph, -1 if it has exited the glyph, 0 if nothing has changed (meaning it was already inside or outside it)
- Specified by:
mouseInOutin classGlyph
project
public void project(com.xerox.VTM.engine.Camera c, com.xerox.VTM.engine.ViewPanel v)
draw
public void draw(java.awt.Graphics2D g, int vW, int vH, int i, java.awt.Stroke stdS, java.awt.geom.AffineTransform stdT)
clone
public java.lang.Object clone()
- returns a clone of this object (only basic information is cloned for now: shape, orientation, position, size)
|
|||||||||
| Home >> All >> com >> xerox >> VTM >> [ glyphs overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC