Java 类org.newdawn.slick.svg.Diagram 实例源码

项目:trashjam2017    文件:UseProcessor.java   
/**
 * @see org.newdawn.slick.svg.inkscape.ElementProcessor#process(org.newdawn.slick.svg.Loader, org.w3c.dom.Element, org.newdawn.slick.svg.Diagram, org.newdawn.slick.geom.Transform)
 */
public void process(Loader loader, Element element, Diagram diagram,
        Transform transform) throws ParsingException {

    String ref = element.getAttributeNS("http://www.w3.org/1999/xlink", "href");
    String href = Util.getAsReference(ref);

    Figure referenced = diagram.getFigureByID(href);
    if (referenced == null) {
        throw new ParsingException(element, "Unable to locate referenced element: "+href);
    }

    Transform local = Util.getTransform(element);
    Transform trans = local.concatenate(referenced.getTransform());

    NonGeometricData data = Util.getNonGeometricData(element);
    Shape shape = referenced.getShape().transform(trans);
    data.addAttribute(NonGeometricData.FILL, referenced.getData().getAttribute(NonGeometricData.FILL));
    data.addAttribute(NonGeometricData.STROKE, referenced.getData().getAttribute(NonGeometricData.STROKE));
    data.addAttribute(NonGeometricData.OPACITY, referenced.getData().getAttribute(NonGeometricData.OPACITY));
    data.addAttribute(NonGeometricData.STROKE_WIDTH, referenced.getData().getAttribute(NonGeometricData.STROKE_WIDTH));

    Figure figure = new Figure(referenced.getType(), shape, data, trans);
    diagram.addFigure(figure);
}
项目:Progetto-C    文件:UseProcessor.java   
/**
 * @see org.newdawn.slick.svg.inkscape.ElementProcessor#process(org.newdawn.slick.svg.Loader, org.w3c.dom.Element, org.newdawn.slick.svg.Diagram, org.newdawn.slick.geom.Transform)
 */
public void process(Loader loader, Element element, Diagram diagram,
        Transform transform) throws ParsingException {

    String ref = element.getAttributeNS("http://www.w3.org/1999/xlink", "href");
    String href = Util.getAsReference(ref);

    Figure referenced = diagram.getFigureByID(href);
    if (referenced == null) {
        throw new ParsingException(element, "Unable to locate referenced element: "+href);
    }

    Transform local = Util.getTransform(element);
    Transform trans = local.concatenate(referenced.getTransform());

    NonGeometricData data = Util.getNonGeometricData(element);
    Shape shape = referenced.getShape().transform(trans);
    data.addAttribute(NonGeometricData.FILL, referenced.getData().getAttribute(NonGeometricData.FILL));
    data.addAttribute(NonGeometricData.STROKE, referenced.getData().getAttribute(NonGeometricData.STROKE));
    data.addAttribute(NonGeometricData.OPACITY, referenced.getData().getAttribute(NonGeometricData.OPACITY));
    data.addAttribute(NonGeometricData.STROKE_WIDTH, referenced.getData().getAttribute(NonGeometricData.STROKE_WIDTH));

    Figure figure = new Figure(referenced.getType(), shape, data, trans);
    diagram.addFigure(figure);
}
项目:BaseClient    文件:UseProcessor.java   
/**
 * @see org.newdawn.slick.svg.inkscape.ElementProcessor#process(org.newdawn.slick.svg.Loader, org.w3c.dom.Element, org.newdawn.slick.svg.Diagram, org.newdawn.slick.geom.Transform)
 */
