SizeSearchCriteria
Contents
[
Hide
]
SizeSearchCriteria class
Represents criteria allowing filtering by watermark size.
public class SizeSearchCriteria : SearchCriteria
Constructors
Name | Description |
---|---|
SizeSearchCriteria(Dimension, double, double) | Initializes a new instance of the SizeSearchCriteria class with a specified dimension, a starting value and an ending value. |
Properties
Name | Description |
---|---|
Dimension { get; } | Gets the dimension of watermark to search by. |
Maximum { get; } | Gets the ending value. |
Minimum { get; } | Gets the starting value. |
Methods
Name | Description |
---|---|
And(SearchCriteria) | Combines this SearchCriteria with other criteria using logical AND operator. |
Not() | Negates this SearchCriteria . |
Or(SearchCriteria) | Combines this SearchCriteria with other criteria using logical OR operator. |
Remarks
Learn more:
Examples
Find and remove watermark using search criteria.
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
- class SearchCriteria
- namespace GroupDocs.Watermark.Search.SearchCriteria
- assembly GroupDocs.Watermark