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: 20.11
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 (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Remarks
Learn more
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