本文整理匯總了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