SizeSearchCriteria Class
Represents criteria allowing filtering by watermark size.
Inheritance Hierarchy
SystemObject
  GroupDocs.Watermark.Search.SearchCriteriaSearchCriteria
    GroupDocs.Watermark.Search.SearchCriteriaSizeSearchCriteria

Namespace: GroupDocs.Watermark.Search.SearchCriteria
Assembly: GroupDocs.Watermark (in GroupDocs.Watermark.dll) Version: 20.7.0
Syntax
public class SizeSearchCriteria : SearchCriteria

The SizeSearchCriteria type exposes the following members.

Constructors
  NameDescription
Public methodSizeSearchCriteria
Initializes a new instance of the SizeSearchCriteria class with a specified dimension, a starting value and an ending value.
Properties
  NameDescription
Public propertyDimension
Gets the dimension of watermark to search by.
Public propertyMaximum
Gets the ending value.
Public propertyMinimum
Gets the starting value.
Methods
  NameDescription
Public methodAnd
Combines this SearchCriteria with other criteria using logical AND operator.
(Inherited from SearchCriteria.)
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 methodNot
Negates this SearchCriteria.
(Inherited from SearchCriteria.)
Public methodOr
Combines this SearchCriteria with other criteria using logical OR operator.
(Inherited from SearchCriteria.)
Public methodToString (Inherited from Object.)
Remarks
Examples
Find and remove watermark using search criteria.
C#
using (Watermarker watermarker = new Watermarker(@"C:\test.some_ext"))
{
    SizeSearchCriteria widthRange = new SizeSearchCriteria(Dimension.Width, 50, 100);
    RotateAngleSearchCriteria rotateAngle = new RotateAngleSearchCriteria(0, 45);
    TextSearchCriteria textCriteria = new TextSearchCriteria(new Regex("^Test watermark$"));
    PossibleWatermarkCollection watermarks = watermarker.Search(textCriteria.And(widthRange.Or(rotateAngle)));
    watermarks.Clear();
    watermarker.Save();
}
See Also