public void process(Loader loader, Element element, Diagram diagram,
        Transform transform) throws ParsingException {

    String ref = element.getAttributeNS("http://www.w3.org/1999/xlink", "href");
    String href = Util.getAsReference(ref);

    Figure referenced = diagram.getFigureByID(href);
    if (referenced == null) {
        throw new ParsingException(element, "Unable to locate referenced element: "+href);
    }

    Transform local = Util.getTransform(element);
    Transform trans = local.concatenate(referenced.getTransform());

    NonGeometricData data = Util.getNonGeometricData(element);
    Shape shape = referenced.getShape().transform(trans);
    data.addAttribute(NonGeometricData.FILL, referenced.getData().getAttribute(NonGeometricData.FILL));
    data.addAttribute(NonGeometricData.STROKE, referenced.getData().getAttribute(NonGeometricData.STROKE));
    data.addAttribute(NonGeometricData.OPACITY, referenced.getData().getAttribute(NonGeometricData.OPACITY));
    data.addAttribute(NonGeometricData.STROKE_WIDTH, referenced.getData().getAttribute(NonGeometricData.STROKE_WIDTH));

    Figure figure = new Figure(referenced.getType(), shape, data, trans);
    diagram.addFigure(figure);
}
项目:GPVM    文件:UseProcessor.java   
/**
 * @see org.newdawn.slick.svg.inkscape.ElementProcessor#process(org.newdawn.slick.svg.Loader, org.w3c.dom.Element, org.newdawn.slick.svg.Diagram, org.newdawn.slick.geom.Transform)
 */
public void process(Loader loader, Element element, Diagram diagram,
        Transform transform) throws ParsingException {

    String ref = element.getAttributeNS("http://www.w3.org/1999/xlink", "href");
    String href = Util.getAsReference(ref);

    Figure referenced = diagram.getFigureByID(href);
    if (referenced == null) {
        throw new ParsingException(element, "Unable to locate referenced element: "+href);
    }

    Transform local = Util.getTransform(element);
    Transform trans = local.concatenate(referenced.getTransform());

    NonGeometricData data = Util.getNonGeometricData(element);
    Shape shape = referenced.getShape().transform(trans);
    data.addAttribute(NonGeometricData.FILL, referenced.getData().getAttribute(NonGeometricData.FILL));
    data.addAttribute(NonGeometricData.STROKE, referenced.getData().getAttribute(NonGeometricData.STROKE));
    data.addAttribute(NonGeometricData.OPACITY, referenced.getData().getAttribute(NonGeometricData.OPACITY));
    data.addAttribute(NonGeometricData.STROKE_WIDTH, referenced.getData().getAttribute(NonGeometricData.STROKE_WIDTH));

    Figure figure = new Figure(referenced.getType(), shape, data, trans);
    diagram.addFigure(figure);
}
项目:GPVM    文件:UseProcessor.java   
/**
 * @see org.newdawn.slick.svg.inkscape.ElementProcessor#process(org.newdawn.slick.svg.Loader, org.w3c.dom.Element, org.newdawn.slick.svg.Diagram, org.newdawn.slick.geom.Transform)
 */
public void process(Loader loader, Element element, Diagram diagram,
        Transform transform) throws ParsingException {

    String ref = element.getAttributeNS("http://www.w3.org/1999/xlink", "href");
    String href = Util.getAsReference(ref);

    Figure referenced = diagram.getFigureByID(href);
    if (referenced == null) {
        throw new ParsingException(element, "Unable to locate referenced element: "+href);
    }

    Transform local = Util.getTransform(element);
    Transform trans = local.concatenate(referenced.getTransform());

    NonGeometricData data = Util.getNonGeometricData(element);
    Shape shape = referenced.getShape().transform(trans);
    data.addAttribute(NonGeometricData.FILL, referenced.getData().getAttribute(NonGeometricData.FILL));
    data.addAttribute(NonGeometricData.STROKE, referenced.getData().getAttribute(NonGeometricData.STROKE));
    data.addAttribute(NonGeometricData.OPACITY, referenced.getData().getAttribute(NonGeometricData.OPACITY));
    data.addAttribute(NonGeometricData.STROKE_WIDTH, referenced.getData().getAttribute(NonGeometricData.STROKE_WIDTH));

    Figure figure = new Figure(referenced.getType(), shape, data, trans);
    diagram.addFigure(figure);
}
项目:SpaceStationAlpha    文件:UseProcessor.java   
/**
 * @see org.newdawn.slick.svg.inkscape.ElementProcessor#process(org.newdawn.slick.svg.Loader, org.w3c.dom.Element, org.newdawn.slick.svg.Diagram, org.newdawn.slick.geom.Transform)
 */
