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

x33g5p2x  于2022-01-20 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(124)

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

Halo.setRadius介绍

[英]Expression that represents the the distance the halo extends from the text
[中]表示光晕从文字延伸的距离的表达式

代码示例

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

public Halo createHalo(Fill fill, Expression radius) {
  Halo halo = new HaloImpl(filterFactory);
  halo.setFill(fill);
  halo.setRadius(radius);
  return halo;
}

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

/** Internal parse method - made protected for unit testing */
protected Halo parseHalo(Node root) {
  if (LOGGER.isLoggable(Level.FINEST)) {
    LOGGER.finest("parsing halo");
  }
  Halo halo = factory.createHalo(factory.createFill(ff.literal("#FFFFFF")), ff.literal(1.0));
  NodeList children = root.getChildNodes();
  final int length = children.getLength();
  for (int i = 0; i < length; i++) {
    Node child = children.item(i);
    if ((child == null) || (child.getNodeType() != Node.ELEMENT_NODE)) {
      continue;
    }
    String childName = child.getLocalName();
    if (childName == null) {
      childName = child.getNodeName();
    }
    if (childName.equalsIgnoreCase(fillSt)) {
      halo.setFill(parseFill(child));
    } else if (childName.equalsIgnoreCase("Radius")) {
      halo.setRadius(parseCssParameter(child));
    }
  }
  return halo;
}

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

@Override
  public void handle(YamlObject<?> obj, YamlParseContext context) {
    sym.setHalo(halo);
    YamlMap map = obj.map();
    context.push(
        new FillParser(factory) {
          @Override
          protected void fill(Fill fill) {
            halo.setFill(fill);
          }
        });
    if (map.has("radius")) {
      halo.setRadius(Util.expression(map.str("radius"), factory));
    }
  }
}

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

public Halo createHalo(Fill fill, Expression radius) {
  Halo halo = new HaloImpl();
  halo.setFill(fill);
  halo.setRadius(radius);
  return halo;
}

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

public Halo createHalo(Fill fill, Expression radius) {
  Halo halo = new HaloImpl(filterFactory);
  halo.setFill(fill);
  halo.setRadius(radius);
  return halo;
}

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

halo.setFill(parseFill(child));
} else if (childName.equalsIgnoreCase("Radius")) {
  halo.setRadius(parseCssParameter(child));

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

public void apply() {
  if (halo != null) {
    halo.setFill(guiFill.getEdited());
    halo.setRadius(guiRadius.getExpression());
  }
}

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

copy.getHalo().setRadius(rescale(copy.getHalo().getRadius()));

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

halo.setRadius(parseCssParameter(child));

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

copy.getHalo().setRadius(rescale(copy.getHalo().getRadius(), uom));

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

@Override
  public void handle(YamlObject<?> obj, YamlParseContext context) {
    sym.setHalo(halo);
    YamlMap map = obj.map();
    context.push(
        new FillParser(factory) {
          @Override
          protected void fill(Fill fill) {
            halo.setFill(fill);
          }
        });
    if (map.has("radius")) {
      halo.setRadius(Util.expression(map.str("radius"), factory));
    }
  }
}

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

copy.getHalo().setRadius(rescale(copy.getHalo().getRadius()));

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

copy.getHalo().setRadius(rescale(copy.getHalo().getRadius(), mapScale, uom));

相关文章