(Defined in: jpgraph.php : 3116)
Class usage and Overview
This class is responsible for formatting a text string which have a superscript at the end. This is used to generate scientific numbers.
See also related classes:
Text
Class Methods
Create a scientific representation for a number
Argument | Default | Description |
$aVal
| | Real value to be used |
$aPrecision
|
2
| Precision (number of digits) to be printed |
Description:
Initialized the class from a real value to be used to present a scientific text string.
See also:
$t = new SuperScriptText();
$t->FromReal(12341.56);
// Will print 1.23*10^4
Hight of font (approximate the height of the text)
Argument | Default | Description |
$aImg
| | No description available |
Description:
Return height of text.
See also:
Hight of text
Argument | Default | Description |
$aImg
| | No description available |
Description:
Hight of text
Total width of text
Argument | Default | Description |
$aImg
| | No description available |
Description:
Total width of text
Convert a floating point number to scientific notation
Argument | Default | Description |
$aTxt
| | Mantissa |
$aSuper
|
''
| Exponent |
Description:
Specify the string manuall by specifyin mantissa and exponent.
See also:
$t = new SuperScriptText();
$t->Set("1.34 10","5");
// Will generate "1.34 10^5"
Manually set font to be used for superscript
Argument | Default | Description |
$aFontFam
| | Font family |
$aFontStyle
|
FS_NORMAL
| Font style |
$aFontSize
|
8
| Font size |
Description:
Used to manually specify font to be used for superscript. If not specified it will be detemined automatically based on the font used for the mantissa. The font for the superscript will be roughly 70% of the size of the base font.
Constructor
Argument | Default | Description |
$aTxt
|
''
| Mantissa text |
$aSuper
|
''
| Suoerscript text |
$aXAbsPos
|
0
| X-position (in pixels) |
$aYAbsPos
|
0
| Y-position (in pixels) |
Description:
Creates a new SUperSCriptClass
See also: