/// <summary>
        /// The write image.
        /// </summary>
        /// <param name="i">The i.</param>
        public void WriteImage(Image i)
        {
            if (i.Source == null)
            {
                return;
            }

            this.AppendImage(i.Source, "Picture " + i.FigureNumber);

            this.body.AppendChild(CreateParagraph(i.GetFullCaption(this.style), FigureTextId));
        }
Exemple #2
0
        /// <summary>
        /// The write image.
        /// </summary>
        /// <param name="i">
        /// The i.
        /// </param>
        public void WriteImage(Image i)
        {
            // var figure = new Figure();
            var img = new System.Windows.Controls.Image();
            var bi  = new BitmapImage();

            bi.BeginInit();
            bi.UriSource = new Uri(Path.GetFullPath(i.Source), UriKind.Absolute);
            bi.EndInit();
            img.Source = bi;
            var c = new BlockUIContainer(img)
            {
                Child = img
            };

            this.doc.Blocks.Add(c);
        }
 /// <summary>
 /// Writes the image.
 /// </summary>
 /// <param name="i">
 /// The image.
 /// </param>
 public void WriteImage(Image i)
 {
     // this requires the image to be located in the same folder as the html
     string localFileName = i.Source;
     this.WriteStartFigure();
     this.WriteStartElement("img");
     this.WriteAttributeString("src", localFileName);
     this.WriteAttributeString("alt", i.FigureText);
     this.WriteEndElement();
     this.WriteEndFigure(i.FigureText);
 }
        /// <summary>
        /// The write image.
        /// </summary>
        /// <param name="i">
        /// The i.
        /// </param>
        public void WriteImage(Image i)
        {
            if (i.Source == null)
            {
                return;
            }

            this.AppendImage(i.Source, "Picture " + i.FigureNumber);

            this.body.Append(CreateParagraph(i.GetFullCaption(this.style), FigureTextID));
        }
 /// <summary>
 /// The write image.
 /// </summary>
 /// <param name="i">
 /// The i.
 /// </param>
 public void WriteImage(Image i)
 {
     // var figure = new Figure();
     var img = new System.Windows.Controls.Image();
     var bi = new BitmapImage();
     bi.BeginInit();
     bi.UriSource = new Uri(Path.GetFullPath(i.Source), UriKind.Absolute);
     bi.EndInit();
     img.Source = bi;
     var c = new BlockUIContainer(img) { Child = img };
     this.doc.Blocks.Add(c);
 }
 /// <summary>
 /// Writes the image.
 /// </summary>
 /// <param name="i">
 /// The i.
 /// </param>
 public void WriteImage(Image i)
 {
     this.WriteIndentedLine(@"\begin{figure}[h]");
     this.WriteIndentedLine(@"\begin{center}");
     this.WriteIndentedLine(@"\includegraphics[width=0.8\textwidth]{" + i.Source + "}");
     this.WriteIndentedLine(@"\end{center}");
     this.WriteIndentedLine(@"\caption{" + LatexEncodeText(i.FigureText) + "}");
     this.WriteIndentedLine(@"\end{figure}");
     this.WriteLine();
 }