public void process(Loader loader, Element element, Diagram diagram,
        Transform transform) throws ParsingException {

    String ref = element.getAttributeNS("http://www.w3.org/1999/xlink", "href");
    String href = Util.getAsReference(ref);

    Figure referenced = diagram.getFigureByID(href);
    if (referenced == null) {
        throw new ParsingException(element, "Unable to locate referenced element: "+href);
    }

    Transform local = Util.getTransform(element);
    Transform trans = local.concatenate(referenced.getTransform());

    NonGeometricData data = Util.getNonGeometricData(element);
    Shape shape = referenced.getShape().transform(trans);
    data.addAttribute(NonGeometricData.FILL, referenced.getData().getAttribute(NonGeometricData.FILL));
    data.addAttribute(NonGeometricData.STROKE, referenced.getData().getAttribute(NonGeometricData.STROKE));
    data.addAttribute(NonGeometricData.OPACITY, referenced.getData().getAttribute(NonGeometricData.OPACITY));
    data.addAttribute(NonGeometricData.STROKE_WIDTH, referenced.getData().getAttribute(NonGeometricData.STROKE_WIDTH));

    Figure figure = new Figure(referenced.getType(), shape, data, trans);
    diagram.addFigure(figure);
}
项目:cretion    文件:UseProcessor.java   
/**
 * @see org.newdawn.slick.svg.inkscape.ElementProcessor#process(org.newdawn.slick.svg.Loader, org.w3c.dom.Element, org.newdawn.slick.svg.Diagram, org.newdawn.slick.geom.Transform)
 */
public void process(Loader loader, Element element, Diagram diagram,
        Transform transform) throws ParsingException {

    String ref = element.getAttributeNS("http://www.w3.org/1999/xlink", "href");
    String href = Util.getAsReference(ref);

    Figure referenced = diagram.getFigureByID(href);
    if (referenced == null) {
        throw new ParsingException(element, "Unable to locate referenced element: "+href);
    }

    Transform local = Util.getTransform(element);
    Transform trans = local.concatenate(referenced.getTransform());

    NonGeometricData data = Util.getNonGeometricData(element);
    Shape shape = referenced.getShape().transform(trans);
    data.addAttribute(NonGeometricData.FILL, referenced.getData().getAttribute(NonGeometricData.FILL));
    data.addAttribute(NonGeometricData.STROKE, referenced.getData().getAttribute(NonGeometricData.STROKE));
    data.addAttribute(NonGeometricData.OPACITY, referenced.getData().getAttribute(NonGeometricData.OPACITY));
    data.addAttribute(NonGeometricData.STROKE_WIDTH, referenced.getData().getAttribute(NonGeometricData.STROKE_WIDTH));

    Figure figure = new Figure(referenced.getType(), shape, data, trans);
    diagram.addFigure(figure);
}
项目:slick2d-maven    文件:UseProcessor.java   
/**
 * @see org.newdawn.slick.svg.inkscape.ElementProcessor#process(org.newdawn.slick.svg.Loader, org.w3c.dom.Element, org.newdawn.slick.svg.Diagram, org.newdawn.slick.geom.Transform)
 */
public void process(Loader loader, Element element, Diagram diagram,
        Transform transform) throws ParsingException {

    String ref = element.getAttributeNS("http://www.w3.org/1999/xlink", "href");
    String href = Util.getAsReference(ref);

    Figure referenced = diagram.getFigureByID(href);
    if (referenced == null) {
        throw new ParsingException(element, "Unable to locate referenced element: "+href);
    }

    Transform local = Util.getTransform(element);
    Transform trans = local.concatenate(referenced.getTransform());

    NonGeometricData data = Util.getNonGeometricData(element);
    Shape shape = referenced.getShape().transform(trans);
    data.addAttribute(NonGeometricData.FILL, referenced.getData().getAttribute(NonGeometricData.FILL));
    data.addAttribute(NonGeometricData.STROKE, referenced.getData().getAttribute(NonGeometricData.STROKE));
    data.addAttribute(NonGeometricData.OPACITY, referenced.getData().getAttribute(NonGeometricData.OPACITY));
    data.addAttribute(NonGeometricData.STROKE_WIDTH, referenced.getData().getAttribute(NonGeometricData.STROKE_WIDTH));

    Figure figure = new Figure(referenced.getType(), shape, data, trans);
    diagram.addFigure(figure);
}
项目:trashjam2017    文件:ElementProcessor.java   
/**
 * Process a document extracting all the elements that the processor is 
 * interested in and producing appropriate diagram components for the
 * element.
 * 
 * @param loader The loader/context of the parsing
 * @param element The element to be processed
 * @param diagram The diagram to be built
 * @param transform The transform to apply to all elements at this level
 * @throws ParsingException Indicates an invalid content to an element
 */
