コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="styleTheme"/> class.
        /// </summary>
        /// <param name="h1Size">Size of the h1.</param>
        /// <param name="pSize">Size of the p.</param>
        /// <param name="margin">The margin.</param>
        /// <param name="padding">The padding.</param>
        /// <param name="pageFontName">Name of the page font.</param>
        /// <param name="headingFontName">Name of the heading font.</param>
        public styleTheme(aceBaseColorSetEnum colorSet, Int32 h1Size, Int32 pSize, fourSideSetting margin, fourSideSetting padding,
                          aceFont pageFontName, aceFont headingFontName = aceFont.none)
        {
            palletes = new acePaletteProvider(colorSet.getSetOfColors());

            textShotProvider       = new styleTextShotProvider(this);
            styleContainerProvider = new styleContainerShotProvider(this);
            borderProvider         = new styleBorderProvider(this);
            styler = new stylerForRange(this);

            zoneMain = new cursorZone(80, 2, 2);
            cMain    = new cursor(zoneMain, textCursorMode.scroll, textCursorZone.innerZone, "themeCursor");

            body = new stylePage();
            //body.maxSize

            fontForText     = new styleTextFont(pageFontName);
            fontForHeadings = new styleTextFont(headingFontName);
            fontSize        = new styleTextSizeSet(h1Size, pSize, margin, padding);
        }
コード例 #2
0
        /// <summary>
        /// Gets the output.
        /// </summary>
        /// <param name="model">The model.</param>
        /// <param name="colorProvider">The color provider.</param>
        /// <returns></returns>
        public override string getOutput(diagramModel model, acePaletteProvider colorProvider)
        {
            string output  = "";
            string newLine = "";

            output += "<div class=\"mermaid\" id=\"monotone\">" + Environment.NewLine + Environment.NewLine;

            output += model.diagramClassName + " " + model.direction.ToString() + ";" + Environment.NewLine;

            output += getOutputNodesDeclaration(model) + Environment.NewLine;

            output += getOutputLinksDeclaration(model) + Environment.NewLine;

            if (colorProvider != null)
            {
                output += getOutputStyleDeclaration(model, colorProvider) + Environment.NewLine + Environment.NewLine;
            }

            output += "</div>";

            return(output);
        }
コード例 #3
0
        /// <summary>
        /// Gets the output style declaration.
        /// </summary>
        /// <param name="model">The model.</param>
        /// <param name="colorProvider">The color provider.</param>
        /// <returns></returns>
        public override string getOutputStyleDeclaration(diagramModel model, acePaletteProvider colorProvider)
        {
            string output  = "";
            string newLine = "";

            // node declaration
            foreach (diagramNode node in model.nodes.Values)
            {
                newLine = "style N" + node.name + " ";

                colorProvider.setVariation(node.importance, false, -1, false, (acePaletteRole)node.color);

                newLine += " fill:" + colorProvider.bgColor.ColorToHex(); //.toHexColor(true);

                //   newLine += ";";
                //acePaletteVariationRole varRole = node.color;

                output = output.add(newLine, Environment.NewLine);
            }

            return(output);
        }
コード例 #4
0
 public abstract string getOutputStyleDeclaration(diagramModel model, acePaletteProvider colorProvider);
コード例 #5
0
 public abstract string getOutput(diagramModel model, acePaletteProvider colorProvider);