PHP 클래스 Horde_Image_Swf, horde

Copyright 2002-2014 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
저자: Chuck Hagenbuch ([email protected])
상속: extends Horde_Image_Base
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_capabilities string[] Capabilites of this driver.
$_movie resource SWF root movie.

공개 메소드들

메소드 설명
__construct ( $params, $context = [] ) Constructor.
allocateColor ( string $name ) : array Creates a color that can be accessed in this object.
arc ( integer $x, integer $y, integer $r, integer $start, integer $end, string $color = 'black', string $fill = 'none' ) Draws an arc.
circle ( integer $x, integer $y, integer $r, string $color, string $fill = 'none' ) Draws a circle.
dashedLine ( integer $x0, integer $y0, integer $x1, integer $y1, string $color = 'black', string $width = 1, integer $dash_length = 2, integer $dash_space = 2 ) Draws a dashed line.
display ( ) Displays the current image.
getContentType ( ) : string Returns the MIME type for this image.
getFont ( string $font ) : string Translates font names.
gradientRectangle ( integer $x, integer $y, integer $width, integer $height, string $color = 'black', string $fill1 = 'black', string $fill2 = 'white' ) Draws a rectangle filled with a gradient.
line ( integer $x1, integer $y1, $x2, $y2, string $color = 'black', string $width = 1 ) Draws a line.
polygon ( $verts, string $color, string $fill = 'none' ) Draws a polygon based on a set of vertices.
polyline ( $verts, string $color, string $width = 1 ) Draws a polyline (a non-closed, non-filled polygon) based on a set of vertices.
raw ( ) : string Returns the raw data for this image.
rectangle ( integer $x, integer $y, integer $width, integer $height, string $color, string $fill = 'none' ) Draws a rectangle.
roundedRectangle ( integer $x, integer $y, integer $width, integer $height, integer $round, string $color = 'black', string $fill = 'none' ) Draws a rounded rectangle.
text ( $string, integer $x, integer $y, string $font = 'monospace', string $color = 'black', integer $direction ) Draws a text string on the image in a specified location, with the specified style information.

메소드 상세

__construct() 공개 메소드

Constructor.
또한 보기: Horde_Image_Base::_construct
public __construct ( $params, $context = [] )

allocateColor() 공개 메소드

When a color is set, the rgba values are returned in an array.
public allocateColor ( string $name ) : array
$name string The name of the color.
리턴 array The red, green, blue, alpha values of the color.

arc() 공개 메소드

Draws an arc.
public arc ( integer $x, integer $y, integer $r, integer $start, integer $end, string $color = 'black', string $fill = 'none' )
$x integer The x co-ordinate of the centre.
$y integer The y co-ordinate of the centre.
$r integer The radius of the arc.
$start integer The start angle of the arc.
$end integer The end angle of the arc.
$color string The line color of the arc.
$fill string The fill color of the arc.

circle() 공개 메소드

Draws a circle.
public circle ( integer $x, integer $y, integer $r, string $color, string $fill = 'none' )
$x integer The x co-ordinate of the centre.
$y integer The y co-ordinate of the centre.
$r integer The radius of the circle.
$color string The line color of the circle.
$fill string The color to fill the circle.

dashedLine() 공개 메소드

Draws a dashed line.
public dashedLine ( integer $x0, integer $y0, integer $x1, integer $y1, string $color = 'black', string $width = 1, integer $dash_length = 2, integer $dash_space = 2 )
$x0 integer The x co-ordinate of the start.
$y0 integer The y co-ordinate of the start.
$x1 integer The x co-ordinate of the end.
$y1 integer The y co-ordinate of the end.
$color string The line color.
$width string The width of the line.
$dash_length integer The length of a dash on the dashed line.
$dash_space integer The length of a space in the dashed line.

display() 공개 메소드

Displays the current image.
public display ( )

getContentType() 공개 메소드

Returns the MIME type for this image.
public getContentType ( ) : string
리턴 string The MIME type for this image.

getFont() 공개 메소드

Translates font names.
public getFont ( string $font ) : string
$font string A font name.
리턴 string An SWF font name.

gradientRectangle() 공개 메소드

Draws a rectangle filled with a gradient.
public gradientRectangle ( integer $x, integer $y, integer $width, integer $height, string $color = 'black', string $fill1 = 'black', string $fill2 = 'white' )
$x integer The left x-coordinate of the rectangle.
$y integer The top y-coordinate of the rectangle.
$width integer The width of the rectangle.
$height integer The height of the rectangle.
$color string The outline color of the rectangle.
$fill1 string The name of the start color for the gradient.
$fill2 string The name of the end color for the gradient.

line() 공개 메소드

Draws a line.
public line ( integer $x1, integer $y1, $x2, $y2, string $color = 'black', string $width = 1 )
$x1 integer The x coordinate of the end.
$y1 integer The y coordinate of the end.
$color string The line color.
$width string The width of the line.

polygon() 공개 메소드

Draws a polygon based on a set of vertices.
public polygon ( $verts, string $color, string $fill = 'none' )
$color string The color you want to draw the polygon with.
$fill string The color to fill the polygon.

polyline() 공개 메소드

Draws a polyline (a non-closed, non-filled polygon) based on a set of vertices.
public polyline ( $verts, string $color, string $width = 1 )
$color string The color you want to draw the line with.
$width string The width of the line.

raw() 공개 메소드

Returns the raw data for this image.
public raw ( ) : string
리턴 string The raw image data.

rectangle() 공개 메소드

Draws a rectangle.
public rectangle ( integer $x, integer $y, integer $width, integer $height, string $color, string $fill = 'none' )
$x integer The left x-coordinate of the rectangle.
$y integer The top y-coordinate of the rectangle.
$width integer The width of the rectangle.
$height integer The height of the rectangle.
$color string The line color of the rectangle.
$fill string The color to fill the rectangle.

roundedRectangle() 공개 메소드

Draws a rounded rectangle.
public roundedRectangle ( integer $x, integer $y, integer $width, integer $height, integer $round, string $color = 'black', string $fill = 'none' )
$x integer The left x-coordinate of the rectangle.
$y integer The top y-coordinate of the rectangle.
$width integer The width of the rectangle.
$height integer The height of the rectangle.
$round integer The width of the corner rounding.
$color string The line color of the rectangle.
$fill string The color to fill the rectangle.

text() 공개 메소드

Draws a text string on the image in a specified location, with the specified style information.
public text ( $string, integer $x, integer $y, string $font = 'monospace', string $color = 'black', integer $direction )
$x integer The left x coordinate of the start of the text string.
$y integer The top y coordinate of the start of the text string.
$font string The font identifier you want to use for the text.
$color string The color that you want the text displayed in.
$direction integer An integer that specifies the orientation of the text.

프로퍼티 상세

$_capabilities 보호되어 있는 프로퍼티

Capabilites of this driver.
protected string[] $_capabilities
리턴 string[]

$_movie 보호되어 있는 프로퍼티

SWF root movie.
protected resource $_movie
리턴 resource