|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.dessci.mathflow.sdk.composer.EquationComposer
public class EquationComposer
This class is used to generate equation images from MathML. It can produce EPS (Windows only), GIF, and PNG image types.
| Field Summary |
|---|
| Fields inherited from interface com.dessci.mathflow.sdk.license.LicenseConstants |
|---|
debugMode, DESSCI_KEY, DOCUMENT_COMPOSER, DOCUMENT_COMPOSER_FOR_JAVA, DSI_LICENSE_DAEMON, EQUATION_COMPOSER, EQUATION_COMPOSER_FOR_JAVA, EVAL_LICENSE_FOR_APPLETS, FLEXLM_LIB_NAME, FLEXLM_LIC, LICENSE_EXPIRED, LICENSE_FILE_NAME, LICENSE_FOLDER_NAME, LICENSE_ID, LICENSE_INVALID, LICENSE_NOT_AVAILABLE, LICENSE_OK, SIMPLE_EDITOR, STRUCTURE_EDITOR, STYLE_EDITOR |
| Fields inherited from interface com.dessci.mathflow.sdk.composer.ComposerConstants |
|---|
_IMAGES, _OUT, ANTIALIASINGOFF, BACKGROUND, BG, BLACK, BREAKWIDTH, CHARMAP, DEBUG, DPI, FALSE, FG, FONT_MAPPING_FILE, FONTMAPPING, FONTMETRICS, FOREGROUND, GIF, IMAGEFOLDER, IMAGENAME, IMAGES, IMAGETYPE, IMG, IMGTYPE, INPUTDOC, LICENSE, LOGFILE, MATHML, MATHMLFILE, MUTE, NONE, NORMAL, OPDICT, OPTIONS, OUTPUTDOC, OUTPUTTYPE, PADDING, PNG, POINTSIZE, READOPTIONS, SAVEOPTIONS, SIZE, TAB, TRANSPARENT, TRUE, VERBOSITY, WHITE |
| Constructor Summary | |
|---|---|
EquationComposer()
|
|
| Method Summary | |
|---|---|
void |
ClearLastMessage()
Clears the last saved error string. |
java.awt.Image |
GenerateImageData()
Generates and returns the equation image based on the current settings. |
void |
GenerateImageFile()
Generates the equation image file based on the current settings. |
int |
GetAscent()
Returns the ascent above the baseline of the last equation image generated or -1 if no image has been generated. |
java.lang.String |
GetBackground()
Returns the background color of the equation. |
int |
GetBaseline()
Returns the baseline of the last equation image generated or -1 if no image has been generated. |
int |
GetBreakWidth()
Returns the width in pixels where line wrapping for long equations should occur, or 0 if line wrapping is disabled. |
java.lang.String |
GetCharMap()
Returns the path to the character mapping file. |
int |
GetDPI()
Returns the DPI for the equation image. |
java.lang.String |
GetFontMapping()
Returns the path to the font mapping file. |
java.lang.String |
GetForeground()
Returns the foreground color of the equation. |
int |
GetHeight()
Returns the height of the last equation image generated or -1 if no image has been generated. |
java.lang.String |
GetImageFolder()
Returns the path to the folder that will contain the image files. |
java.lang.String |
GetImageName()
Returns the base file name for the equation image. |
java.lang.String |
GetImageType()
Returns the type of the equation image. |
java.lang.String |
GetLastMessage()
Returns the last saved error string. |
java.lang.String |
GetLicense()
Returns the path to the FlexLM license file or the MathFlow SDK registration key, depending on the license type. |
java.lang.String |
GetLogFile()
Returns the path to the log file that we write error messages to. |
java.lang.String |
GetMathML()
Returns the MathML for the equation. |
java.lang.String |
GetOperatorDictionary()
Returns the path to the operator dictionary file |
int |
GetPadding()
Returns the padding around the border of the equation image. |
int |
GetPointSize()
Returns the base point size of the equation. |
boolean |
GetUseAntialias()
Returns whether anti-aliasing is used. |
java.lang.String |
GetVerbosity()
Returns what processing messages should be displayed. |
int |
GetWidth()
Returns the width of the last equation image generated or -1 if no image has been generated. |
void |
LoadMathML(java.lang.String mathmlfile)
Loads the MathML for the equation from the specified file. |
static void |
main(java.lang.String[] args)
|
void |
PaintEquation(java.awt.Graphics g,
int x,
int y)
Renders the equation for the current MathML in the given graphics at the given location. |
void |
ReadOptions(java.lang.String readoptions)
Reads all the settings from the specified XML file. |
void |
SaveOptions(java.lang.String saveoptions)
Writes all the settings to the specified XML file. |
void |
SetBackground(java.lang.String bg)
Sets the background color for the equation. |
void |
SetBreakWidth(int breakwidth)
Sets the width where line wrapping for long equations should occur. |
void |
SetCharMap(java.lang.String charmap)
Sets the path to the character mapping file. |
void |
SetDPI(int dpi)
Sets the DPI for the equation image. |
void |
SetFontMapping(java.lang.String fontmapping)
Sets the path to the font mapping file. |
void |
SetForeground(java.lang.String fg)
Sets the foreground color for the equation. |
void |
SetImageFolder(java.lang.String imagefolder)
Sets the path to the folder that will contain the image files. |
void |
SetImageName(java.lang.String imagename)
Sets the base file name for the equation image. |
void |
SetImageType(java.lang.String imagetype)
Sets the type of the equation image. |
void |
SetLicense(java.lang.String license)
Sets the path to the FlexLM license file or the MathFlow SDK registration key. |
void |
SetLogFile(java.lang.String logfile)
Sets the path to the log file that we write error messages to. |
void |
SetMathML(java.lang.String mathml)
Sets the MathML for the equation. |
void |
SetOperatorDictionary(java.lang.String filepath)
Sets the path to the operator dictionary file |
void |
SetPadding(int padding)
Sets the padding around the border of the equation image. |
void |
SetPointSize(int pointsize)
Sets the base point size of the equation. |
void |
SetUseAntialias(boolean b)
Sets whether to use anti-aliasing. |
void |
SetVerbosity(java.lang.String verbosity)
Sets what processing messages should be displayed. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EquationComposer()
| Method Detail |
|---|
public void ClearLastMessage()
public java.awt.Image GenerateImageData()
throws com.dessci.mathflow.sdk.license.LicenseException
com.dessci.mathflow.sdk.license.LicenseException
public void GenerateImageFile()
throws com.dessci.mathflow.sdk.license.LicenseException,
java.lang.Exception
com.dessci.mathflow.sdk.license.LicenseException
java.lang.Exceptionpublic int GetAscent()
public java.lang.String GetBackground()
public int GetBaseline()
public int GetBreakWidth()
public java.lang.String GetCharMap()
public int GetDPI()
public java.lang.String GetFontMapping()
public java.lang.String GetForeground()
public int GetHeight()
public java.lang.String GetImageFolder()
public java.lang.String GetImageName()
public java.lang.String GetImageType()
public java.lang.String GetLastMessage()
public java.lang.String GetLicense()
public java.lang.String GetLogFile()
public java.lang.String GetMathML()
public java.lang.String GetOperatorDictionary()
public int GetPadding()
public int GetPointSize()
public boolean GetUseAntialias()
public java.lang.String GetVerbosity()
public int GetWidth()
public void LoadMathML(java.lang.String mathmlfile)
throws java.lang.IllegalArgumentException,
java.io.IOException
mathmlfile - the file that contains the MathML for the equation
java.lang.IllegalArgumentException
java.io.IOExceptionpublic static void main(java.lang.String[] args)
public void PaintEquation(java.awt.Graphics g,
int x,
int y)
throws com.dessci.mathflow.sdk.license.LicenseException
g - the graphics object to paint the equationx - the x coordinate for the positioning pointy - the y coordinate for the positioning point
com.dessci.mathflow.sdk.license.LicenseException
public void ReadOptions(java.lang.String readoptions)
throws java.lang.Exception
readoptions - the XML file that we read the settings from
java.lang.Exception
public void SaveOptions(java.lang.String saveoptions)
throws java.lang.Exception
saveoptions - the XML file that we write the settings to
java.lang.Exception
public void SetBackground(java.lang.String bg)
throws java.lang.IllegalArgumentException
bg - the background color of the equation, in the format of #rgb,
#rrggbb or the HTML color name
java.lang.IllegalArgumentException
public void SetBreakWidth(int breakwidth)
throws java.lang.IllegalArgumentException
breakwidth - the width where line wrapping for long equations should occur or
0 if line wrapping is disabled
java.lang.IllegalArgumentException
public void SetCharMap(java.lang.String charmap)
throws java.lang.IllegalArgumentException
charmap - the full path to the character mapping file
java.lang.IllegalArgumentException
public void SetDPI(int dpi)
throws java.lang.IllegalArgumentException
dpi - the DPI for the equation image
java.lang.IllegalArgumentExceptionpublic void SetFontMapping(java.lang.String fontmapping)
fontmapping - the path to the font mapping file
public void SetForeground(java.lang.String fg)
throws java.lang.IllegalArgumentException
fg - the foreground color for the equation, in the format of #rgb,
#rrggbb or the HTML color name
java.lang.IllegalArgumentExceptionpublic void SetImageFolder(java.lang.String imagefolder)
imagefolder - the path to the folder that will contain the image files
public void SetImageName(java.lang.String imagename)
throws java.lang.IllegalArgumentException
imagename - the base file name for the equation image
java.lang.IllegalArgumentException
public void SetImageType(java.lang.String imagetype)
throws java.lang.IllegalArgumentException
imagetype - the image type
java.lang.IllegalArgumentException
public void SetLicense(java.lang.String license)
throws com.dessci.mathflow.sdk.license.LicenseException,
java.lang.StringIndexOutOfBoundsException
license - the path to the FlexLM license file or the MathFlow SDK
registration key
com.dessci.mathflow.sdk.license.LicenseException
java.lang.StringIndexOutOfBoundsException
public void SetLogFile(java.lang.String logfile)
throws java.lang.IllegalArgumentException
logfile - the path to the log file
java.lang.IllegalArgumentException
public void SetMathML(java.lang.String mathml)
throws java.lang.IllegalArgumentException
mathml - the MathML for the equation
java.lang.IllegalArgumentException
public void SetOperatorDictionary(java.lang.String filepath)
throws java.lang.IllegalArgumentException
filepath - the full path to the operator dictionary file
java.lang.IllegalArgumentException
public void SetPadding(int padding)
throws java.lang.IllegalArgumentException
padding - the padding around the border of the equation image
java.lang.IllegalArgumentException
public void SetPointSize(int pointsize)
throws java.lang.IllegalArgumentException
pointsize - the base point size of the equation
java.lang.IllegalArgumentExceptionpublic void SetUseAntialias(boolean b)
b - true if to use anti-aliasing, false otherwise
public void SetVerbosity(java.lang.String verbosity)
throws java.lang.IllegalArgumentException
verbosity - the level of processing information that should be displayed
java.lang.IllegalArgumentException
|
Copyright (c) 2015 Design Science All rights reserved |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||