Grafika\EditorInterface::blend PHP Method

blend() public method

Blend two images together with the first image as the base and the second image on top. Supports several blend modes.
public blend ( grafika\ImageInterface &$image1, grafika\ImageInterface $image2, string $type = 'normal', float $opacity = 1, string $position = 'top-left', integer $offsetX, integer $offsetY ) : grafika\EditorInterface
$image1 grafika\ImageInterface The base image.
$image2 grafika\ImageInterface The image placed on top of the base image.
$type string The blend mode. Can be: normal, multiply, overlay or screen.
$opacity float The opacity of $image2. Possible values 0.0 to 1.0 where 0.0 is fully transparent and 1.0 is fully opaque. Defaults to 1.0.
$position string The position of $image2 on $image1. Possible values top-left, top-center, top-right, center-left, center, center-right, bottom-left, bottom-center, bottom-right and smart. Defaults to top-left.
$offsetX integer Number of pixels to add to the X position of $image2.
$offsetY integer Number of pixels to add to the Y position of $image2.
return grafika\EditorInterface An instance of Editor.
    public function blend(&$image1, $image2, $type = 'normal', $opacity = 1.0, $position = 'top-left', $offsetX = 0, $offsetY = 0);