public class BackgroundColorAnalyzer extends Object
| Constructor and Description |
|---|
BackgroundColorAnalyzer(org.fit.layout.model.Area root)
Constructs a color analyzer.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getColorPercentage(org.fit.layout.model.Area area)
Obtains the average percentage of the total area that has the same background color as the given area.
|
double |
getColorPercentage(Color color)
Obtains the percentage of the area that has the given color.
|
static Color |
getEffectiveBackgroundColor(org.fit.layout.model.Area area)
Computes the effective (visible) background color of an area considering
transparency and parent areas.
|
public BackgroundColorAnalyzer(org.fit.layout.model.Area root)
root - public double getColorPercentage(Color color)
color - the color to be tested.public double getColorPercentage(org.fit.layout.model.Area area)
area - the area whose background should be compared.public static Color getEffectiveBackgroundColor(org.fit.layout.model.Area area)
area - The areaCopyright © 2016. All rights reserved.