Aspose::Font::Renderers::RenderingUtils Class Reference

Provides utility methods for rendering. More...

Public Types

enum  LineSpacingType { LineSpacingType::Pixels, LineSpacingType::PercentOfFontHeight }
 Line Spacing Type. Number of pixels or percent of font height More...
 

Public Member Functions

 RenderingUtils ()=delete
 

Static Public Member Functions

static ASPOSE_FONT_SHARED_API System::SharedPtr< System::IO::StreamDrawText (System::SharedPtr< Aspose::Font::Font > font, System::String text, double fontSize)
 Rendering text in BitMap. Return result in PNG-format as stream of bytes More...
 
static ASPOSE_FONT_SHARED_API System::SharedPtr< System::IO::StreamDrawText (System::SharedPtr< Aspose::Font::Font > font, System::String text, double fontSize, RenderingUtils::LineSpacingType lineSpacingType, int32_t lineSpacingValue, int32_t maxWidth)
 Rendering text in BitMap. Return result in PNG-format as stream of bytes More...
 
static ASPOSE_FONT_SHARED_API System::SharedPtr< System::IO::StreamDrawText (System::SharedPtr< Aspose::Font::Font > font, System::ArrayPtr< System::SharedPtr< Aspose::Font::Glyphs::GlyphId >> glyphIds, double fontSize)
 Rendering text in BitMap. Return result in PNG-format as stream of bytes More...
 
static ASPOSE_FONT_SHARED_API System::SharedPtr< System::IO::StreamDrawText (System::SharedPtr< Aspose::Font::Font > font, System::ArrayPtr< System::SharedPtr< Aspose::Font::Glyphs::GlyphId >> glyphIds, double fontSize, RenderingUtils::LineSpacingType lineSpacingType, int32_t lineSpacingValue, int32_t maxWidth)
 Rendering text in BitMap. Return result in PNG-format as stream of bytes More...
 

Detailed Description

Provides utility methods for rendering.

Member Enumeration Documentation

◆ LineSpacingType

Line Spacing Type. Number of pixels or percent of font height

Enumerator
Pixels 

Value of line spacing is set in pixels

PercentOfFontHeight 

Value of line spacing is set in percent of font height

Constructor & Destructor Documentation

◆ RenderingUtils()

Aspose::Font::Renderers::RenderingUtils::RenderingUtils ( )
delete

Member Function Documentation

◆ DrawText() [1/4]

static ASPOSE_FONT_SHARED_API System::SharedPtr<System::IO::Stream> Aspose::Font::Renderers::RenderingUtils::DrawText ( System::SharedPtr< Aspose::Font::Font font,
System::String  text,
double  fontSize 
)
static

Rendering text in BitMap. Return result in PNG-format as stream of bytes

Parameters
fontFont
textText
fontSizeFont size
Returns
Image in PNG format as stream of bytes

◆ DrawText() [2/4]

static ASPOSE_FONT_SHARED_API System::SharedPtr<System::IO::Stream> Aspose::Font::Renderers::RenderingUtils::DrawText ( System::SharedPtr< Aspose::Font::Font font,
System::String  text,
double  fontSize,
RenderingUtils::LineSpacingType  lineSpacingType,
int32_t  lineSpacingValue,
int32_t  maxWidth 
)
static

Rendering text in BitMap. Return result in PNG-format as stream of bytes

Parameters
fontFont
textText
fontSizeFont size
lineSpacingTypeType of line spacing. Number of pixels or percent of font height
lineSpacingValueValue of line spacing
maxWidthMax width in pixels for image
Returns
Image in PNG format as stream of bytes

◆ DrawText() [3/4]

static ASPOSE_FONT_SHARED_API System::SharedPtr<System::IO::Stream> Aspose::Font::Renderers::RenderingUtils::DrawText ( System::SharedPtr< Aspose::Font::Font font,
System::ArrayPtr< System::SharedPtr< Aspose::Font::Glyphs::GlyphId >>  glyphIds,
double  fontSize 
)
static

Rendering text in BitMap. Return result in PNG-format as stream of bytes

Parameters
fontFont
glyphIdsText represented as array of glyph identifiers
fontSizeFont size
Returns
Image in PNG format as stream of bytes

◆ DrawText() [4/4]

static ASPOSE_FONT_SHARED_API System::SharedPtr<System::IO::Stream> Aspose::Font::Renderers::RenderingUtils::DrawText ( System::SharedPtr< Aspose::Font::Font font,
System::ArrayPtr< System::SharedPtr< Aspose::Font::Glyphs::GlyphId >>  glyphIds,
double  fontSize,
RenderingUtils::LineSpacingType  lineSpacingType,
int32_t  lineSpacingValue,
int32_t  maxWidth 
)
static

Rendering text in BitMap. Return result in PNG-format as stream of bytes

Parameters
fontFont
glyphIdsText represented as array of glyph identifiers
fontSizeFont size
lineSpacingTypeType of line spacing. Number of pixels or percent of font height
lineSpacingValueValue of line spacing
maxWidthMax width in pixels for image
Returns
Image in PNG format as stream of bytes