PHP 클래스 Horde_Image, horde

저자: Chuck Hagenbuch ([email protected])
저자: Michael J. Rubinsky ([email protected])
저자: Jan Schneider ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 메소드들

메소드 설명
arcPoints ( integer $r, integer $start, integer $end ) : array Returns point coordinates at the limits of an arc.
brightness ( string $color ) : integer Returns the brightness of a color.
circlePoint ( float $degrees, integer $diameter ) : array Returns an x,y pair on circle, assuming center is 0,0.
getColor ( string $color ) : integer[] Normalizes an HTML color.
getFontSize ( $fontsize ) Returns the point size for an HTML font size name.
getHexColor ( string $colorname ) : string Returns the hexadecimal representation of an HTML color name.
getRGB ( string $colorname ) : array Returns the RGB values for an HTML color name.
grayscalePixel ( integer[] $originalPixel ) : integer[] Turns an RGB value into grayscale.
grayscaleValue ( integer $r, integer $g, integer $b ) : integer Calculates the grayscale value of a color.
modifyColor ( string $color, integer $factor = 17 ) : string Calculates a lighter (or darker) version of a color.
moreIntenseColor ( string $color, integer $factor = 17 ) : string Calculates a more intense version of a color.

메소드 상세

arcPoints() 공개 정적인 메소드

Returns point coordinates at the limits of an arc.
public static arcPoints ( integer $r, integer $start, integer $end ) : array
$r integer The radius of the arc.
$start integer The starting angle.
$end integer The ending angle.
리턴 array The start point (x1,y1), end point (x2,y2), and anchor point (x3,y3).

brightness() 공개 정적인 메소드

Returns the brightness of a color.
public static brightness ( string $color ) : integer
$color string An HTML color, e.g.: #ffffcc.
리턴 integer The brightness on a scale of 0 to 255.

circlePoint() 공개 정적인 메소드

Returns an x,y pair on circle, assuming center is 0,0.
public static circlePoint ( float $degrees, integer $diameter ) : array
$degrees float The degrees of arc to get the point for.
$diameter integer The diameter of the circle.
리턴 array (x coordinate, y coordinate) of the point.

getColor() 공개 정적인 메소드

Normalizes an HTML color.
public static getColor ( string $color ) : integer[]
$color string An HTML color, e.g.: #ffffcc or #ffc.
리턴 integer[] Array with three elements: red, green, and blue.

getFontSize() 공개 정적인 메소드

Returns the point size for an HTML font size name.
public static getFontSize ( $fontsize )

getHexColor() 공개 정적인 메소드

Returns the hexadecimal representation of an HTML color name.
public static getHexColor ( string $colorname ) : string
$colorname string A color name.
리턴 string The hex representation of the color.

getRGB() 공개 정적인 메소드

Returns the RGB values for an HTML color name.
public static getRGB ( string $colorname ) : array
$colorname string A color name.
리턴 array An array of RGB values.

grayscalePixel() 공개 정적인 메소드

Turns an RGB value into grayscale.
public static grayscalePixel ( integer[] $originalPixel ) : integer[]
$originalPixel integer[] A hash with 'red', 'green', and 'blue' values.
리턴 integer[] A hash with 'red', 'green', and 'blue' values for the corresponding gray color.

grayscaleValue() 공개 정적인 메소드

Calculates the grayscale value of a color.
public static grayscaleValue ( integer $r, integer $g, integer $b ) : integer
$r integer A red value.
$g integer A green value.
$b integer A blue value.
리턴 integer The grayscale value of the color.

modifyColor() 공개 정적인 메소드

Calculates a lighter (or darker) version of a color.
public static modifyColor ( string $color, integer $factor = 17 ) : string
$color string An HTML color, e.g.: #ffffcc.
$factor integer The brightness difference between -0xff and +0xff. Plus values raise the brightness, negative values reduce it.
리턴 string A modified HTML color.

moreIntenseColor() 공개 정적인 메소드

Calculates a more intense version of a color.
public static moreIntenseColor ( string $color, integer $factor = 17 ) : string
$color string An HTML color, e.g.: #ffffcc.
$factor integer The intensity difference between -0xff and +0xff. Plus values raise the intensity, negative values reduce it.
리턴 string A more intense HTML color.