|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xbig.base.NativeObject
org.ogre4j.Font
public class Font
| Nested Class Summary | |
|---|---|
protected static class |
Font.CmdCodePoints
|
protected static class |
Font.CmdResolution
|
protected static class |
Font.CmdSize
|
protected static class |
Font.CmdSource
|
protected static class |
Font.CmdType
|
protected static class |
Font.CodePointMap
|
static class |
Font.CodePointRange
|
static class |
Font.CodePointRangeList
|
static class |
Font.GlyphInfo
|
| Nested classes/interfaces inherited from interface org.ogre4j.IFont |
|---|
IFont.ICmdCodePoints, IFont.ICmdResolution, IFont.ICmdSize, IFont.ICmdSource, IFont.ICmdType, IFont.ICodePointMap, IFont.ICodePointRange, IFont.ICodePointRangeList, IFont.IGlyphInfo |
| Nested classes/interfaces inherited from interface org.ogre4j.IResource |
|---|
IResource.IListener, IResource.IListenerList |
| Field Summary |
|---|
| Fields inherited from class org.xbig.base.NativeObject |
|---|
deleted, object, remote |
| Constructor Summary | |
|---|---|
|
Font(InstancePointer p)
This constructor is public for internal useage only! |
protected |
Font(InstancePointer p,
boolean remote)
Creates a Java wrapper object for an existing C++ object. |
|
Font(IResourceManager creator,
java.lang.String name,
long handle,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader)
Constructor. |
|
Font(WithoutNativeObject val)
Allows creation of Java objects without C++ objects. |
| Method Summary | |
|---|---|
void |
_dirtyState()
Manually mark the state of this resource as having been changed. |
void |
_fireBackgroundLoadingComplete()
Firing of background loading complete event |
void |
_fireBackgroundPreparingComplete()
Firing of background preparing complete event |
void |
_notifyOrigin(java.lang.String origin)
|
void |
addCodePointRange(IFont.ICodePointRange range)
Adds a range of code points to the list of code point ranges to generate glyphs for, if this is a truetype based font. |
void |
addListener(IResource.IListener lis)
Register a listener on this resource. |
void |
changeGroupOwnership(java.lang.String newGroup)
Change the resource group ownership of a . |
static void |
cleanupDictionary()
Cleans up the static 'msDictionary' required to reset , otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the implementers (e.g. ) initializes. |
void |
clearCodePointRanges()
Clear the list of code point ranges. |
void |
copyParametersTo(IStringInterface dest)
Method for copying this object's parameters to another object. |
void |
delete()
Deletes the corresponding C++ object. |
void |
escalateLoading()
Escalates the loading of a background loaded resource. |
void |
finalize()
|
boolean |
getAntialiasColour()
Gets whether or not the colour of this font is antialiased as it is generated from a true type font. |
IFont.ICodePointRangeList |
getCodePointRangeList()
Get a const reference to the list of code point ranges to be used to generate glyphs from a truetype font. |
IResourceManager |
getCreator()
|
float |
getGlyphAspectRatio(long id)
Gets the aspect ratio (width / height) of this character. |
IFont.IGlyphInfo |
getGlyphInfo(long id)
Gets the information available for a glyph corresponding to a given code point, or throws an exception if it doesn't exist; |
IFloatRect |
getGlyphTexCoords(long id)
Returns the texture coordinates of the associated glyph. |
java.lang.String |
getGroup()
|
long |
getHandle()
|
Resource.LoadingState |
getLoadingState()
Returns the current loading state. |
IMaterialPtr |
getMaterial_const()
|
IMaterialPtr |
getMaterial()
Gets the material generated for this font, as a weak reference. |
java.lang.String |
getName()
Gets resource name. |
java.lang.String |
getOrigin()
Get the origin of this resource, e.g. a script file name. |
IParamDictionary |
getParamDictionary_const()
|
IParamDictionary |
getParamDictionary()
Retrieves the parameter dictionary for this class. |
java.lang.String |
getParameter(java.lang.String name)
Generic parameter retrieval method. |
IParameterList |
getParameters()
Retrieves a list of parameters valid for this object. |
int |
getSize()
Retrieves info about the size of the resource. |
java.lang.String |
getSource()
Gets the source this font (either an image or a truetype font). |
int |
getStateCount()
Returns the number of times this resource has changed state, which generally means the number of times it has been loaded. |
int |
getTrueTypeMaxBearingY()
Gets the maximum baseline distance of all glyphs used in the texture. |
long |
getTrueTypeResolution()
Gets the resolution (dpi) of the font used to generate the texture. |
float |
getTrueTypeSize()
Gets the point size of the font used to generate the texture. |
FontType |
getType()
Gets the type of font. |
boolean |
isBackgroundLoaded()
Returns whether this has been earmarked for background loading. |
boolean |
isLoaded()
Returns true if the has been loaded, false otherwise. |
boolean |
isLoading()
Returns whether the resource is currently in the process of background loading. |
boolean |
isManuallyLoaded()
Is this resource manually loaded? |
boolean |
isPrepared()
Returns true if the has been prepared, false otherwise. |
boolean |
isReloadable()
Returns true if the is reloadable, false otherwise. |
void |
load(boolean backgroundThread)
Loads the resource, if it is not already. |
void |
loadResource(IResource resource)
Implementation of , called when the that this font creates needs to (re)load. |
void |
prepare()
Prepares the resource for load, if it is not already. |
void |
prepareResource(IResource resource)
Called when a resource wishes to load. |
void |
reload()
Reloads the resource, if it is already loaded. |
void |
removeListener(IResource.IListener lis)
Remove a listener on this resource. |
void |
setAntialiasColour(boolean enabled)
Sets whether or not the colour of this font is antialiased as it is generated from a true type font. |
void |
setBackgroundLoaded(boolean bl)
Tells the resource whether it is background loaded or not. |
void |
setGlyphAspectRatio(long id,
float ratio)
Sets the aspect ratio (width / height) of this character. |
void |
setGlyphTexCoords(long id,
float u1,
float v1,
float u2,
float v2,
float textureAspect)
Sets the texture coordinates of a glyph. |
boolean |
setParameter(java.lang.String name,
java.lang.String value)
Generic parameter setting method. |
void |
setParameterList(INameValuePairList paramList)
Generic multiple parameter setting method. |
void |
setSource(java.lang.String source)
Sets the source of the font. |
void |
setTrueTypeResolution(long ttfResolution)
Gets the resolution (dpi) of the font used to generate the texture (only required for FT_TRUETYPE). |
void |
setTrueTypeSize(float ttfSize)
Sets the size of a truetype font (only required for FT_TRUETYPE). |
void |
setType(FontType ftype)
Sets the type of font. |
void |
touch()
'Touches' the resource to indicate it has been used. |
void |
unload()
Unloads the resource; this is not permanent, the resource can be reloaded later if required. |
| Methods inherited from class org.xbig.base.NativeObject |
|---|
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.xbig.base.INativeObject |
|---|
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer |
| Constructor Detail |
|---|
public Font(InstancePointer p)
protected Font(InstancePointer p,
boolean remote)
public Font(WithoutNativeObject val)
WithoutNativeObject,
INativeObject.disconnectFromNativeObject()
public Font(IResourceManager creator,
java.lang.String name,
long handle,
java.lang.String group,
boolean isManual,
IManualResourceLoader loader)
| Method Detail |
|---|
public void delete()
INativeObjectSubclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!
delete in interface INativeObjectdelete in class NativeObject#remotepublic void finalize()
finalize in class NativeObjectpublic void setType(FontType ftype)
setType in interface IFontpublic FontType getType()
getType in interface IFontpublic void setSource(java.lang.String source)
setSource in interface IFontpublic java.lang.String getSource()
getSource in interface IFontpublic void setTrueTypeSize(float ttfSize)
setTrueTypeSize in interface IFontpublic void setTrueTypeResolution(long ttfResolution)
setTrueTypeResolution in interface IFontpublic float getTrueTypeSize()
getTrueTypeSize in interface IFontpublic long getTrueTypeResolution()
getTrueTypeResolution in interface IFontpublic int getTrueTypeMaxBearingY()
getTrueTypeMaxBearingY in interface IFontpublic IFloatRect getGlyphTexCoords(long id)
getGlyphTexCoords in interface IFont
public void setGlyphTexCoords(long id,
float u1,
float v1,
float u2,
float v2,
float textureAspect)
setGlyphTexCoords in interface IFontpublic float getGlyphAspectRatio(long id)
getGlyphAspectRatio in interface IFont
public void setGlyphAspectRatio(long id,
float ratio)
setGlyphAspectRatio in interface IFontpublic IFont.IGlyphInfo getGlyphInfo(long id)
getGlyphInfo in interface IFontpublic void addCodePointRange(IFont.ICodePointRange range)
addCodePointRange in interface IFontpublic void clearCodePointRanges()
clearCodePointRanges in interface IFontpublic IFont.ICodePointRangeList getCodePointRangeList()
getCodePointRangeList in interface IFontpublic IMaterialPtr getMaterial_const()
getMaterial_const in interface IFontpublic IMaterialPtr getMaterial()
getMaterial in interface IFontpublic void setAntialiasColour(boolean enabled)
setAntialiasColour in interface IFontpublic boolean getAntialiasColour()
getAntialiasColour in interface IFontpublic void loadResource(IResource resource)
loadResource in interface IFontloadResource in interface IManualResourceLoaderpublic void prepare()
prepare in interface IResourcepublic void load(boolean backgroundThread)
load in interface IResourcepublic void reload()
reload in interface IResourcepublic boolean isReloadable()
isReloadable in interface IResourcepublic boolean isManuallyLoaded()
isManuallyLoaded in interface IResourcepublic void unload()
unload in interface IResourcepublic int getSize()
getSize in interface IResourcepublic void touch()
touch in interface IResourcepublic java.lang.String getName()
getName in interface IResourcepublic long getHandle()
getHandle in interface IResourcepublic boolean isPrepared()
isPrepared in interface IResourcepublic boolean isLoaded()
isLoaded in interface IResourcepublic boolean isLoading()
isLoading in interface IResourcepublic Resource.LoadingState getLoadingState()
getLoadingState in interface IResourcepublic boolean isBackgroundLoaded()
isBackgroundLoaded in interface IResourcepublic void setBackgroundLoaded(boolean bl)
setBackgroundLoaded in interface IResourcepublic void escalateLoading()
escalateLoading in interface IResourcepublic void addListener(IResource.IListener lis)
addListener in interface IResourcepublic void removeListener(IResource.IListener lis)
removeListener in interface IResourcepublic java.lang.String getGroup()
getGroup in interface IResourcepublic void changeGroupOwnership(java.lang.String newGroup)
changeGroupOwnership in interface IResourcepublic IResourceManager getCreator()
getCreator in interface IResourcepublic java.lang.String getOrigin()
getOrigin in interface IResourcepublic void _notifyOrigin(java.lang.String origin)
_notifyOrigin in interface IResourcepublic int getStateCount()
getStateCount in interface IResourcepublic void _dirtyState()
_dirtyState in interface IResourcepublic void _fireBackgroundLoadingComplete()
_fireBackgroundLoadingComplete in interface IResourcepublic void _fireBackgroundPreparingComplete()
_fireBackgroundPreparingComplete in interface IResourcepublic IParamDictionary getParamDictionary()
getParamDictionary in interface IStringInterfacepublic IParamDictionary getParamDictionary_const()
getParamDictionary_const in interface IStringInterfacepublic IParameterList getParameters()
getParameters in interface IStringInterface
public boolean setParameter(java.lang.String name,
java.lang.String value)
setParameter in interface IStringInterfacepublic void setParameterList(INameValuePairList paramList)
setParameterList in interface IStringInterfacepublic java.lang.String getParameter(java.lang.String name)
getParameter in interface IStringInterfacepublic void copyParametersTo(IStringInterface dest)
copyParametersTo in interface IStringInterfacepublic static void cleanupDictionary()
public void prepareResource(IResource resource)
prepareResource in interface IManualResourceLoader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||