Class Face
java.lang.Object
com.realtime.crossfire.jxclient.faces.Face
A
Face represents one image received from a Crossfire server. The
face is uniquely identified by a face id; it has a face name and three images
(original as sent by the server, scaled for use in map view, scaled for use
in magic map view) attached.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintReturns the face checksum.@Nullable FaceImagesReturns the images.@NotNull StringReturns the face name.intReturns the unique face id.intReturns the face height in tiles.intReturns the face width in tiles.inthashCode()voidsetFaceImages(@NotNull FaceImages faceImages) Sets the images.@NotNull StringtoString()
-
Field Details
-
SQUARE_SIZE
public static final int SQUARE_SIZEThe size of one square in pixels.- See Also:
-
-
Constructor Details
-
Face
Creates a new instance.- Parameters:
faceNum- the unique face idfaceName- the face namefaceChecksum- the image checksum as sent by the server
-
-
Method Details
-
setFaceImages
Sets the images.- Parameters:
faceImages- the images
-
getFaceNum
public int getFaceNum()Returns the unique face id.- Returns:
- the face id
-
getFaceImages
Returns the images. May returnnullif the images are not yet known, or if they have been dropped from the cache.- Returns:
- the images or
null
-
getFaceName
Returns the face name.- Returns:
- the face name
-
getFaceChecksum
public int getFaceChecksum()Returns the face checksum.- Returns:
- the face checksum
-
toString
-
getTileWidth
public int getTileWidth()Returns the face width in tiles.- Returns:
- the tile width
-
getTileHeight
public int getTileHeight()Returns the face height in tiles.- Returns:
- the tile height
-
hashCode
public int hashCode() -
equals
-