本文整理汇总了VB.NET中System.Windows.Xps.Packaging.XpsImageType枚举的典型用法代码示例。如果您正苦于以下问题:VB.NET XpsImageType枚举的具体用法?VB.NET XpsImageType怎么用?VB.NET XpsImageType使用的例子?那么恭喜您, 这里精选的枚举代码示例或许可以为您提供帮助。
在下文中一共展示了XpsImageType枚举的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Create
' ---------------------------- Create() ------------------------------
''' <summary>
''' Creates an XpsDocument using the Xps.Packaging APIs.</summary>
''' <param name="xpsDocument">
''' The XpsDocument to create.</param>
''' <remarks>
''' The Xps.Packaging APIs are used to create the DocumentSequence,
''' FixedDocument, and FixedPage "PackageParts" of an XpsDocument.
''' The applicationt is responsible for using the XmlWriter to
''' serialize the page markup and for supplying the streams for any
''' font or image resources.</remarks>
Public Sub Create(xpsDocument As XpsDocument)
' Create the document sequence
Dim docSeqWriter As IXpsFixedDocumentSequenceWriter = xpsDocument.AddFixedDocumentSequence()
' Create the document
Dim docWriter As IXpsFixedDocumentWriter = docSeqWriter.AddFixedDocument()
' Create the Page
Dim pageWriter As IXpsFixedPageWriter = docWriter.AddFixedPage()
' Get the XmlWriter
Dim xmlWriter As XmlWriter = pageWriter.XmlWriter
' Write the mark up according the XPS Specifications
BeginFixedPage(xmlWriter)
AddGlyphRun(pageWriter, xmlWriter, "This is a photo of the famous Notre Dame in Paris", 16, 50, 50, "C:\Windows\fonts\arial.ttf")
AddImage(pageWriter, xmlWriter, "ParisNotreDame.jpg", XpsImageType.JpegImageType, 100, 100, 600, 1100)
' End the page.
EndFixedPage(xmlWriter)
' Close the page, document, and document sequence.
pageWriter.Commit()
docWriter.Commit()
docSeqWriter.Commit()
_fontDictionary.Clear()
End Sub