Sets the current transform that will be applied on all coordinates before
being rendered to the target image.

@param  \Jdenticon\Rendering\Transform $transform  The transform to set.
If NULL is specified any existing transform is removed.
496307
public function setTransform(\Jdenticon\Rendering\Transform $transform) 
    {
        $this->transform = $transform === null ? 
            Transform::getEmpty() : $transform;
    }
433367
final public function setTransformedBody($transformedBody)
    {
        $encoding = (isset($this->headers["Content-Transfer-Encoding"])) ? $this->headers["Content-Transfer-Encoding"] : "";

        switch ($encoding) {
            case "quoted-printable":
                $this->setRawBody(quoted_printable_encode($transformedBody));
                break;
            case "base64":
                $this->setRawBody(chunk_split(base64_encode($transformedBody), 76));
                break;
            default:
                $this->setRawBody($transformedBody);
        }
    }
337635
public void setTransform(AffineTransform transform)
    {
        AffineTransform old = getTransform();
        this.transform = transform;
        setDirty(true);
        firePropertyChange("transform", old, transform);
    }
638907
public function setPostTransforms(iterable $transforms): self
	{
		foreach ($transforms as $transform) {
			$this->assertTransform($transform);
			$this->addTransform($transform, false);
		}

		return $this;
	}
790161
public function transform(FormTransformation $transformation)
    {
        $config = $this->getConfig();
        
        $config
            ->removeComponentsByType(GridFieldAddExistingAutocompleter::class)
            ->removeComponentsByType(GridFieldAddNewButton::class)
            ->removeComponentsByType(AddLineItem::class)
            ->removeComponentsByType(GridFieldEditButton::class);

        $config
            ->addComponent(new GridFieldViewButton());

        return $this;
    }
195822
public function bind($class, $transformer = null)
	{
		if(!$transformer) {
			return $this->autoBind($class);
		}

		$this->binds[$class] = $transformer;

		return $this;
	}
92238
public function offsetSet($offset, $value)
    {
        if (!$value instanceof Transformation) {
            throw new \InvalidArgumentException(
                '\phpDocumentor\Transformer\Template may only contain items of '
                . 'type \phpDocumentor\Transformer\Transformation'
            );
        }

        $this->transformations[$offset] = $value;
    }
774441
@SuppressWarnings("unchecked")
    protected Set _transform(final Set set) {
        if (set == null) return null;
        if (set instanceof BeanSet) return set;
        return new BeanSet<>(set, this);
    }
647730
final public function addTransformer(Transformer $transformer)
    {
        if ($this->hasTransformer($transformer)) {
            throw new DuplicateTransformerException('Transformer already added.');
        }

        $this->transformers[spl_object_hash($transformer)] = $transformer;

        return $this;
    }
218800
protected function pipe(callable $transformation) : FormatterAbstract
    {
        $that = clone $this; // Immutability!
        array_push($that->transformations, $transformation);

        return $that;
    }
509244
public void registerTransform(String pattern, AbstractTransform transform) {
        transforms.add(new Transform(new WildcardFileFilter(pattern.split("\\,")), transform));
    }
78390
@Override
	public void transform(Transform3D transform) {
		if (transform!=null) {
			Point3D p = new Point3f();
			for(int i=0; i<this.numCoords;) {
				p.set(this.coords[i], this.coords[i+1], this.coords[i+2]);
				transform.transform(p);
				this.coords[i++] = p.getX();
				this.coords[i++] = p.getY();
				this.coords[i++] = p.getZ();
			}
			this.graphicalBounds = null;
			this.logicalBounds = null;
		}
	}
1202299
private function applyLetterbox(&$imageInstance, $transform)
    {
        if (isset($transform['width'], $transform['height'])) { // if both isn't set, there's no need for a letterbox
            /** @var ConfigModel $settings */
            $config = ImagerService::getConfig();

            $letterboxDef = $config->getSetting('letterbox', $transform);

            try {
                $size = new Box($transform['width'], $transform['height']);

                $position = new Point(
                    (int)floor(((int)$transform['width'] - $imageInstance->getSize()->getWidth()) / 2),
                    (int)floor(((int)$transform['height'] - $imageInstance->getSize()->getHeight()) / 2)
                );
            } catch (InvalidArgumentException $e) {
                Craft::error($e->getMessage(), __METHOD__);
                throw new ImagerException($e->getMessage(), $e->getCode(), $e);
            }

            $palette = new RGB();
            $color = $palette->color(
                $letterboxDef['color'] ?? '#000',
                isset($letterboxDef['opacity']) ? (int)($letterboxDef['opacity'] * 100) : 0
            );
            
            if ($this->imagineInstance !== null) {
                $backgroundImage = $this->imagineInstance->create($size, $color);
                $backgroundImage->paste($imageInstance, $position);
                $imageInstance = $backgroundImage;
            }
        }
    }
336964
public function addTransformations(array $transformations) {
        foreach ($transformations as $name => $transformation) {
            $this->addTransformation($name, $transformation);
        }

        return $this;
    }
143982
public function transform($source)
    {
        if ($this->discoverInterface()) {
            $this->nb_interface->transform($source);
        } else {
            throw new ENabuRenderException(
                ENabuRenderException::ERROR_RENDER_TRANSFORM_NOT_FOUND,
                array($this->nb_descriptor->getKey())
            );
        }
    }
963220
public GeoShapeMapper transform(GeoTransformation... transformations) {
        if (this.transformations == null) {
            this.transformations = Arrays.asList(transformations);
        } else {
            this.transformations.addAll(Arrays.asList(transformations));
        }
        return this;
    }
1098517
public function transform($image, $transforms)
    {
        /** @var ConfigModel $settings */
        $config = ImagerService::getConfig();

        $sourceModel = new LocalSourceImageModel($image);

        $transformedImages = [];

        foreach ($transforms as $transform) {
            $transformedImages[] = $this->getTransformedImage($sourceModel, $transform);
        }

        $taskCreated = false;

        // Loop over transformed images and do post optimizations and upload to external storage 
        foreach ($transformedImages as $transformedImage) {
            /** @var CraftTransformedImageModel $transformedImage */
            if ($transformedImage->isNew) {
                $isFinalVersion = $this->optimize($transformedImage);
                $this->store($transformedImage, $isFinalVersion);

                if (!$isFinalVersion) {
                    $taskCreated = true;
                }
            }
        }

        // If ajax request, trigger jobs immediately
        if (!Craft::$app->getRequest()->isConsoleRequest && $taskCreated && $config->runJobsImmediatelyOnAjaxRequests && Craft::$app->getRequest()->getIsAjax()) {
            $this->triggerQueueNow();
        }

        return $transformedImages;
    }