Aspose::TeX::Presentation::Image::ImageDevice Class Reference

Implements the interface for outputting text and graphic content to image(s). More...

Inherits Aspose::TeX::Presentation::Device, and Aspose::TeX::Presentation::IPageCropper.

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::ArrayPtr< System::ArrayPtr< uint8_t > > get_Result ()
 Returns the resulting images byte arrays. The first dimension is for inner documents and the second one is for pages within inner documents. 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 ImageDevice (bool whiteBackground=true)
 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 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 composing context to the level higher then this device's graphics state. 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 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...
 
- 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 ImageDevice (System::SharedPtr< ImageDevice > device)
 Clone constructor. Initializes this device with another device. More...
 
ASPOSE_TEX_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION (ImageDevice, CODEPORTING_ARGS(System::SharedPtr< ImageDevice > 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 ~ImageDevice ()
 
- 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 image(s).

Constructor & Destructor Documentation

◆ ImageDevice() [1/2]

ASPOSE_TEX_SHARED_API Aspose::TeX::Presentation::Image::ImageDevice::ImageDevice ( bool  whiteBackground = true)

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

Parameters
whiteBackgroundIf true then fills white background on every page.

◆ ImageDevice() [2/2]

ASPOSE_TEX_SHARED_API Aspose::TeX::Presentation::Image::ImageDevice::ImageDevice ( System::SharedPtr< ImageDevice device)
protected

Clone constructor. Initializes this device with another device.

Parameters
deviceThe device to clone.

◆ ~ImageDevice()

virtual ASPOSE_TEX_SHARED_API Aspose::TeX::Presentation::Image::ImageDevice::~ImageDevice ( )
protectedvirtual

Member Function Documentation

◆ AddHyperlink()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Image::ImageDevice::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::Image::ImageDevice::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::Image::ImageDevice::Dispose ( )
overridevirtual

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

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

◆ DrawPath()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Image::ImageDevice::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::Image::ImageDevice::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::Image::ImageDevice::EndDocument ( )
overridevirtual

Finalizes the whole document.

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

◆ EndPage()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Image::ImageDevice::EndPage ( )
overridevirtual

Finalizes a page.

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

◆ EndPageInternal()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Image::ImageDevice::EndPageInternal ( System::String  evalMark)
overrideprotectedvirtual

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

◆ FillPath()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Image::ImageDevice::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::Image::ImageDevice::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::Image::ImageDevice::get_Fill ( )
overridevirtual

Gets/sets the current fill.

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

◆ get_FillOpacity()

ASPOSE_TEX_SHARED_API float Aspose::TeX::Presentation::Image::ImageDevice::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::Image::ImageDevice::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::Image::ImageDevice::get_PageCount ( )
overridevirtual

Gets the number of pages.

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

◆ get_Result()

ASPOSE_TEX_SHARED_API System::ArrayPtr<System::ArrayPtr<uint8_t> > Aspose::TeX::Presentation::Image::ImageDevice::get_Result ( )

Returns the resulting images byte arrays. The first dimension is for inner documents and the second one is for pages within inner documents.

◆ get_Stroke()

ASPOSE_TEX_SHARED_API System::SharedPtr<System::Drawing::Pen> Aspose::TeX::Presentation::Image::ImageDevice::get_Stroke ( )
overridevirtual

Gets/sets the current stroke.

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

◆ get_StrokeOpacity()

ASPOSE_TEX_SHARED_API float Aspose::TeX::Presentation::Image::ImageDevice::get_StrokeOpacity ( )
overridevirtual

Gets/sets the current stroke opacity.

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

◆ Initialize()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Image::ImageDevice::Initialize ( )
overridevirtual

Initializes the device.

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

◆ MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION()

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

◆ set_Fill()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Image::ImageDevice::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::Image::ImageDevice::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::Image::ImageDevice::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::Image::ImageDevice::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::Image::ImageDevice::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::Image::ImageDevice::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::Image::ImageDevice::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::Image::ImageDevice::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::Image::ImageDevice::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::Image::ImageDevice::StartDocument ( )
overridevirtual

Starts the whole document.

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

◆ StartPage()

ASPOSE_TEX_SHARED_API void Aspose::TeX::Presentation::Image::ImageDevice::StartPage ( float  width,
float  height 
)
overridevirtual

Starts a new page.

Parameters
widthThe page width.
heightThe page height.

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