PHP Класс PHPRtfLite_Image

Автор: Denis Slaveckij ([email protected])
Автор: Steffen Zeidler ([email protected])
Наследование: implements PHPRtfLite_Freeable
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_border PHPRtfLite_Border rtf border
$_height float resize to height
$_imageHeight integer original image height
$_imageRtfType string image rtf type
$_imageWidth float original image width
$_isMissing boolean flag, true if image file is missing
$_parFormat PHPRtfLite_ParFormat par format
$_rtf PHPRtfLite rtf document
$_stream resource stream as php resource
$_width float resize to width

Открытые методы

Метод Описание
__construct ( PHPRtfLite $rtf, resource $stream, float $width = null, float $height = null ) constructor
__destruct ( ) destructor - closes stream
createFromFile ( PHPRtfLite $rtf, string $file, float $width = null, float $height = null ) : PHPRtfLite_Image creates rtf image from file
createFromString ( PHPRtfLite $rtf, string $string, string $type, float $width = null, float $height = null ) : PHPRtfLite_Image creates rtf image from string
free ( )
getBorder ( ) : PHPRtfLite_Border gets border
getHeight ( ) : float gets image height
getParFormat ( ) : PHPRtfLite_ParFormat gets paragraph format for image
getWidth ( ) : float gets image width
isMissing ( )
render ( ) renders rtf image for rtf document
setBorder ( PHPRtfLite_Border $border ) sets border
setHeight ( float $height ) sets image height
setIsMissing ( )
setParFormat ( PHPRtfLite_ParFormat $parFormat ) sets paragraph format for image
setWidth ( float $width ) sets image width

Защищенные методы

Метод Описание
getImageTypeAsRtf ( ) : string gets image rtf type
setImageHeight ( float $height ) sets image original height
setImageWidth ( float $width ) sets image original width
writeIntoRtfStream ( integer $startFrom ) writes image into rtf stream

Приватные методы

Метод Описание
create ( PHPRtfLite $rtf, resource $stream, string $type, float $width, float $height ) : PHPRtfLite_Image_Wmf | PHPRtfLite_Image_Gd | PHPRtfLite_Image factory method creates rtf image from stream
createMissingImage ( PHPRtfLite $rtf, float $width, float $height ) : PHPRtfLite_Image_Gd creates a missing image instance
getImageRtfHeight ( ) : integer gets rtf image height
getImageRtfWidth ( ) : integer gets rtf image width
getMissingImage ( ) adds rtf image code to show that the file is missing

Описание методов

__construct() публичный Метод

constructor
public __construct ( PHPRtfLite $rtf, resource $stream, float $width = null, float $height = null )
$rtf PHPRtfLite
$stream resource
$width float optional
$height float optional

__destruct() публичный Метод

destructor - closes stream
public __destruct ( )

createFromFile() публичный статический Метод

creates rtf image from file
public static createFromFile ( PHPRtfLite $rtf, string $file, float $width = null, float $height = null ) : PHPRtfLite_Image
$rtf PHPRtfLite
$file string
$width float optional
$height float optional
Результат PHPRtfLite_Image

createFromString() публичный статический Метод

creates rtf image from string
public static createFromString ( PHPRtfLite $rtf, string $string, string $type, float $width = null, float $height = null ) : PHPRtfLite_Image
$rtf PHPRtfLite
$string string
$type string (represented by class constants)
$width float optional
$height float optional
Результат PHPRtfLite_Image

free() публичный Метод

public free ( )

getBorder() публичный Метод

gets border
public getBorder ( ) : PHPRtfLite_Border
Результат PHPRtfLite_Border

getHeight() публичный Метод

gets image height
public getHeight ( ) : float
Результат float

getImageTypeAsRtf() защищенный Метод

gets image rtf type
protected getImageTypeAsRtf ( ) : string
Результат string

getParFormat() публичный Метод

gets paragraph format for image
public getParFormat ( ) : PHPRtfLite_ParFormat
Результат PHPRtfLite_ParFormat

getWidth() публичный Метод

gets image width
public getWidth ( ) : float
Результат float

isMissing() публичный Метод

public isMissing ( )

render() публичный Метод

renders rtf image for rtf document
public render ( )

setBorder() публичный Метод

sets border
public setBorder ( PHPRtfLite_Border $border )
$border PHPRtfLite_Border

setHeight() публичный Метод

sets image height
public setHeight ( float $height )
$height float if not defined image is displayed by it's width.

setImageHeight() защищенный Метод

sets image original height
protected setImageHeight ( float $height )
$height float

setImageWidth() защищенный Метод

sets image original width
protected setImageWidth ( float $width )
$width float

setIsMissing() публичный Метод

public setIsMissing ( )

setParFormat() публичный Метод

sets paragraph format for image
public setParFormat ( PHPRtfLite_ParFormat $parFormat )
$parFormat PHPRtfLite_ParFormat

setWidth() публичный Метод

sets image width
public setWidth ( float $width )
$width float if not defined image is displayed by it's height.

writeIntoRtfStream() защищенный Метод

writes image into rtf stream
protected writeIntoRtfStream ( integer $startFrom )
$startFrom integer

Описание свойств

$_border защищенное свойство

rtf border
protected PHPRtfLite_Border $_border
Результат PHPRtfLite_Border

$_height защищенное свойство

resize to height
protected float $_height
Результат float

$_imageHeight защищенное свойство

original image height
protected int $_imageHeight
Результат integer

$_imageRtfType защищенное свойство

image rtf type
protected string $_imageRtfType
Результат string

$_imageWidth защищенное свойство

original image width
protected float $_imageWidth
Результат float

$_isMissing защищенное свойство

flag, true if image file is missing
protected bool $_isMissing
Результат boolean

$_parFormat защищенное свойство

par format
protected PHPRtfLite_ParFormat $_parFormat
Результат PHPRtfLite_ParFormat

$_rtf защищенное свойство

rtf document
protected PHPRtfLite $_rtf
Результат PHPRtfLite

$_stream защищенное свойство

stream as php resource
protected resource $_stream
Результат resource

$_width защищенное свойство

resize to width
protected float $_width
Результат float