Aspose::TeX::Presentation::Xps::XpsDevice Class Reference

Implements the interface for outputting text and graphic content to XPS document. More...

Inherits Aspose::TeX::Presentation::Device, Aspose::TeX::Presentation::IInteractiveDevice, and Aspose::TeX::Presentation::IFragmentRasterizer.

Public Member Functions

ASPOSE_TEX_SHARED_API int32_t get_PageCount () override
 Gets the number of pages. More...
 
ASPOSE_TEX_SHARED_API bool get_IsReady () override
 Shows if device is ready for output. More...
 
ASPOSE_TEX_SHARED_API System::String get_DestinationName () override
 Gets destination name: output file name or device description. More...
 
ASPOSE_TEX_SHARED_API System::SharedPtr< System::Drawing::Penget_Stroke () override
 Gets/sets the current stroke. More...
 
ASPOSE_TEX_SHARED_API void set_Stroke (System::SharedPtr< System::Drawing::Pen > value) override
 Gets/sets the current stroke. More...
 
ASPOSE_TEX_SHARED_API System::SharedPtr< System::Drawing::Brushget_Fill () override
 Gets/sets the current fill. More...
 
ASPOSE_TEX_SHARED_API void set_Fill (System::SharedPtr< System::Drawing::Brush > value) override
 Gets/sets the current fill. More...
 
ASPOSE_TEX_SHARED_API float get_StrokeOpacity () override
 Gets/sets the current stroke opacity. More...
 
ASPOSE_TEX_SHARED_API void set_StrokeOpacity (float value) override
 Gets/sets the current stroke opacity. More...
 
ASPOSE_TEX_SHARED_API float get_FillOpacity () override
 Gets/sets the current fill opacity. More...
 
ASPOSE_TEX_SHARED_API void set_FillOpacity (float value) override
 Gets/sets the current fill opacity. More...
 
ASPOSE_TEX_SHARED_API XpsDevice ()
 Creates a new instance. The output file will be written to the output working directory taking the job name as a file name. More...
 
ASPOSE_TEX_SHARED_API XpsDevice (System::SharedPtr< System::IO::Stream > stream)
 Creates a new instance. The output file will be written to specified stream. More...
 
ASPOSE_TEX_SHARED_API void Initialize () override
 Initializes the device. More...
 
ASPOSE_TEX_SHARED_API System::SharedPtr< DeviceCreate () override
 Creates a copy of this device. More...
 
ASPOSE_TEX_SHARED_API void Dispose () override
 Disposes this device instance. Finalizes this device instance graphics state, i.e. switches APS composing context to the ApsCanvas of the level higher then this device's graphics state ApsCanvas. More...
 
ASPOSE_TEX_SHARED_API void StartDocument () override
 Starts the whole document. More...
 
ASPOSE_TEX_SHARED_API void EndDocument () override
 Finalizes the whole document. More...
 
ASPOSE_TEX_SHARED_API void StartPage (float width, float height) override
 Starts a new page. More...
 
ASPOSE_TEX_SHARED_API void EndPage () override
 Finalizes a page. More...
 
ASPOSE_TEX_SHARED_API void AddHyperlink (System::Drawing::RectangleF activeRect, System::SharedPtr< System::Drawing::Pen > border, System::String targetUri) override
 Set the hyperlink with a URI as its target. More...
 
ASPOSE_TEX_SHARED_API void AddBookmark (System::String name, System::Drawing::PointF position) override
 Adds the bookmark identified by the name. More...
 
ASPOSE_TEX_SHARED_API void SetTransform (System::SharedPtr< System::Drawing::Drawing2D::Matrix > matrix) override
 Sets the current coordinate space transformation. More...
 
ASPOSE_TEX_SHARED_API void SetClip (System::SharedPtr< System::Drawing::Drawing2D::GraphicsPath > path) override
 Sets the current clip path. More...
 
ASPOSE_TEX_SHARED_API void DrawString (System::String str, float originX, float originY, System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< GlyphData >>> charInfos) override
 Draws a text string. More...
 
ASPOSE_TEX_SHARED_API void DrawPath (System::SharedPtr< System::Drawing::Drawing2D::GraphicsPath > path) override
 Draws a path. More...
 
ASPOSE_TEX_SHARED_API void FillPath (System::SharedPtr< System::Drawing::Drawing2D::GraphicsPath > path) override
 Fill a path. More...
 
