com.groupdocs.watermark.search

Interfaces

Classes

com.groupdocs.watermark.search

Class RotateAngleSearchCriteria



  • public class RotateAngleSearchCriteria
    extends SearchCriteria
    Represents criteria allowing filtering by watermark rotate angle.

    Learn more:

    The following example demonstrates how to find and remove watermarks using search criteria.

    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(Pattern.compile("^Test watermark$"));
    
       PossibleWatermarkCollection watermarks = watermarker.search(textCriteria.and(widthRange.or(rotateAngle)));
       watermarks.clear();
    
       watermarker.save("C:\\modified_test.some_ext");
       watermarker.close();
     
    • Constructor Detail

      • RotateAngleSearchCriteria

        public RotateAngleSearchCriteria(double minAngle,
                                 double maxAngle)
        Initializes a new instance of the RotateAngleSearchCriteria class with a starting angle and a ending angle.
        Parameters:
        minAngle - The starting angle in degrees.
        maxAngle - The ending angle in degrees.
    • Method Detail

      • getMinimumAngle

        public final double getMinimumAngle()

        Gets the starting angle in degrees.

        Returns:
        The starting angle.
      • getMaximumAngle

        public final double getMaximumAngle()

        Gets the ending angle in degrees.

        Returns:
        The ending angle.