Examples of Graphic


Examples of org.opengis.style.Graphic

    public static Color pointStrokeColorWithAlpha( PointSymbolizer symbolizer ) {
        if (symbolizer == null) {
            return null;
        }

        Graphic graphic = symbolizer.getGraphic();
        if (graphic == null) {
            return null;
        }

        for( GraphicalSymbol gs : graphic.graphicalSymbols() ) {
            if ((gs != null) && (gs instanceof Mark)) {
                Mark mark = (Mark) gs;
                Stroke stroke = mark.getStroke();
                if (stroke != null) {
                    Color colour = color(stroke);
View Full Code Here

Examples of org.sgx.yuigwt.yui.graphic.Graphic

public void test(final Node parent) {
YUI.Use(new String[]{"graphics", "dd-drag"}, new YUICallback() {
  @Override
  public void ready(final YuiContext Y) {
   
    Graphic g1 = Y.newGraphic(GraphicConfig.create().render(parent));
   
    //move the graphic to parent's position
    g1.x(parent.getX()).y(parent.getY());
   
    Shape rect1 = g1.addShape(ShapeConfig.createRect().
      width(200).height(120).x(100).y(50).
      fill(Fill.create().color("red").opacity(0.7))
    );
   
    Shape circle1 = g1.addShape(ShapeConfig.createCircle().
      x(100).y(50).radius(70).
      fill(Fill.create().color("blue").opacity(0.5))
    );
   
    Shape ellipse1 = g1.addShape(ShapeConfig.createEllipse().
      x(0).y(0).height(70).width(220).   
      fill(Fill.create().
        type(Fill.TYPE_LINEAR).
        rotation(271).stops(new FillStop[]{
          FillStop.create("#ff6666").opacity(0.8).offset(0),
          FillStop.create("#00ffff").opacity(0.8).offset(0.5),
          FillStop.create("#000000").opacity(0.6).offset(1)
        })
      )
    );
   
    //make the ellipse draggable
    Drag mydrag = Y.newDDDrag(DragConfig.create().node(ellipse1));
   
    //draw a path
    Shape diamond1 = g1.addShape(ShapeConfig.createPath().
      fill(Fill.create().color("blue").opacity(0.5))
    );
    diamond1.moveTo(60, 60);
    diamond1.lineTo(80, 40);
    diamond1.lineTo(100, 60);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.