Examples of Graphic


Examples of org.docx4j.dml.Graphic

        .createCTNonVisualDrawingProps();
    org.docx4j.dml.CTNonVisualGraphicFrameProperties cNvGraphicFramePr = dmlFactory
        .createCTNonVisualGraphicFrameProperties();
    org.docx4j.dml.CTGraphicalObjectFrameLocking graphicFrameLocks = new org.docx4j.dml.CTGraphicalObjectFrameLocking();
    org.docx4j.dml.CTTransform2D xfrm = dmlFactory.createCTTransform2D();
    Graphic graphic = dmlFactory.createGraphic();
    GraphicData graphicData = dmlFactory.createGraphicData();
   
    // Build the parent-child relationship of this slides.xml
    graphicFrame.setNvGraphicFramePr(nvGraphicFramePr);
    nvGraphicFramePr.setCNvPr(cNvPr);
    cNvPr.setName("1");
    nvGraphicFramePr.setCNvGraphicFramePr(cNvGraphicFramePr);
    cNvGraphicFramePr.setGraphicFrameLocks(graphicFrameLocks);
    graphicFrameLocks.setNoGrp(true);
    nvGraphicFramePr.setNvPr(pmlFactory.createNvPr());
   
//        <p:xfrm>
//        <a:off x="1524000" y="1397000"/>
//        <a:ext cx="6096000" cy="741680"/>
//      </p:xfrm>
    graphicFrame.setXfrm(xfrm);
   
    CTPositiveSize2D ext = dmlFactory.createCTPositiveSize2D();
    ext.setCx(6096000);
    ext.setCy(741680);
   
    xfrm.setExt(ext);
   
    CTPoint2D off = dmlFactory.createCTPoint2D();
    xfrm.setOff(off);
    off.setX(1524000);
    off.setY(1397000);
   
    graphicFrame.setGraphic(graphic);
   
    graphic.setGraphicData(graphicData);
    graphicData
        .setUri("http://schemas.openxmlformats.org/drawingml/2006/table");
       
    CTTable ctTable = dmlFactory.createCTTable();
    JAXBElement<CTTable> tbl = dmlFactory.createTbl(ctTable);
View Full Code Here

Examples of org.geotools.styling.Graphic

                mark = build.createMark(this.type, (Fill)null, (Stroke)null);
            }
            return build.createGraphic(null, mark, null);
        }
        Mark mark = build.createMark(this.type, filll, stroke);
        Graphic graphic = build.createGraphic(null, mark, null);
        graphic.setSize(build.literalExpression(this.width));
        return graphic;
    }
View Full Code Here

Examples of org.geotools.styling.Graphic

     */
    private void apply() {
        PointSymbolizer symbolizer = (PointSymbolizer) getContent();
        StyleBuilder styleBuilder = getStyleBuilder();

        Graphic g = symbolizer.getGraphic();

        Mark[] mark = new Mark[1];
        mark[0] = styleBuilder.createMark(markerType.getText());
        RGB colour = markerColour.getColorValue();
        if (markerEnabled.getSelection()) {
            mark[0].setFill(styleBuilder
                    .createFill(new Color(colour.red, colour.green, colour.blue)));
            mark[0].getFill().setOpacity(
                    styleBuilder.literalExpression(markerOpacity.getSelection()
                            / opacityMaxValueFloat));
        } else {
            mark[0].setFill(null);
        }
        colour = borderColour.getColorValue();
        g.setSize(styleBuilder.literalExpression(new Integer(markerWidth.getSelection())
                .doubleValue()));
        colour = borderColour.getColorValue();
        if (borderEnabled.getSelection()) {
            mark[0].setStroke(styleBuilder.createStroke(new Color(colour.red, colour.green,
                    colour.blue), (new Integer(borderWidth.getSelection())).doubleValue()));
            mark[0].getStroke().setOpacity(
                    styleBuilder.literalExpression(borderOpacity.getSelection()
                            / opacityMaxValueFloat));
        } else {
            mark[0].setStroke(null);
        }
        g.setMarks(mark);
    }
View Full Code Here

