PATH:
home
/
lab2454c
/
healthvalidate.com
/
vendor
/
cloudinary
/
cloudinary_php
/
src
/
Transformation
/
Layer
<?php /** * This file is part of the Cloudinary PHP package. * * (c) Cloudinary * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Cloudinary\Transformation; use Cloudinary\Transformation\Argument\Text\TextStyleTrait; /** * Defines how to manipulate a text layer. * * **Learn more**: <a * href="https://cloudinary.com/documentation/image_transformations#adding_text_captions" target="_blank"> * Adding text captions</a> * * @api */ class TextSource extends BaseSource implements ImageTransformationInterface { use ImageTransformationTrait; use TextStyleTrait; use TextColorTrait; use BackgroundColorTrait { BackgroundColorTrait::backgroundColor insteadof ImageTransformationTrait; } /** * TextLayer constructor. * * @param string $text * @param null $style * @param null $color * @param null $backgroundColor */ public function __construct($text = null, $style = null, $color = null, $backgroundColor = null) { parent::__construct(); $this->text($text); $this->textStyle($style); $this->textColor($color); $this->backgroundColor($backgroundColor); } /** * Gets the transformation. * * @return ImageTransformation * * @internal */ public function getTransformation() { if (! isset($this->transformation)) { $this->transformation = new ImageTransformation(); } return $this->transformation; } /** * Gets the layer qualifier. * * @return TextSourceQualifier * * @internal */ protected function getSourceQualifier() { if (! isset($this->qualifiers['source'])) { $this->qualifiers['source'] = new TextSourceQualifier(); } return $this->qualifiers['source']; } /** * Sets the text. * * @param string $text The text. * * @return $this */ public function text($text) { $this->getSourceQualifier()->text($text); return $this; } /** * Sets the text style. * * @param array|TextStyle $style The text style. * * @return $this */ public function textStyle($style) { $this->getSourceQualifier()->textStyle($style); return $this; } /** * Adds a small amount of padding around the text overlay string. * * @return $this * * @see Flag::textNoTrim */ public function noTrim() { return $this->addFlag(Flag::textNoTrim()); } /** * Returns an error if the text overlay exceeds the image boundaries. * * @return $this * * @see Flag::textDisallowOverflow */ public function disallowOverflow() { return $this->addFlag(Flag::textDisallowOverflow()); } /** * Internal setter for text style property. * * @param string $styleName The style name. * @param string $value The style. * @param bool $named Indicates whether the property is a named property. * * @return static * * @internal */ protected function setStyleProperty($styleName, $value, $named = false) { $this->getSourceQualifier()->setStyleProperty($styleName, $value, $named); return $this; } }
[-] VideoSourceQualifier.php
[edit]
[-] LayerStackPosition.php
[edit]
[-] LayerQualifierFactory.php
[edit]
[-] Underlay.php
[edit]
[+]
..
[-] SubtitlesSource.php
[edit]
[-] LayerSourceTrait.php
[edit]
[-] AssetBasedSource.php
[edit]
[-] RemoteSourceValue.php
[edit]
[-] LutLayer.php
[edit]
[-] ImageOverlay.php
[edit]
[-] BaseSourceQualifier.php
[edit]
[-] Transition.php
[edit]
[-] TextSource.php
[edit]
[-] FetchImageSource.php
[edit]
[-] SourceValue.php
[edit]
[-] BlendMode.php
[edit]
[-] VideoSourceTrait.php
[edit]
[-] LayerQualifierTrait.php
[edit]
[-] Overlay.php
[edit]
[-] ImageSourceQualifier.php
[edit]
[-] TextSourceQualifier.php
[edit]
[-] VideoSource.php
[edit]
[-] ImageSourceTrait.php
[edit]
[-] MediaOverlay.php
[edit]
[-] SubtitlesSourceQualifier.php
[edit]
[-] LutSourceQualifier.php
[edit]
[-] Source.php
[edit]
[-] BaseSource.php
[edit]
[-] ImageSource.php
[edit]
[-] BaseSourceContainer.php
[edit]
[-] FetchSourceQualifier.php
[edit]
[-] VideoOverlay.php
[edit]