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

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

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

Halo.getFill介绍

[英]The fill (color) of the halo
[中]光环的填充(颜色)

代码示例

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

@Override
public void visit(Halo halo) {
  if (halo.getFill() != null) {
    halo.getFill().accept(this);
  }
}

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

/** @see org.geotools.styling.StyleVisitor#visit(org.geotools.styling.Halo) */
public void visit(Halo halo) {
  if (halo.getFill() != null) {
    halo.getFill().accept(this);
  }
  if (halo.getRadius() != null) {
    halo.getRadius().accept(this, null);
  }
}

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

public void visit(Halo halo) {
  Fill fill = copy(halo.getFill());
  Expression radius = copy(halo.getRadius());
  Halo copy = sf.createHalo(fill, radius);
  if (STRICT && !copy.equals(halo)) {
    throw new IllegalStateException("Was unable to duplicate provided raster:" + halo);
  }
  pages.push(copy);
}

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

public void visit(Halo halo) {
  start("Halo");
  if (halo.getRadius() != null) {
    encodeValue("Radius", null, halo.getRadius(), null);
  }
  if (halo.getFill() != null) {
    halo.getFill().accept(this);
  }
  end("Halo");
}

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

/**
 * Retrieves the colour of the halo fill a TextSymbolizer.
 *
 * @param symbolizer Text symbolizer information.
 * @return Color of the halo's fill, or null if unavailable.
 */
public static Color textHaloFill(TextSymbolizer symbolizer) {
  Halo halo = symbolizer.getHalo();
  if (halo == null) {
    return null;
  }
  Fill fill = halo.getFill();
  if (fill == null) {
    return null;
  }
  return color(fill.getColor());
}

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

/**
 * Retrieves the halo opacity from the first TextSymbolizer.
 *
 * @param symbolizer Text symbolizer information.
 * @return double of the halo's opacity, or NaN if unavailable.
 */
public static double textHaloOpacity(TextSymbolizer symbolizer) {
  if (symbolizer == null) {
    return Double.NaN;
  }
  Halo halo = symbolizer.getHalo();
  if (halo == null) {
    return Double.NaN;
  }
  Fill fill = halo.getFill();
  if (fill == null) {
    return Double.NaN;
  }
  Expression expr = fill.getOpacity();
  if (expr == null) {
    return Double.NaN;
  }
  return Filters.asDouble(expr);
}

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

@Override
  protected void encode(Halo h) {
    push("halo");
    inline(new FillEncoder(h.getFill()));
    put("radius", h.getRadius());
  }
}

代码示例来源:origin: org.geoserver/wms

/**
 * @see org.geotools.styling.StyleVisitor#visit(org.geotools.styling.Halo)
 */
public void visit(Halo halo) {
  if (halo.getFill() != null) {
    halo.getFill().accept(this);
  }
}

代码示例来源:origin: org.geoserver/gs-wms

/** @see org.geotools.styling.StyleVisitor#visit(org.geotools.styling.Halo) */
public void visit(Halo halo) {
  if (halo.getFill() != null) {
    halo.getFill().accept(this);
  }
}

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

ts2d.setHaloFill(getPaint(halo.getFill(), feature, symbolizer));
ts2d.setHaloComposite(getComposite(halo.getFill(), feature));
ts2d.setHaloRadius(evalToFloat(halo.getRadius(), feature, 1));

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

@Override
public void visit(Halo halo) {
  if (halo.getFill() != null) {
    halo.getFill().accept(this);
  }
  if (halo.getRadius() != null) {
    //halo.getRadius().accept(visitor, extraData)
  }
}

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

/**
 * @see org.geotools.styling.StyleVisitor#visit(org.geotools.styling.Halo)
 */
public void visit(Halo halo) {
  if (halo.getFill() != null) {
    halo.getFill().accept(this);
  }
  if (halo.getRadius() != null) {
    halo.getRadius().accept(this,null);
  }
}

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

/**
 * @see org.geotools.styling.StyleVisitor#visit(org.geotools.styling.Halo)
 */
public void visit(Halo halo) {
  if (halo.getFill() != null) {
    halo.getFill().accept(this);
  }
  if (halo.getRadius() != null) {
    halo.getRadius().accept(this,null);
  }
}

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

public void visit(Halo halo) {
  Fill fill = copy(halo.getFill());
  Expression radius = copy(halo.getRadius());
  Halo copy = sf.createHalo(fill, radius);
  if (STRICT && !copy.equals(halo)) {
    throw new IllegalStateException("Was unable to duplicate provided raster:" + halo);
  }
  pages.push(copy);
}

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

public void visit(Halo halo) {
  start("Halo");
  if (halo.getRadius() != null) {
    encodeValue("Radius", null, halo.getRadius(), null);
  }
  if (halo.getFill() != null) {
    halo.getFill().accept(this);
  }
  end("Halo");
}

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

public void setEdited(Halo halo) {
  this.halo = halo;
  if (halo != null) {
    guiFill.setEdited(halo.getFill());
    guiRadius.setExpression(halo.getRadius());
  }
}

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

public void visit(Halo halo) {
  start("Halo");
  if (halo.getRadius() != null) {
    start("Radius");
    filterTranslator.encode(halo.getRadius());
    end("Radius");
  }
  if (halo.getFill() != null) {
    halo.getFill().accept(this);
  }
  end("Halo");
}

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

/**
 * Retrieves the colour of the halo fill a TextSymbolizer.
 *
 * @param symbolizer Text symbolizer information.
 *
 * @return Color of the halo's fill, or null if unavailable.
 */
public static Color textHaloFill(TextSymbolizer symbolizer) {
  Halo halo = symbolizer.getHalo();
  if (halo == null) {
    return null;
  }
  Fill fill = halo.getFill();
  if (fill == null) {
    return null;
  }
  return color(fill.getColor());
}

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

@Override
  protected void encode(Halo h) {
    push("halo");
    inline(new FillEncoder(h.getFill()));
    put("radius", h.getRadius());
  }
}

代码示例来源:origin: robward-scisys/sldeditor

/** @param textSymbolizer */
private void populateHalo(TextSymbolizer textSymbolizer) {
  GroupConfigInterface group;
  Halo halo = textSymbolizer.getHalo();
  group = getGroup(GroupIdEnum.HALO);
  group.enable(halo != null);
  if (halo != null) {
    Fill haloFill = halo.getFill();
    fieldConfigVisitor.populateField(FieldIdEnum.HALO_COLOUR, haloFill.getColor());
    fieldConfigVisitor.populateField(FieldIdEnum.HALO_RADIUS, halo.getRadius());
  } else {
    fieldConfigVisitor.populateField(FieldIdEnum.HALO_COLOUR, (Expression) null);
    fieldConfigVisitor.populateField(FieldIdEnum.HALO_RADIUS, (Expression) null);
  }
}

相关文章