!c99Shell v. 1.0 pre-release build #16!

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
EDT 2010 i686
 

uid=48(apache) gid=48(apache) groups=48(apache) 

Safe-mode: OFF (not secure)

/var/www/html/manage_22222/jpgraph/docs/ref/   drwxr-xr-x
Free 50.66 GB of 127.8 GB (39.64%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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)
 Shape 
 Bezier() 
 Circle() 
 FilledCircle() 
 FilledPolygon() 
 FilledRectangle() 
 FilledRoundedRectangle() 
 IndentedRectangle() 
 Line() 
 Polygon() 
 Rectangle() 
 RoundedRectangle() 
 SetColor() 
 SetTextAlign() 
 ShadowRectangle() 
 Shape() 
 StrokeText() 
 

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

 

 

Draw a bezier curve

ArgumentDefaultDescription
$p  Array with control points
$aSteps 40 Number of line segments in curve

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)
(2,3) x,y, (Control point 1)
(4,5) x,y, (Control point 2)
(6,7) x,y, (End point of curve)

See example in canvasbezierex1.php  

Example

$p = array(3,6,6,9,5,3,7,4);

$shape->SetColor('black');
$shape->Bezier($p);

 

 

Draw a circle

ArgumentDefaultDescription
$x1  Center X-coordinate
$y1  Center Y-coordinate
$r  Radius

Description
Draw a circle onto the canvas  
 
See also
Image::Circle

Example

// The shape class is wrapper around the Imgae class which translates
// the coordinates for us
$shape = new Shape($g,$scale);
$shape->SetColor('black');


// .. and a circle (x,y,diameter)
$shape->Circle(5,14,2);


 

 

Draw a filled circle to a canvas

ArgumentDefaultDescription
$x1  Center X-coordinate
$y1  Center Y-coordinate
$r  Radius

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 shape class is wrapper around the Imgae class which translates
// the coordinates for us
$shape = new Shape($g,$scale);
$shape->SetColor('black');


// .. and a circle (x,y,diameter)
$shape->FilledCircle(5,14,2);


 

 

Draw a filled polygon

ArgumentDefaultDescription
$p  Polygon array

Description
Draw a filled polygon 

 

 

Draw a filled rectangle on the canvas

ArgumentDefaultDescription
$x1  Top left X
$y1  Top left Y
$x2  Bottom right X
$y2  Bottom right Y

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);

 

 

Create a filled rectangle with rounded corners

ArgumentDefaultDescription
$x1  Top left X
$y1  Top left Y
$x2  Bottom right X
$y2  Bottom right Y
$r null Corner radius

Description
Create a filled rectangle with rounded corners 

 

 

A filled rectangle with one corner 'indented'

ArgumentDefaultDescription
$xt  Top left X
$yt  Top left Y
$w  Width
$h  Height
$iw 0 Indented width
$ih 0 Indeted height
$aCorner 3 Corner to indent
$aFillColor "" Fill color
$r 4 Corner radius

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  

 

 

Draw a line between

ArgumentDefaultDescription
$x1  X1
$y1  Y1
$x2  X2
$y2  Y2

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);

 

 

Draw a closed polygon

ArgumentDefaultDescription
$p  Array of points in polygon
$aClosed false No description available

Description
Draw a closed polygon 

Example

$p = array(3,6,6,9,5,3,7,4);
$shape->SetColor('blue:0.35');
$shape->Polygon($p);

 

 

Draw a rectangle on the canvas

ArgumentDefaultDescription
$x1  Top left X
$y1  Top left Y
$x2  Bottom right X
$y2  Bottom right Y

Description
Draw a rectangle on the canvas using the current scale. 

Example

// .. add a rectangle
$shape->SetColor('green');
$shape->Rectangle(15,8,19,14);

 

 

Draw a rectangle with rounded corners

ArgumentDefaultDescription
$x1  Top left X
$y1  Top left Y
$x2  Bottom right X
$y2  Bottom right Y
$r null Corner radius

Description
Draw a rectangle with rounded corners 

 

 

Specify color to use when drawing shapes

ArgumentDefaultDescription
$aColor  Color specification

Description
Specify color to use when drawing shapes 
 
See also
RGB::Color

Example

// Add a black line
$shape->SetColor('black');
$shape->Line(0,0,20,20);

 

 

Specify bae point for StrokeText()

ArgumentDefaultDescription
$halign  Horizontal position for basepoint
$valign "bottom" Vertical position for base point

Description
Specifies how the coordinate for the text should be interpretated. Possible values for horizontal base-position are
  • "left"
  • "center"
  • "right"
and for vertical
  • "top"
  • "center"
  • "bottom"
 

Example

// Interpret the text coordinate as beeing the
// top left corner of the bounding box for the text
$shape->SetTextAlign('left','top');

$shape->StrokeText(....)

 

 

Draw a filled rectangle with a drop shadow

ArgumentDefaultDescription
$x1  Top left X
$y1  Top left Y
$x2  Bottom right X
$y2  Bottom right Y
$fcolor false Fill color
$shadow_width null Shadow width
$shadow_color array(102,102,102) Shadow color

Description
Draw a filled rectangle with a drop shadow 

 

 

Methods to draw shapes on canvas

ArgumentDefaultDescription
&$aGraph  Canvas graph
&$scale  Canvas scale

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

// Setup a basic canvas we can work
$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);

 

 

Stroke a text string onto the canvas

ArgumentDefaultDescription
$x1  X-position
$y1  Y-position
$txt  Text string
$dir 0 Angle
$paragraph_align "left" Paragraph align for multi-line texts

Description
Stroke a text string onto the canvas. 
 
See also
CanvasRectangleText::CanvasRectangleText



:: Command execute ::

Enter:
 
Select:
 

:: Shadow's tricks :D ::

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

:: Preddy's tricks :D ::

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0163 ]--