Examples of Displacement


Examples of org.geotools.styling.Displacement

    }

    public void visit(Graphic gr) {
        Graphic copy = null;

        Displacement displacementCopy = copy( gr.getDisplacement() );
        ExternalGraphic[] externalGraphicsCopy = copy( gr.getExternalGraphics() );
        Mark[] marksCopy = copy( gr.getMarks() );
        Expression opacityCopy = copy( gr.getOpacity() );
        Expression rotationCopy = copy( gr.getRotation() );
        Expression sizeCopy = copy( gr.getSize() );
View Full Code Here

Examples of org.geotools.styling.Displacement

    }

    public void visit(Displacement dis) {
        Expression x = copy( dis.getDisplacementX() );
        Expression y = copy( dis.getDisplacementY() );
        Displacement copy = sf.createDisplacement(x, y);
       
        if( STRICT && !copy.equals( dis )){
            throw new IllegalStateException("Was unable to duplicate provided Displacement:"+dis );
        }
        pages.push(copy);
    }
View Full Code Here

Examples of org.geotools.styling.Displacement

                .literal(4));
        assertEqualsContract(clone, other, anchorPoint);
    }

    public void testDisplacement() {
        Displacement displacement = sf.createDisplacement(ff.literal(1),
                ff.literal(2));
       
        displacement.accept(visitor);
        Displacement clone = (Displacement) visitor.getCopy();
        assertCopy(displacement, clone);

        Displacement other = sf.createDisplacement(ff.literal(3),
                ff.literal(4));
        assertEqualsContract(clone, other, displacement);
    }
View Full Code Here

Examples of org.geotools.styling.Displacement

    }

    public void testNormal() throws Exception {
        SLDMockData.displacement(document, document);

        Displacement d = (Displacement) parse();
        assertEquals(Filters.asInt(d.getDisplacementX()), 1);
        assertEquals(Filters.asInt(d.getDisplacementY()), 2);
    }
View Full Code Here

Examples of org.geotools.styling.Displacement

        throws Exception {
        //<xsd:element ref="sld:AnchorPoint" minOccurs="0"/>
        AnchorPoint anchorPoint = (AnchorPoint) node.getChildValue("AnchorPoint");

        //<xsd:element ref="sld:Displacement" minOccurs="0"/>
        Displacement displacement = (Displacement) node.getChildValue("Displacement");

        //<xsd:element ref="sld:Rotation" minOccurs="0"/>
        Expression rotation = (Expression) node.getChildValue("Rotation");

        return styleFactory.createPointPlacement(anchorPoint, displacement, rotation);
View Full Code Here

Examples of org.geotools.styling.Displacement

      LOGGER.finest("parsing pointPlacement");
    }

    Expression rotation = ff.literal(0.0);
    AnchorPoint ap = null;
    Displacement dp = null;

    NodeList children = root.getChildNodes();
    final int length = children.getLength();
    for (int i = 0; i < length; i++) {
      Node child = children.item(i);
View Full Code Here

Examples of org.geotools.styling.Displacement

      if (childName.equalsIgnoreCase("DisplacementY")) {
        y = (parseCssParameter(child));
      }
    }

    Displacement dd = factory.createDisplacement(x, y);

    return dd;
  }
View Full Code Here

Examples of org.opengis.style.Displacement

        assertSame(displacement, DisplacementImpl.cast(displacement));

        assertEquals( displacement, sf.displacement( ff.literal(1.0), ff.literal(1.0)));
       
        org.opengis.style.Displacement external = new Displacement() {
            public Expression getDisplacementY() {
                return ff.literal(1.0);
            }

            public Expression getDisplacementX() {
View Full Code Here

Examples of org.opengis.style.Displacement

       
        Expression opacity = null;
        Expression size = null;
        Expression rotation = null;
        AnchorPoint anchor = null;
        Displacement disp = null;
        Graphic graphic = sf.graphic(symbols, opacity, size, rotation, anchor, disp);
       
        assertNotNull( graphic );
    }
View Full Code Here

Examples of org.opengis.style.Displacement

   
    Expression opacity = null; // use default
    Expression size = ff.literal(10);
    Expression rotation = null; // use default
    AnchorPoint anchor = null; // use default
    Displacement displacement = null; // use default
   
    // define a point symbolizer of a small circle
    Graphic circle = sf.graphic(symbols, opacity, size, rotation, anchor, displacement);
    PointSymbolizer pointSymbolizer = sf.pointSymbolizer("point", ff.property("the_geom"), null,
            null, circle);
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.