public void process(Loader loader, Element element, Diagram diagram, Transform transform) throws ParsingException;
项目:Progetto-C    文件:ElementProcessor.java   
/**
 * Process a document extracting all the elements that the processor is 
 * interested in and producing appropriate diagram components for the
 * element.
 * 
 * @param loader The loader/context of the parsing
 * @param element The element to be processed
 * @param diagram The diagram to be built
 * @param transform The transform to apply to all elements at this level
 * @throws ParsingException Indicates an invalid content to an element
 */
public void process(Loader loader, Element element, Diagram diagram, Transform transform) throws ParsingException;
项目:BaseClient    文件:ElementProcessor.java   
/**
 * Process a document extracting all the elements that the processor is 
 * interested in and producing appropriate diagram components for the
 * element.
 * 
 * @param loader The loader/context of the parsing
 * @param element The element to be processed
 * @param diagram The diagram to be built
 * @param transform The transform to apply to all elements at this level
 * @throws ParsingException Indicates an invalid content to an element
 */
public void process(Loader loader, Element element, Diagram diagram, Transform transform) throws ParsingException;
项目:GPVM    文件:ElementProcessor.java   
/**
 * Process a document extracting all the elements that the processor is 
 * interested in and producing appropriate diagram components for the
 * element.
 * 
 * @param loader The loader/context of the parsing
 * @param element The element to be processed
 * @param diagram The diagram to be built
 * @param transform The transform to apply to all elements at this level
 * @throws ParsingException Indicates an invalid content to an element
 */
public void process(Loader loader, Element element, Diagram diagram, Transform transform) throws ParsingException;
项目:GPVM    文件:ElementProcessor.java   
/**
 * Process a document extracting all the elements that the processor is 
 * interested in and producing appropriate diagram components for the
 * element.
 * 
 * @param loader The loader/context of the parsing
 * @param element The element to be processed
 * @param diagram The diagram to be built
 * @param transform The transform to apply to all elements at this level
 * @throws ParsingException Indicates an invalid content to an element
 */
public void process(Loader loader, Element element, Diagram diagram, Transform transform) throws ParsingException;
项目:SpaceStationAlpha    文件:ElementProcessor.java   
/**
 * Process a document extracting all the elements that the processor is 
 * interested in and producing appropriate diagram components for the
 * element.
 * 
 * @param loader The loader/context of the parsing
 * @param element The element to be processed
 * @param diagram The diagram to be built
 * @param transform The transform to apply to all elements at this level
 * @throws ParsingException Indicates an invalid content to an element
 */
public void process(Loader loader, Element element, Diagram diagram, Transform transform) throws ParsingException;
项目:cretion    文件:ElementProcessor.java   
/**
 * Process a document extracting all the elements that the processor is 
 * interested in and producing appropriate diagram components for the
 * element.
 * 
 * @param loader The loader/context of the parsing
 * @param element The element to be processed
 * @param diagram The diagram to be built
 * @param transform The transform to apply to all elements at this level
 * @throws ParsingException Indicates an invalid content to an element
 */
public void process(Loader loader, Element element, Diagram diagram, Transform transform) throws ParsingException;
项目:slick2d-maven    文件:ElementProcessor.java   
/**
 * Process a document extracting all the elements that the processor is 
 * interested in and producing appropriate diagram components for the
 * element.
 * 
 * @param loader The loader/context of the parsing
 * @param element The element to be processed
 * @param diagram The diagram to be built
 * @param transform The transform to apply to all elements at this level
 * @throws ParsingException Indicates an invalid content to an element
 */
public void process(Loader loader, Element element, Diagram diagram, Transform transform) throws ParsingException;