Package de.redsix.pdfcompare
Class PageArea
java.lang.Object
de.redsix.pdfcompare.PageArea
Describes a rectangular area of a page or multiple pages.
Is is used to specify exclusions and areas, that differ.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasJson()static StringasJson(Collection<PageArea> pageAreas) static Stringstatic StringasJsonWithExclusion(Collection<PageArea> pageAreas) static StringasJsonWithExclusion(Stream<PageArea> pageAreaStream) booleancontains(int x, int y) booleanintgetPage()intgetX1()intgetX2()intgetY1()intgetY2()booleaninthashCode()booleanhasPage()
-
Constructor Details
-
PageArea
public PageArea(int page) Defines the area for the whole page.- Parameters:
page- Page number starting with 1
-
PageArea
public PageArea(int x1, int y1, int x2, int y2) Defines the same area for every page.- Parameters:
x1- x-coordinate of the upper left corner of the rectangley1- y-coordinate of the upper left corner of the rectanglex2- x-coordinate of the lower right corner of the rectangley2- y-coordinate of the lower right corner of the rectangle
-
PageArea
public PageArea(int page, int x1, int y1, int x2, int y2) Defines an area for one particular page.- Parameters:
page- Page number starting with 1x1- x-coordinate of the upper left corner of the rectangley1- y-coordinate of the upper left corner of the rectanglex2- x-coordinate of the lower right corner of the rectangley2- y-coordinate of the lower right corner of the rectangle
-
-
Method Details
-
hasPage
public boolean hasPage() -
hasCoordinates
public boolean hasCoordinates() -
contains
public boolean contains(int x, int y) -
getPage
public int getPage() -
getX1
public int getX1() -
getY1
public int getY1() -
getX2
public int getX2() -
getY2
public int getY2() -
hashCode
public int hashCode() -
equals
-
asJson
-
asJsonWithExclusion
-
asJsonWithExclusion
-
asJson
-
asJson
-