|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.globalse.arena.frag.visual.DrawManager
Class for managing the drawing things such as drawCircle or other things. It gets the parameter from the implemented ObjectPainter $Id: DrawManager.html,v 1.1 2003/02/12 18:06:20 schoecke Exp $ $Author: schoecke $
| Constructor Summary | |
DrawManager(ObjectManager objman,
WorldPainter worldPainter)
Creates a new DrawManager Panel. |
|
| Method Summary | |
void |
addShape(java.lang.String obj,
java.awt.Shape shape)
adds a shape to the list of shapes, that are currently on the screen |
void |
clearCurrPainted()
removes alle the elements which are saved for painting in the DrawManager. |
void |
drawArea(java.lang.String obj,
double xCenter,
double yCenter,
double zCenter,
double xSize,
double ySize,
java.awt.Color col,
boolean foreground)
Paints a specified area with a specified colour. |
void |
drawGLObject(java.lang.String obj,
MathVector pos)
draws gl object |
void |
drawImage(java.lang.String obj,
MathVector pos,
java.awt.Image pImg,
boolean foreground)
Draws an image to the specified position. |
IDrawPane |
getDrawPane()
returns a JLayeredPane for doing the real painting. |
MathVector[] |
getMapPosition()
Returns the actual visible part of the game map. |
java.lang.String |
getObjAtPos(int x,
int y)
Returns the Object at a position of the GamePane. |
ObjectPainter |
getObjectPainter()
Returns a objectpainter object. |
WorldPainter |
getWorldPainter()
Returns a worldpainter object. |
void |
paintObjects()
Is a forward call to the DrawPane class where the objects are drawn. |
void |
setDrawPane(IDrawPane mainPane)
Method setDrawPane. |
void |
setMapCenter(MathVector center)
This methods sets the visible part of the map in the DrawManager instance. |
void |
setScale(int scale)
Sets the scale of the map in Percent. |
void |
updateMapPosition()
updates the internally view of the map position so that the drawManager knows which is the visible part |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public DrawManager(ObjectManager objman,
WorldPainter worldPainter)
objman - The current instance of ObjectManagerworldPainter - The instance of the class, responsible for drawing the world backgroundObjectManager| Method Detail |
public void drawImage(java.lang.String obj,
MathVector pos,
java.awt.Image pImg,
boolean foreground)
obj - String of the object which is drawnforeground - if true the object is drawn in the forground else in the backgroundpos - The position of the Object (Absolute position, not position on the screen)pImg - The image for the Object
public void drawArea(java.lang.String obj,
double xCenter,
double yCenter,
double zCenter,
double xSize,
double ySize,
java.awt.Color col,
boolean foreground)
obj - The Object which is drawn (String)xCenter - center in x coordinates of doubleyCenter - center in y coordinates of doublezCenter - center in z coordinates of doublexSize - double The xSizeySize - double The ySizecol - The color of the Areaforeground - true, when the object must be drawn into the foreground
public void addShape(java.lang.String obj,
java.awt.Shape shape)
obj - string-name of the objectshape - instanceof Shape; the shape that the object covers on the
screenpublic void setMapCenter(MathVector center)
center - Center of the visible part.
public java.lang.String getObjAtPos(int x,
int y)
x - The x coordinatey - The y coordinatepublic void setScale(int scale)
scale - The scale factorpublic MathVector[] getMapPosition()
public void updateMapPosition()
public WorldPainter getWorldPainter()
DrawPanepublic ObjectPainter getObjectPainter()
ObjectPainterpublic IDrawPane getDrawPane()
public void paintObjects()
DrawPanepublic void clearCurrPainted()
public void setDrawPane(IDrawPane mainPane)
mainPane - instanceof IDrawPane
public void drawGLObject(java.lang.String obj,
MathVector pos)
obj - String name of the objectpos - MathVector pos where the object is drawn.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||