PHP Class SimpleSoftwareIO\QrCode\ImageMerge

Inheritance: implements SimpleSoftwareIO\QrCode\ImageMergeInterface
Afficher le fichier Open project: simplesoftwareio/simple-qrcode Class Usage Examples

Protected Properties

Свойство Type Description
$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.

Méthodes publiques

Méthode Description
__construct ( Image $sourceImage, Image $mergeImage ) Creates a new ImageMerge object.
merge ( $percentage ) : string Returns an QrCode that has been merge with another image.

Méthodes protégées

Méthode Description
createImage ( ) : string Creates a PNG Image.
setProperties ( $percentage ) Sets the objects properties.

Private Methods

Méthode Description
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.

Method Details

__construct() public méthode

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() protected méthode

Creates a PNG Image.
protected createImage ( ) : string
Résultat string

merge() public méthode

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
Résultat string

setProperties() protected méthode

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

Property Details

$centerX protected_oe property

The position that the merge image is placed on top of the source image.
protected int $centerX
Résultat integer

$centerY protected_oe property

The position that the merge image is placed on top of the source image.
protected int $centerY
Résultat integer

$mergeImage protected_oe property

Holds the merging image.
protected Image,SimpleSoftwareIO\QrCode $mergeImage
Résultat Image

$mergeImageHeight protected_oe property

The height of the merge image.
protected int $mergeImageHeight
Résultat integer

$mergeImageWidth protected_oe property

The width of the merge image.
protected int $mergeImageWidth
Résultat integer

$postMergeImageHeight protected_oe property

The height of the merge image after it is merged.
protected int $postMergeImageHeight
Résultat integer

$postMergeImageWidth protected_oe property

The width of the merge image after it is merged.
protected int $postMergeImageWidth
Résultat integer

$sourceImage protected_oe property

Holds the QrCode image.
protected Image,SimpleSoftwareIO\QrCode $sourceImage
Résultat Image

$sourceImageHeight protected_oe property

The height of the source image.
protected int $sourceImageHeight
Résultat integer

$sourceImageWidth protected_oe property

The width of the source image.
protected int $sourceImageWidth
Résultat integer