org.geotools.styling.Font.getFontSize()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(152)

本文整理了Java中org.geotools.styling.Font.getFontSize()方法的一些代码示例,展示了Font.getFontSize()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Font.getFontSize()方法的具体详情如下:
包路径:org.geotools.styling.Font
类名称:Font
方法名:getFontSize

Font.getFontSize介绍

暂无

代码示例

代码示例来源:origin: geotools/geotools

@SuppressWarnings("deprecation")
@Test
public void font() throws Exception {
  List<Expression> family = new ArrayList<Expression>();
  family.add(ff.literal("ariel"));
  family.add(ff.literal("Helvetica"));
  family.add(ff.literal("sanserif"));
  Expression style = ff.literal("noraml");
  Expression weight = ff.literal("normal");
  Expression size = ff.literal(12);
  Font font = sf.font(family, style, weight, size);
  assertEquals(family, font.getFamily());
  assertEquals(style, font.getStyle()); // oblique or italic
  assertEquals(weight, font.getWeight()); // bold or normal
  assertEquals(size, font.getSize());
  assertSame(font.getFontStyle(), font.getStyle());
  assertSame(font.getFontFamily(), family.get(0));
  assertSame(font.getFontWeight(), font.getWeight());
  assertSame(font.getFontSize(), font.getSize());
  FontImpl cast = FontImpl.cast(font);
  assertSame(cast, font);
}

代码示例来源:origin: org.geotools/gt2-render

size = ((Number) fonts[k].getFontSize().evaluate(feature)).intValue();
size = ((Number) fonts[k].getFontSize().evaluate(feature)).intValue();

代码示例来源:origin: org.geotools/gt-widgets-swing-pending

public void setEdited(Font font){        
  this.font = font;
  
  if(font != null){
    guiFamily.setExpression(font.getFontFamily());
    guiSize.setExpression(font.getFontSize());
    guiStyle.setExpression(font.getFontStyle());
    guiWeight.setExpression(font.getFontWeight());
  }
}

代码示例来源:origin: org.geotools/gt-main

/** Null safe copy of a single font */
protected Font copy(Font font) {
  if( font == null) return font;
  
  Expression fontFamily = copy( font.getFontFamily() );
  Expression fontStyle = copy( font.getFontStyle() );
  Expression fontWeight = copy( font.getFontWeight() );
  Expression fontSize = copy( font.getFontSize() );
  Font copy = sf.createFont(fontFamily, fontStyle, fontWeight, fontSize);
  return copy;
}

代码示例来源:origin: org.geotools/gt-render

if (font.getFontSize() != null) {
  font.getFontSize().accept(this, null);

代码示例来源:origin: org.geotools/gt2-main

if (font.getFontSize() != null) {
  font.getFontSize().accept(this,null);

代码示例来源:origin: org.geotools/gt2-main

if (font.getFontSize() != null) {
  font.getFontSize().accept(this,null);

代码示例来源:origin: org.geotools/gt-main

encodeCssParam("font-size", fonts[0].getFontSize());
encodeCssParam("font-style", fonts[0].getFontStyle());
encodeCssParam("font-weight", fonts[0].getFontWeight());

代码示例来源:origin: org.geotools/gt-render

if (font.getFontSize() != null) {
  font.getFontSize().accept(this,null);

代码示例来源:origin: org.geotools/gt2-main

encodeCssParam("font-size", fonts[0].getFontSize());
encodeCssParam("font-style", fonts[0].getFontStyle());
encodeCssParam("font-weight", fonts[0].getFontWeight());

相关文章