Package org.scilab.forge.jlatexmath
Class TeXIcon
java.lang.Object
org.scilab.forge.jlatexmath.TeXIcon
The icon of a TeXFormula: its size, and the way to paint it on a
TeXGraphics.
This class cannot be instantiated directly. It can be constructed from a
TeXFormula using the TeXFormula.createTeXIcon(int,float) method.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic floatbooleanstatic float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGet the total height of the TeXIcon.intGet the total width of the TeXIcon.voidpaint(TeXGraphics g2, TeXColor defaultForeground, int x, int y) Paints the formula on a canvas that is not AWT (see PLAN.md, phase 2).voidvoidSet the insets of the TeXIcon.voidSet the insets of the TeXIcon.
-
Field Details
-
defaultSize
public static float defaultSize -
magFactor
public static float magFactor -
isColored
public boolean isColored
-
-
Constructor Details
-
TeXIcon
Creates a new icon that will paint the given formula box in the given point size.- Parameters:
b- the formula box to be paintedsize- the point size
-
TeXIcon
-
-
Method Details
-
setForeground
-
setInsets
Set the insets of the TeXIcon.- Parameters:
insets- the insetstrueValues- true to force the true values
-
setInsets
Set the insets of the TeXIcon.- Parameters:
insets- the insets
-
getIconHeight
public int getIconHeight()Get the total height of the TeXIcon. This also includes the insets. -
getIconWidth
public int getIconWidth()Get the total width of the TeXIcon. This also includes the insets. -
paint
Paints the formula on a canvas that is not AWT (see PLAN.md, phase 2). The origin of the canvas is the top left corner of the icon; the foreground color is the one ofsetForeground(TeXColor), else the one given. If both are null, the color of the canvas is kept.
-