Examples of GraphicNode


Examples of org.apache.flex.compiler.internal.fxg.dom.GraphicNode

        buf.append("    public function ").append(className).append("()\n");
        buf.append("    {\n");
        buf.append("        super();\n");
        if (node instanceof GraphicNode)
        {
            GraphicNode graphicNode = (GraphicNode)node;
            if (!Double.isNaN(graphicNode.viewWidth))
                buf.append("        viewWidth = ").append(graphicNode.viewWidth).append(";\n");

            if (!Double.isNaN(graphicNode.viewHeight))
                buf.append("        viewHeight = ").append(graphicNode.viewHeight).append(";\n");

            if (graphicNode.getMaskType() == MaskType.ALPHA && graphicNode.mask != null)
            {
                int maskIndex = graphicNode.mask.getMaskIndex();
                buf.append("        this.cacheAsBitmap = true;\n");
                buf.append("        this.mask = this.getChildAt(").append(maskIndex).append(");\n");
            }
View Full Code Here

Examples of org.graphstream.ui.graphicGraph.GraphicNode

  protected String getNodeStyle(Node n) {
    String style = "tikzgsnode";

    if (n instanceof GraphicNode) {
      GraphicNode gn = (GraphicNode) n;

      style = classNames.get(gn.style.getId());

      if (gn.style.getFillMode() == FillMode.DYN_PLAIN) {
        double uicolor = gn.getNumber("ui.color");

        if (Double.isNaN(uicolor))
          uicolor = 0;

        int c = gn.style.getFillColorCount();
        int s = 1;
        double d = 1.0 / (c - 1);

        while (s * d < uicolor && s < c)
          s++;

        uicolor -= (s - 1) * d;
        uicolor *= c;

        style += String.format(Locale.ROOT, ", fill=%s!%d!%s",
            checkColor(gn.style.getFillColor(0)),
            (int) (uicolor * 100),
            checkColor(gn.style.getFillColor(1)));
      }

      if (gn.style.getSizeMode() == SizeMode.DYN_SIZE) {
        double uisize = gn.getNumber("ui.size");

        if (Double.isNaN(uisize))
          uisize = minSize;

        uisize = (uisize - minSize) / (maxSize - minSize);
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.