Reference Manuals

Border

Border — Add a border around the image

Border is part of the Gallery package.

Synopsis

class Border implements Transform {
        private        int                 $border_bottom
        private        int                 $border_left
        private        int                 $border_right
        private        int                 $border_top
        private        array               $color

        public         Canvas              __construct               ( int $border_top,
                                                                       int $border_right,
                                                                       int $border_bottom,
                                                                       int $border_left,
                                                                       array $color );
        public         resource            apply                     ( resource $image,
                                                                        &$image );
}

Object Hierarchy

Border

Implemented Interfaces

Border implements Transform

Description

Add a border around the image

The image will increase in size.

Attribute Details

$border_bottom

private        int            $border_bottom

The width of the border

Default value: empty string


$border_left

private        int            $border_left

The width of the border

Default value: empty string


$border_right

private        int            $border_right

The width of the border

Default value: empty string


$border_top

private        int            $border_top

The width of the border

Default value: empty string


$color

private        array          $color

An array of three elements for the color in RGB

Default value: empty string

Method Details

__construct()

public         Canvas         __construct               ( int $border_top,
                                                          int $border_right,
                                                          int $border_bottom,
                                                          int $border_left,
                                                          array $color );

Create a new Border transform

The order of the border width is the same as the order in CSS.

$border_top
The width of the top border
$border_right
The width of the right border
$border_bottom
The width of the bottom border
$border_left
The width of the left border
$color
An array containing 3 integer elements representing the color in RGB

apply()

public         resource       apply                     ( resource $image,
                                                           &$image );

Add the border around the image.

$image
&$image