Software: Apache/2.2.3 (CentOS). PHP/5.1.6 uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /var/www/html/manage/jpgraph/docs/ref/ drwxr-xr-x |
Viewing file: Text.html (45.68 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) | CLASS Text
(Defined in: jpgraph.php : 2966)Class usage and Overview All text that is to be draw onto any graph is handled by this class. You create each text you want printed as an instance of this class.
It is possible to adjust both font, color, alignment and paragraph alignment.
If the text contains multiple lines (separated by "\n") the paragraph alignment determines how each line is formatted (i.e. left,center or right)
Class Methods
Description This determines how the text's x,y position is to be interpretated.
Valid horizontal alignments are
See also Text::ParagraphAlign
Example
Description Center the text between left and right coordinates on the same Y-coordinate See also Text::Pos
Example
Description Return the height of the font used in the text.
The difference between this method and the GetTextHeight() is that this method uses a predefined character to determine the height while GetTextHeight() uses the actual text in the string.
See also Text::GetTextHeight and Text::GetWidth
Example
Description Return the height of the text in this object.
The difference between this method and the GetFontHeight() is that that method uses a predefined character to determine the height while GetTextHeight() uses the actual text in the string. See also Text::GetFontHeight and Text::GetWidth
Example
Description Get total width of text See also Text::GetTextHeight and Text::GetFontHeight
Example
Description The opposite of Show() See also Text::Show
Example
Description Specify the paragraph alignment for a multi line text. Each text line is separated by a "\n" character.
Valid alignments are:
See also Text::Align
Example $txt->ParagraphAlign('center'); // Will give the result: // // The first line // Sec line // Third line
Description Set the position text to be displayed. As a convinience the horizontal alignment may also be set in this call.
If you need to specify vertical position you have to use the Align() method. See also Text::Align, Text::Set and Text::ParagraphAlign
Example
Description Set text to be displayed Example
Description See Align See also Text::Align
Description Specify Orientation of text. If TTF fonts are used then the orientation can be a arbitrary angle. If the builtin fonts are used then only horizontal and vertical position can be used, i.e 0 or 90 degrees, Example
Description Specify parameters for background color, border and possible text drop shadow.
If no shadow color is specified then no shadow will appear.
To use the old style of stright corners specify a corner radius of 0.
See also Text::SetShadow
Example $txt->SetFont(FF_FONT1,FS_BOLD); $txt->Pos(0.5,0.97,'center','bottom'); $txt->SetBox('yellow','black'); $graph->AddText($txt);
Description Specify color for text Example
Description Specify Client Side Image Target for text Example
Description Specify font family, size and style. Two major types of font families can be used, builtin bitmnapped fonts or TTF fonts. The builtin fonts have a fixed size which can't be altered.
Valid styles are
See also Image::StrokeText
Example
Description Specify a context sensitive margin for the text. Depending on in which context the text is used the margin will be interpretated accordingly. Example $graph->title->SetMargin(15);
Description Deprecated. Use SetAngle() instead.
Specify Orientation of text. If TTF fonts are used then the orientation can be a arbitrary angle. If the builtin fonts are used then only horizontal and vertical position can be used, i.e 0 or 90 degrees, Example
Description Determines how a multi-line text paragraph will be formatted. Each line in the paragraph will be treated individually. Allowed values are
Example $graph->title->SetParagraphAlign('right'); // Default for title is "center"
Description Alias for Pos() See also Text::Pos
Example
Description Specify the position of the text using the plot scale positions. The Y position is taken to be the Y axis. It is not possible to use Y2 scale to specify the position. Example $txt->SetScalePos(27.3, 278.9);
Description If the text has been boxed (by call to SetBox()) then you can easily add a drop shadow by just calling this method.
Note: You can also specify the shadow directly in the SetBox() call. This method was added to make Text more like other graph objects which have a SetShadow() method. See also Text::SetBox
Example $txt->SetFont(FF_FONT1,FS_BOLD); $txt->Pos(0.5,0.97,'center','bottom'); $txt->SetBox('yellow','black'); $txt->SetShadow(); $graph->AddText($txt);
Description Specify a maximum line length. This method will insert suitable line breaks to ensure thateach line never exeeds the specified number of characters. The method will not break words. Example $txt->SetWordWrap(15);
Description Show or hide the text string. By default the text string is turned off. So a call to Show() is becessary for the text string to be displayed in the graph.
Example
Description Create a new object to repesent a text string that is to be displayed on the graph.
If the position is not specified when the object is created it can later be specified with a call to the Pos() method.
The default alignment is to interpret the x,y coordinate as being the lower left corner of the bounding box for the text string.
Note. The texts are hidden by default and you must remember toi call Show() to make the text appear in the image. See also Text::Pos, Text::Set, Text::ParagraphAlign and Text::Show
Example // Case 1. Text and position is specified later $txt = new Text(); // Case 2. Position is specified later $txt = new Text('Hello world'); // Case 3. Full specification $txt = new Text('Hello world',100,150); // A more real life example $txt = new Text("Note: Simple textnote.\nWIth two lines"); $txt->SetFont(FF_FONT1,FS_BOLD); $txt->Pos(0.5,0.97,'center','bottom'); $txt->SetBox('yellow','black'); $graph->AddText($txt);
|
:: Command execute :: | |
:: Shadow's tricks :D :: | |
Useful Commands
|
:: Preddy's tricks :D :: | |
Php Safe-Mode Bypass (Read Files)
|
--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0159 ]-- |