OverlayTransformation class

The overlay operation allows to layer images one over another.

See https://uploadcare.com/docs/transformations/image/overlay/#overlay

You can use overlay transformation to source image, see https://uploadcare.com/docs/transformations/image/overlay/#overlay-self

Example:

CdnImage('image-id-1')
..transform(OverlayTransformation(
  'image-id-2',
  dimensions: Size(40, 30),
  coordinates: OverlayCoordinates.center,
  opacity: 40,
))
..transform(OverlayTransformation(
  'image-id-3',
  dimensions: Size(40, 30),
  coordinates: OverlayCoordinates(const Offset(40, 90)),
));
Inheritance
Implemented types

Constructors

OverlayTransformation(String imageId, {Dimensions? dimensions, Coordinates? coordinates, int? opacity})

Properties

coordinates Coordinates?
Relative position of the overlay over your input. By default, an overlay is positioned in the top-left corner of an input. Coordinates represent an offset along each of the axes in either pixel or percent format. In general, the coordinate system is similar to the CSS background-position. See Coordinates.
final
delimiter String
Instruction delimiter
no setterinherited
dimensions Dimensions?
Linear relative dimensions of the overlay image. The aspect ratio of an overlay is preserved.
final
hashCode int
The hash code for this object.
no setteroverride
imageId String
'self' or UUID of an image to be layered over input. To be recognized by :uuid, that image should be related to any project of your account. If you specify 'self' transfomation will be applied to source image
final
opacity int?
Controls the opacity of the overlay in percent format.
final
operation String
CDN API operation URL directive
no setteroverride
params List<String>
Related parameters
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator.
override