ASPOSE_TEX_SHARED_API void ShowImage (System::Drawing::PointF origin, System::Drawing::SizeF size, System::ArrayPtr< uint8_t > imageData) override
 Shows a raster image. More...
 
ASPOSE_TEX_SHARED_API void StartFragment () override
 Starts a fragment to rasterize. More...
 
ASPOSE_TEX_SHARED_API void EndFragment () override
 Ends a fragment to rasterize. More...
 
- Public Member Functions inherited from Aspose::TeX::Presentation::Device
ASPOSE_TEX_SHARED_API Device ()
 Creates a new instance. More...
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared reference counter. More...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API int32_t GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () const
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (uint32_t argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
virtual ASPOSECPP_SHARED_API bool FastCast (const Details::FastRttiBase &helper, void **out_ptr) const
 For internal purposes only. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool Equals (double const &objA, double const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 Specialization of Object::ReferenceEquals for case of string and nullptr. More...
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 Specialization of Object::ReferenceEquals for case of strings. More...
 

Protected Member Functions

ASPOSE_TEX_SHARED_API XpsDevice (System::SharedPtr< XpsDevice > device)
 Clone constructor. Initializes this device with another device. More...
 
ASPOSE_TEX_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION (XpsDevice, CODEPORTING_ARGS(System::SharedPtr< XpsDevice > device))
 
ASPOSE_TEX_SHARED_API void EndPageInternal (System::String evalMark) override
 
void ShowImage (System::Drawing::PointF origin, System::Drawing::SizeF size, System::ArrayPtr< uint8_t > imageData, System::Drawing::RectangleF cropBox)
 Shows a raster image. More...
 
ASPOSE_TEX_SHARED_API void ShowPage (System::Drawing::PointF origin, System::Drawing::SizeF size, System::String hash, System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Aspose::Rendering::ApsPage >>> pages, int32_t page) override
 // More...
 
virtual ASPOSE_TEX_SHARED_API ~XpsDevice ()
 
- Protected Member Functions inherited from Aspose::TeX::Presentation::Device
System::SharedPtr< Aspose::TeX::Presentation::SaveOptionsget_SaveOptions () const
 
void set_SaveOptions (System::SharedPtr< Aspose::TeX::Presentation::SaveOptions > value)
 
System::String get_JobName () const
 
void set_JobName (System::String value)
 
System::SharedPtr< Aspose::TeX::IO::IOutputWorkingDirectoryget_OutputDirectory () const
 
void set_OutputDirectory (System::SharedPtr< Aspose::TeX::IO::IOutputWorkingDirectory > value)
 
System::SharedPtr< Aspose::Foundation::Drawing::DrFont > get_Font ()
 Gets/sets the current font. More...
 
void set_Font (System::SharedPtr< Aspose::Foundation::Drawing::DrFont > value)
 Gets/sets the current font. More...
 
ASPOSE_TEX_SHARED_API Device (System::SharedPtr< Device > device)
 Clone constructor. Initializes this device with another device. More...
 
virtual ASPOSE_TEX_SHARED_API void SaveGraphicsState ()
 Saves the current graphics state. More...
 
virtual ASPOSE_TEX_SHARED_API void RestoreGraphicsState ()
 Rolls back to the graphics state previously saved. More...
 
void AdjustLineDash ()
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Implements C# typeof(System.Object) construct. More...
 

Detailed Description

Implements the interface for outputting text and graphic content to XPS document.

Constructor & Destructor Documentation

◆ XpsDevice() [1/3]

ASPOSE_TEX_SHARED_API Aspose::TeX::Presentation::Xps::XpsDevice::XpsDevice ( )

Creates a new instance. The output file will be written to the output working directory taking the job name as a file name.

◆ XpsDevice() [2/3]

ASPOSE_TEX_SHARED_API Aspose::TeX::Presentation::Xps::XpsDevice::XpsDevice ( System::SharedPtr< System::IO::Stream stream)

Creates a new instance. The output file will be written to specified stream.

Parameters
streamThe stream to write the output file to.

◆ XpsDevice() [3/3]

ASPOSE_TEX_SHARED_API Aspose::TeX::Presentation::Xps::XpsDevice::XpsDevice ( System::SharedPtr< XpsDevice device)
protected

Clone constructor. Initializes this device with another device.

Parameters
deviceThe device to clone.

◆ ~XpsDevice()

virtual ASPOSE_TEX_SHARED_API Aspose::TeX::Presentation::Xps::XpsDevice::~XpsDevice ( )
protectedvirtual

Member Function Documentation

◆ AddBookmark()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::AddBookmark ( System::String  name,
System::Drawing::PointF  position 
)
overridevirtual

Adds the bookmark identified by the name.

Parameters
nameThe name.
positionThe position.

Implements Aspose::TeX::Presentation::IInteractiveDevice.

◆ AddHyperlink()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::AddHyperlink ( System::Drawing::RectangleF  activeRect,
System::SharedPtr< System::Drawing::Pen border,
System::String  targetUri 
)
overridevirtual

Set the hyperlink with a URI as its target.

Parameters
activeRectThe active rectangle of the link.
borderThe link border.
targetUriThe target URI.

Implements Aspose::TeX::Presentation::Device.

◆ Create()

ASPOSE_TEX_SHARED_API System::SharedPtr<Device> Aspose::TeX::Presentation::Xps::XpsDevice::Create ( )
overridevirtual

Creates a copy of this device.

Returns
Copy of this device.

Reimplemented from Aspose::TeX::Presentation::Device.

◆ Dispose()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::Dispose ( )
overridevirtual

Disposes this device instance. Finalizes this device instance graphics state, i.e. switches APS composing context to the ApsCanvas of the level higher then this device's graphics state ApsCanvas.

Reimplemented from Aspose::TeX::Presentation::Device.

◆ DrawPath()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::DrawPath ( System::SharedPtr< System::Drawing::Drawing2D::GraphicsPath path)
overridevirtual

Draws a path.

Parameters
pathA path to draw.

Implements Aspose::TeX::Presentation::Device.

◆ DrawString()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::DrawString ( System::String  str,
float  originX,
float  originY,
System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< GlyphData >>>  charInfos 
)
overridevirtual

Draws a text string.

Parameters
strThe string.
originXThe x coordinate of the origin.
originYThe x coordinate of the origin.
charInfosGlyph data required for precise typesetting of a text string.

Implements Aspose::TeX::Presentation::Device.

◆ EndDocument()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::EndDocument ( )
overridevirtual

Finalizes the whole document.

Implements Aspose::TeX::Presentation::Device.

◆ EndFragment()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::EndFragment ( )
overridevirtual

Ends a fragment to rasterize.

Implements Aspose::TeX::Presentation::IFragmentRasterizer.

◆ EndPage()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::EndPage ( )
overridevirtual

Finalizes a page.

Implements Aspose::TeX::Presentation::Device.

◆ EndPageInternal()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::EndPageInternal ( System::String  evalMark)
overrideprotectedvirtual

Reimplemented from Aspose::TeX::Presentation::Device.

◆ FillPath()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::FillPath ( System::SharedPtr< System::Drawing::Drawing2D::GraphicsPath path)
overridevirtual

Fill a path.

Parameters
pathA path to fill.

Implements Aspose::TeX::Presentation::Device.

◆ get_DestinationName()

ASPOSE_TEX_SHARED_API System::String Aspose::TeX::Presentation::Xps::XpsDevice::get_DestinationName ( )
overridevirtual

Gets destination name: output file name or device description.

Implements Aspose::TeX::Presentation::Device.

◆ get_Fill()

ASPOSE_TEX_SHARED_API System::SharedPtr<System::Drawing::Brush> Aspose::TeX::Presentation::Xps::XpsDevice::get_Fill ( )
overridevirtual

Gets/sets the current fill.

Reimplemented from Aspose::TeX::Presentation::Device.

◆ get_FillOpacity()

ASPOSE_TEX_SHARED_API float Aspose::TeX::Presentation::Xps::XpsDevice::get_FillOpacity ( )
overridevirtual

Gets/sets the current fill opacity.

Reimplemented from Aspose::TeX::Presentation::Device.

◆ get_IsReady()

ASPOSE_TEX_SHARED_API bool Aspose::TeX::Presentation::Xps::XpsDevice::get_IsReady ( )
overridevirtual

Shows if device is ready for output.

Implements Aspose::TeX::Presentation::Device.

◆ get_PageCount()

ASPOSE_TEX_SHARED_API int32_t Aspose::TeX::Presentation::Xps::XpsDevice::get_PageCount ( )
overridevirtual

Gets the number of pages.

Implements Aspose::TeX::Presentation::Device.

◆ get_Stroke()

ASPOSE_TEX_SHARED_API System::SharedPtr<System::Drawing::Pen> Aspose::TeX::Presentation::Xps::XpsDevice::get_Stroke ( )
overridevirtual

Gets/sets the current stroke.

Reimplemented from Aspose::TeX::Presentation::Device.

◆ get_StrokeOpacity()

ASPOSE_TEX_SHARED_API float Aspose::TeX::Presentation::Xps::XpsDevice::get_StrokeOpacity ( )
overridevirtual

Gets/sets the current stroke opacity.

Reimplemented from Aspose::TeX::Presentation::Device.

◆ Initialize()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::Initialize ( )
overridevirtual

Initializes the device.

Implements Aspose::TeX::Presentation::Device.

◆ MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION()

ASPOSE_TEX_SHARED_API Aspose::TeX::Presentation::Xps::XpsDevice::MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION ( XpsDevice  ,
CODEPORTING_ARGS(System::SharedPtr< XpsDevice > device)   
)
protected

◆ set_Fill()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::set_Fill ( System::SharedPtr< System::Drawing::Brush value)
overridevirtual

Gets/sets the current fill.

Reimplemented from Aspose::TeX::Presentation::Device.

◆ set_FillOpacity()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::set_FillOpacity ( float  value)
overridevirtual

Gets/sets the current fill opacity.

Reimplemented from Aspose::TeX::Presentation::Device.

◆ set_Stroke()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::set_Stroke ( System::SharedPtr< System::Drawing::Pen value)
overridevirtual

Gets/sets the current stroke.

Reimplemented from Aspose::TeX::Presentation::Device.

◆ set_StrokeOpacity()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::set_StrokeOpacity ( float  value)
overridevirtual

Gets/sets the current stroke opacity.

Reimplemented from Aspose::TeX::Presentation::Device.

◆ SetClip()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::SetClip ( System::SharedPtr< System::Drawing::Drawing2D::GraphicsPath path)
overridevirtual

Sets the current clip path.

Parameters
pathA clip path.

Implements Aspose::TeX::Presentation::Device.

◆ SetTransform()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::SetTransform ( System::SharedPtr< System::Drawing::Drawing2D::Matrix matrix)
overridevirtual

Sets the current coordinate space transformation.

Parameters
matrixA transformation matrix.

Implements Aspose::TeX::Presentation::Device.

◆ ShowImage() [1/2]

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::ShowImage ( System::Drawing::PointF  origin,
System::Drawing::SizeF  size,
System::ArrayPtr< uint8_t >  imageData 
)
overridevirtual

Shows a raster image.

Parameters
originThe bottom-left corner of the shown image.
sizeThe size of the shown image.
imageDataThe image data.

Implements Aspose::TeX::Presentation::Device.

◆ ShowImage() [2/2]

void Aspose::TeX::Presentation::Xps::XpsDevice::ShowImage ( System::Drawing::PointF  origin,
System::Drawing::SizeF  size,
System::ArrayPtr< uint8_t >  imageData,
System::Drawing::RectangleF  cropBox 
)
protected

Shows a raster image.

Parameters
originThe bottom-left corner of the shown image.
sizeThe size of the shown image.
imageDataThe image data.
cropBoxThe crop box.

◆ ShowPage()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::ShowPage ( System::Drawing::PointF  origin,
System::Drawing::SizeF  size,
System::String  hash,
System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Aspose::Rendering::ApsPage >>>  pages,
int32_t  page 
)
overrideprotectedvirtual

//

// Shows a raster image. //

//

Parameters
originThe bottom-left corner of the shown image.

//

Parameters
sizeThe size of the shown image.

//

Parameters
imageDataThe image data.

//

Parameters
cropBoxThe crop box.

Reimplemented from Aspose::TeX::Presentation::Device.

◆ StartDocument()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::StartDocument ( )
overridevirtual

Starts the whole document.

Implements Aspose::TeX::Presentation::Device.

◆ StartFragment()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::StartFragment ( )
overridevirtual

Starts a fragment to rasterize.

Implements Aspose::TeX::Presentation::IFragmentRasterizer.

◆ StartPage()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Xps::XpsDevice::StartPage ( float  width,
float  height 
)
overridevirtual

Starts a new page.

Parameters
widthThe page width.
heightThe page height.

Implements Aspose::TeX::Presentation::Device.