Class ContrastRatioConsumer
java.lang.Object
org.verapdf.wcag.algorithms.semanticalgorithms.consumers.WCAGConsumer
org.verapdf.wcag.algorithms.semanticalgorithms.consumers.ContrastRatioConsumer
- All Implemented Interfaces:
Closeable,AutoCloseable,Consumer<INode>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionContrastRatioConsumer(String sourcePdfPath) ContrastRatioConsumer(String password, boolean enableAntialias, Float imagePixelSize) ContrastRatioConsumer(String sourcePdfPath, String password, boolean enableAntialias, Float imagePixelSize) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcalculateContrast(ITree tree) voidcalculateContrastRatio(TextChunk textChunk) voidcalculateContrastRation(TextChunk textChunk, BufferedImage renderedPage) voidclose()doublegetContrastRatio(double first, double second) floatdoublegetDpiScalingForPage(int pageNumber) getPageSubImage(BoundingBox bBox) getRenderPage(int pageNumber) booleanbooleanrun()Methods inherited from class org.verapdf.wcag.algorithms.semanticalgorithms.consumers.WCAGConsumer
startStep
-
Field Details
-
PDF_DPI
public static final int PDF_DPI- See Also:
-
-
Constructor Details
-
ContrastRatioConsumer
- Throws:
IOException
-
ContrastRatioConsumer
- Throws:
IOException
-
ContrastRatioConsumer
public ContrastRatioConsumer(String sourcePdfPath, String password, boolean enableAntialias, Float imagePixelSize) throws IOException - Throws:
IOException
-
ContrastRatioConsumer
-
-
Method Details
-
run
public boolean run()- Overrides:
runin classWCAGConsumer
-
calculateContrast
-
accept
-
getContrastRatio
public double getContrastRatio(double first, double second) -
getRenderPage
-
calculateContrastRatio
-
getDpiScalingForPage
public double getDpiScalingForPage(int pageNumber) -
isUseConstantRenderDpi
public boolean isUseConstantRenderDpi() -
calculateContrastRation
-
getPageSubImage
-
getDPI
-
getPercent
- Overrides:
getPercentin classWCAGConsumer
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getImagePixelSize
-
getWCAGProgressStatus
- Overrides:
getWCAGProgressStatusin classWCAGConsumer
-