New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Image operation that renders a text string onto the current bitmap at a specified pixel position. Used when the user applies the Add Text tool. Creates and returns a new bitmap instance (original is not mutated).

Definition

Namespace:Telerik.Web.UI.ImageEditor

Assembly:Telerik.Web.UI.dll

Syntax:

C#
public class AddTextOperation : ImageOperation, IImageOperation

Inheritance: objectImageOperationAddTextOperation

Implements: IImageOperation

Inherited Members ImageOperation.Indexobject.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

C#
[SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public AddTextOperation(Point position, ImageText text, int index)
Parameters:positionPointtextImageTextindexint
C#
public AddTextOperation(Point position, ImageText text)
Parameters:positionPointtextImageText

Properties

Gets the operation command name used in serialization sequences ("AddText").

C#
public string Name { get; }

Implements: IImageOperation.Name

C#
public Point Position { get; set; }
C#
public ImageText Text { get; set; }

Methods

Applies the text drawing onto a new Bitmap cloned from the supplied source image and returns it.

C#
public Image Apply(Image image)
Parameters:imageImage

Source image to annotate.

Returns:

Image

New image instance containing the rendered text.

Implements: IImageOperation.Apply(Image)