com.visioglobe.libVisioDevKit
Class VgFontManager

java.lang.Object
  extended by com.visioglobe.libVisioDevKit.VgFontManager

public class VgFontManager
extends java.lang.Object

Set the Font and configures it to render text.

Note:
The font manager can set font between VgEngine::VgIDatabase::loadConfiguration and VgEngine::VgIDatabase::unloadConfiguration. However, once a font is set, it will be valid until the font manager is deleted (i.e. when the VgApplication::VgIApplication is deleted).

Field Summary
protected  boolean swigCMemOwn
           
 
Constructor Summary
VgFontManager(long cPtr, boolean cMemoryOwn)
          Constructor.
VgFontManager(SWIGTYPE_p_VgInternalFontManager pVgInternalFontManager, VgIEngine pEngine)
           
 
Method Summary
 void delete()
           
protected  void finalize()
           
static long getCPtr(VgFontManager obj)
           
 boolean setFont(java.lang.String pFontFilename)
          Sets a new font.
 boolean setFont(java.lang.String pFontFilename, long pDPIResolution)
          Sets a new font.
 boolean setFontDpi(long pDPIResolution)
          Sets the resolution of the font.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

swigCMemOwn

protected boolean swigCMemOwn
Constructor Detail

VgFontManager

public VgFontManager(long cPtr,
                     boolean cMemoryOwn)
Constructor. Used internally. To get an instance of the fontManager manager, call VgEngine::VgIEngine::editFontManager ().


VgFontManager

public VgFontManager(SWIGTYPE_p_VgInternalFontManager pVgInternalFontManager,
                     VgIEngine pEngine)
Method Detail

getCPtr

public static long getCPtr(VgFontManager obj)

finalize

protected void finalize()
Overrides:
finalize in class java.lang.Object

delete

public void delete()

setFont

public boolean setFont(java.lang.String pFontFilename)
Sets a new font.

Parameters:
pFontFilename - Font file to load. The font will be searched locally in the Data bundle's "config" directory. The path is expected to be absolute.
Returns:
True if the font has been set. False if the font is not found/incorrect.
Note:
This is effective only between VgEngine::VgIDatabase::loadConfiguration and unloadConfiguration. It will have no effect if called outside., By default, the resolution will be set to 96 dpi. To change the resolution, you may you use either setFont (const std::string& pFontFilename, unsigned int pDPIResolution) or setFontDpi., If the specified font fails to load, the previous one is still set.

setFont

public boolean setFont(java.lang.String pFontFilename,
                       long pDPIResolution)
Sets a new font.

Parameters:
pFontFilename - Font file to load. The font will be searched locally in the Data bundle's "config" directory. The path is expected to be absolute.
pDPIResolution - Device resolution in dot-per-inch. By default, the resolution is 96dpi.
Returns:
True if the font has been registered. False if the font is not found/incorrect.
Note:
This is effective only between VgEngine::VgIDatabase::loadConfiguration and unloadConfiguration. It will have no effect if called outside., If the specified font fails to load, the previous one is still set.

setFontDpi

public boolean setFontDpi(long pDPIResolution)
Sets the resolution of the font.

Parameters:
pDPIResolution - Device resolution in dot-per-inch. By default, the resolution is 96dpi.
Returns:
True if the resolution has been updated. It returns False and sets the error code to eInvalidOperation if no font is set.

VisioDevKit 2.0, Visioglobe® 2013