Examples of org.geotools.styling.Graphic

            String width = values[1];
            String size = values[2];

            try {
                lineSymbolizerWrapper.setStrokeExternalGraphicStrokePath(url);
                Graphic graphicStroke = lineSymbolizerWrapper.getStrokeGraphicStroke();
                graphicStroke.setSize(Utilities.ff.literal(size));
                graphicStroke.setGap(Utilities.ff.literal(width));
            } catch (MalformedURLException e) {
                e.printStackTrace();
            }
            break;
        }
View Full Code Here

Examples of org.geotools.styling.Graphic

        geometryName.setInput(schema);
        String name = DEFAULT_GEOMETRY;

        Stroke stroke = null;
        Fill fill = null;
        Graphic graphic = null;
        TextSymbolizer text = null;
        LabelPlacement placement = null;

        List<Rule> rules = fts.rules();
        if (rules.size() > 1) {
View Full Code Here

Examples of org.geotools.styling.Graphic

     * Creates a default {@link Rule} for a point.
     *
     * @return the default rule.
     */
    public static Rule createDefaultPointRule() {
        Graphic graphic = sf.createDefaultGraphic();
        Mark circleMark = sf.getCircleMark();
        circleMark.setFill(sf.createFill(ff.literal(Color.red)));
        circleMark.setStroke(sf.createStroke(ff.literal(Color.BLACK), ff.literal(DEFAULT_WIDTH)));
        graphic.graphicalSymbols().clear();
        graphic.graphicalSymbols().add(circleMark);
        graphic.setSize(ff.literal(DEFAULT_SIZE));

        PointSymbolizer pointSymbolizer = sf.createPointSymbolizer();
        Rule rule = sf.createRule();
        rule.setName("New rule");
        rule.symbolizers().add(pointSymbolizer);
View Full Code Here

Examples of org.geotools.styling.Graphic

     */
    public static void substituteMark( Rule rule, String wellKnownMarkName ) {
        PointSymbolizer pointSymbolizer = Utilities.pointSymbolizerFromRule(rule);
        Mark oldMark = SLDs.mark(pointSymbolizer);

        Graphic graphic = SLDs.graphic(pointSymbolizer);
        graphic.graphicalSymbols().clear();
       
        Mark mark = Utilities.sf.createMark();
        mark.setWellKnownName(Utilities.ff.literal(wellKnownMarkName));
        if (oldMark != null) {
            mark.setFill(oldMark.getFill());
            mark.setStroke(oldMark.getStroke());
        }
        graphic.graphicalSymbols().add(mark);
    }
View Full Code Here

Examples of org.geotools.styling.Graphic

                e.printStackTrace();
            }
        }

        PointSymbolizer pointSymbolizer = Utilities.pointSymbolizerFromRule(rule);
        Graphic graphic = SLDs.graphic(pointSymbolizer);
        graphic.graphicalSymbols().clear();
        ExternalGraphic exGraphic = sf.createExternalGraphic(externalGraphicsUrl, format);

        graphic.graphicalSymbols().add(exGraphic);
    }
View Full Code Here

Examples of org.geotools.styling.Graphic

     * @param rule the {@link Rule}.
     * @param newSize the new size.
     */
    public static void changeMarkSize( Rule rule, int newSize ) {
        PointSymbolizer pointSymbolizer = Utilities.pointSymbolizerFromRule(rule);
        Graphic graphic = SLDs.graphic(pointSymbolizer);
        graphic.setSize(ff.literal(newSize));
        // Mark oldMark = SLDs.mark(pointSymbolizer);
        // oldMark.setSize(ff.literal(newSize));
        // Graphic graphic = SLDs.graphic(pointSymbolizer);
    }
View Full Code Here

Examples of org.geotools.styling.Graphic

     * @param rule the {@link Rule}.
     * @param newRotation the new rotation value in degrees.
     */
    public static void changeRotation( Rule rule, int newRotation ) {
        PointSymbolizer pointSymbolizer = Utilities.pointSymbolizerFromRule(rule);
        Graphic graphic = SLDs.graphic(pointSymbolizer);
        graphic.setRotation(ff.literal(newRotation));
        // Mark oldMark = SLDs.mark(pointSymbolizer);
        // oldMark.setSize(ff.literal(newRotation));
    }
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.