Class ContrastRatioConsumer
- java.lang.Object
-
- org.verapdf.wcag.algorithms.semanticalgorithms.consumers.WCAGConsumer
-
- org.verapdf.wcag.algorithms.semanticalgorithms.consumers.ContrastRatioConsumer
-
public class ContrastRatioConsumer extends WCAGConsumer implements Consumer<INode>
-
-
Field Summary
-
Fields inherited from class org.verapdf.wcag.algorithms.semanticalgorithms.consumers.WCAGConsumer
wcagProgressStatus
-
-
Constructor Summary
Constructors Constructor Description ContrastRatioConsumer(String sourcePdfPath, int... textChunksNumber)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(INode node)voidcalculateContrastRatio(TextChunk textChunk)voidcalculateContrastRation(TextChunk textChunk, BufferedImage renderedPage)doublegetContrastRatio(double first, double second)DoublegetPercent()intgetProcessedTextChunks()BufferedImagegetRenderPage(int pageNumber)-
Methods inherited from class org.verapdf.wcag.algorithms.semanticalgorithms.consumers.WCAGConsumer
getWCAGProgressStatus
-
-
-
-
Constructor Detail
-
ContrastRatioConsumer
public ContrastRatioConsumer(String sourcePdfPath, int... textChunksNumber)
-
-
Method Detail
-
getContrastRatio
public double getContrastRatio(double first, double second)
-
getRenderPage
public BufferedImage getRenderPage(int pageNumber)
-
calculateContrastRatio
public void calculateContrastRatio(TextChunk textChunk)
-
calculateContrastRation
public void calculateContrastRation(TextChunk textChunk, BufferedImage renderedPage)
-
getProcessedTextChunks
public int getProcessedTextChunks()
-
getPercent
public Double getPercent()
- Overrides:
getPercentin classWCAGConsumer
-
-