Esempio n. 1
0
        private Bounds GenerateReactionConditions(IReaction chemObj, Color fg, double scale)
        {
            var title = chemObj.GetProperty <string>(CDKPropertyName.ReactionConditions);

            if (string.IsNullOrEmpty(title))
            {
                return(new Bounds());
            }
            return(new Bounds(MarkedElement.Markup(StandardGenerator.EmbedText(font, emSize, title, fg, 1 / scale), "conditions")));
        }
Esempio n. 2
0
        /// <summary>
        /// Generate a bound element that is the title of the provided molecule. If title
        /// is not specified an empty bounds is returned.
        /// </summary>
        /// <param name="chemObj">molecule or reaction</param>
        /// <returns>bound element</returns>
        private Bounds GenerateTitle(RendererModel model, IChemObject chemObj, double scale)
        {
            var title = chemObj.GetProperty <string>(CDKPropertyName.Title);

            if (string.IsNullOrEmpty(title))
            {
                return(new Bounds());
            }
            scale = 1 / scale * model.GetTitleFontScale();
            return(new Bounds(MarkedElement.Markup(StandardGenerator.EmbedText(font, emSize, title, model.GetTitleColor(), scale), "title")));
        }
Esempio n. 3
0
 private Bounds GeneratePlusSymbol(double scale, Color fgcol)
 {
     return(new Bounds(StandardGenerator.EmbedText(font, emSize, "+", fgcol, 1 / scale)));
 }