Package org.scilab.forge.jlatexmath
Class TeXEnvironment
java.lang.Object
org.scilab.forge.jlatexmath.TeXEnvironment
Contains the used TeXFont-object, color settings and the current style in which a
formula must be drawn. It's used in the createBox-methods. Contains methods that
apply the style changing rules for subformula's.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTeXEnvironment(int style, TeXFont tf) TeXEnvironment(int style, TeXFont tf, int widthUnit, float textwidth) -
Method Summary
Modifier and TypeMethodDescriptionprotected TeXEnvironmentcopy()protected TeXEnvironmentgetColor()floatintfloatfloatgetSize()booleanfloatgetSpace()intgetStyle()The measure of the text that has no TeX glyph, or null (a rough estimate is used).floatnumStyle()voidreset()Resets the color settings.voidvoidvoidsetInterline(int unit, float len) voidsetLastFontId(int id) voidsetScaleFactor(float f) voidsetSmallCap(boolean smallCap) voidsetStyle(int style) voidsetTextMeasurer(TeXTextMeasurer textMeasurer) voidsetTextStyle(String textStyle) subStyle()supStyle()
-
Field Details
-
isColored
public boolean isColored
-
-
Constructor Details
-
TeXEnvironment
-
TeXEnvironment
-
-
Method Details
-
getTextMeasurer
The measure of the text that has no TeX glyph, or null (a rough estimate is used). -
setTextMeasurer
-
setInterline
public void setInterline(int unit, float len) -
getInterline
public float getInterline() -
getTextwidth
public float getTextwidth() -
setScaleFactor
public void setScaleFactor(float f) -
getScaleFactor
public float getScaleFactor() -
copy
-
copy
-
crampStyle
- Returns:
- a copy of the environment, but in a cramped style.
-
denomStyle
- Returns:
- a copy of the environment, but in denominator style.
-
getBackground
- Returns:
- the background color setting
-
getColor
- Returns:
- the foreground color setting
-
getSize
public float getSize()- Returns:
- the point size of the TeXFont
-
getStyle
public int getStyle()- Returns:
- the current style
-
setStyle
public void setStyle(int style) -
getTextStyle
- Returns:
- the current textStyle
-
setTextStyle
-
getSmallCap
public boolean getSmallCap()- Returns:
- the current textStyle
-
setSmallCap
public void setSmallCap(boolean smallCap) -
getTeXFont
- Returns:
- the TeXFont to be used
-
numStyle
- Returns:
- a copy of the environment, but in numerator style.
-
reset
public void reset()Resets the color settings. -
rootStyle
- Returns:
- a copy of the environment, but with the style changed for roots
-
setBackground
- Parameters:
c- the background color to be set
-
setColor
- Parameters:
c- the foreground color to be set
-
subStyle
- Returns:
- a copy of the environment, but in subscript style.
-
supStyle
- Returns:
- a copy of the environment, but in superscript style.
-
getSpace
public float getSpace() -
setLastFontId
public void setLastFontId(int id) -
getLastFontId
public int getLastFontId()
-