RegionReplacementOptions Class
Represents color and area parameters for image region replacement. See ImageAreaRedaction.
Inheritance Hierarchy
SystemObject
  GroupDocs.Redaction.RedactionsRegionReplacementOptions

Namespace: GroupDocs.Redaction.Redactions
Assembly: GroupDocs.Redaction (in GroupDocs.Redaction.dll) Version: 19.9
Syntax
public class RegionReplacementOptions

The RegionReplacementOptions type exposes the following members.

Constructors
  NameDescription
Public methodRegionReplacementOptions(Color, Size)
Initializes a new instance of RegionReplacementOptions class.
Public methodRegionReplacementOptions(Color, Font, String)
Initializes a new instance of RegionReplacementOptions class which size matches given text.
Properties
  NameDescription
Public propertyFillColor
Gets or sets the color to fill the redacted area.
Public propertySize
Gets or sets the rectangle with and height.
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Examples

The following example demonstrates replacing an area within the image with a solid color rectangle.

C#
using (Redactor redactor = new Redactor("D:\\test.jpg"))
{
   System.Drawing.Point samplePoint = new System.Drawing.Point(516, 311);
   System.Drawing.Size sampleSize = new System.Drawing.Size(170, 35);
   RedactorChangeLog result = redactor.Apply(new ImageAreaRedaction(samplePoint,
                 new RegionReplacementOptions(System.Drawing.Color.Blue, sampleSize)));
   if (result.Status != RedactionStatus.Failed)
   {
      redactor.Save();
   };
}
See Also