本文整理汇总了Java中org.fit.layout.model.Area.getFontStyle方法的典型用法代码示例。如果您正苦于以下问题:Java Area.getFontStyle方法的具体用法?Java Area.getFontStyle怎么用?Java Area.getFontStyle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.fit.layout.model.Area
的用法示例。
在下文中一共展示了Area.getFontStyle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMarkedness
import org.fit.layout.model.Area; //导入方法依赖的package包/类
/**
* Computes the markedness of the area. The markedness generally describes the visual importance of the area based on different criteria.
* @return the computed expressiveness
*/
public double getMarkedness(Area node)
{
double fsz = node.getFontSize() / avgfont; //use relative font size, 0 is the normal font
double fwt = node.getFontWeight();
double fst = node.getFontStyle();
double ind = getIndentation(node);
double cen = isCentered(node) ? 1.0 : 0.0;
double contrast = getContrast(node);
double cp = 1.0 - ca.getColorPercentage(node);
double bcp = bca.getColorPercentage(node);
bcp = (bcp < 0.0) ? 0.0 : (1.0 - bcp);
//weighting
double exp = weights[WFSZ] * fsz
+ weights[WFWT] * fwt
+ weights[WFST] * fst
+ weights[WIND] * ind
+ weights[WCON] * contrast
+ weights[WCEN] * cen
+ weights[WCP] * cp
+ weights[WBCP] * bcp;
return exp;
}
示例2: NodeStyle
import org.fit.layout.model.Area; //导入方法依赖的package包/类
/**
* Computes the style of an area node.
* @param area
*/
public NodeStyle(Area area)
{
Vector<Box> boxes = area.getAllBoxes();
fontSize = area.getFontSize();
style = area.getFontStyle();
weight = area.getFontWeight();
if (!boxes.isEmpty())
color = boxes.firstElement().getColor();
else
color = Color.BLACK;
indent = (int) Math.round(computeIndentation(area));
}