PHP 클래스 SimpleSoftwareIO\QrCode\ImageMerge

상속: implements SimpleSoftwareIO\QrCode\ImageMergeInterface
파일 보기 프로젝트 열기: simplesoftwareio/simple-qrcode 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$centerX integer The position that the merge image is placed on top of the source image.
$centerY integer The position that the merge image is placed on top of the source image.
$mergeImage Image Holds the merging image.
$mergeImageHeight integer The height of the merge image.
$mergeImageWidth integer The width of the merge image.
$postMergeImageHeight integer The height of the merge image after it is merged.
$postMergeImageWidth integer The width of the merge image after it is merged.
$sourceImage Image Holds the QrCode image.
$sourceImageHeight integer The height of the source image.
$sourceImageWidth integer The width of the source image.

공개 메소드들

메소드 설명
__construct ( Image $sourceImage, Image $mergeImage ) Creates a new ImageMerge object.
merge ( $percentage ) : string Returns an QrCode that has been merge with another image.

보호된 메소드들

메소드 설명
createImage ( ) : string Creates a PNG Image.
setProperties ( $percentage ) Sets the objects properties.

비공개 메소드들

메소드 설명
calculateCenter ( ) Calculates the center of the source Image using the Merge image.
calculateOverlap ( float $percentage ) Calculates the width of the merge image being placed on the source image.

메소드 상세

__construct() 공개 메소드

Creates a new ImageMerge object.
public __construct ( Image $sourceImage, Image $mergeImage )
$sourceImage Image Image The image that will be merged over.
$mergeImage Image Image The image that will be used to merge with $sourceImage

createImage() 보호된 메소드

Creates a PNG Image.
protected createImage ( ) : string
리턴 string

merge() 공개 메소드

This is usually used with logos to imprint a logo into a QrCode.
public merge ( $percentage ) : string
$percentage float The percentage of size relative to the entire QR of the merged image
리턴 string

setProperties() 보호된 메소드

Sets the objects properties.
protected setProperties ( $percentage )
$percentage float The percentage that the merge image should take up.

프로퍼티 상세

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

The position that the merge image is placed on top of the source image.
protected int $centerX
리턴 integer

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

The position that the merge image is placed on top of the source image.
protected int $centerY
리턴 integer

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

Holds the merging image.
protected Image,SimpleSoftwareIO\QrCode $mergeImage
리턴 Image

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

The height of the merge image.
protected int $mergeImageHeight
리턴 integer

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

The width of the merge image.
protected int $mergeImageWidth
리턴 integer

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

The height of the merge image after it is merged.
protected int $postMergeImageHeight
리턴 integer

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

The width of the merge image after it is merged.
protected int $postMergeImageWidth
리턴 integer

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

Holds the QrCode image.
protected Image,SimpleSoftwareIO\QrCode $sourceImage
리턴 Image

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

The height of the source image.
protected int $sourceImageHeight
리턴 integer

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

The width of the source image.
protected int $sourceImageWidth
리턴 integer