#include <ntv2captionrenderer.h>
|
static CNTV2CaptionRendererPtr | GetRenderer (const NTV2FormatDesc &inFBDescriptor, const bool inAutoOpen=true) |
| Returns the CNTV2CaptionRenderer instance using the given video frame buffer format descriptor, creating the cache if necessary. More...
|
|
static bool | FlushGlyphCaches (void) |
| Flushes all extant glyph caches. More...
|
|
static bool | BurnChar (const UByte inCharCode, const NTV2Line21Attrs &inAttribs, NTV2Buffer &inFB, const NTV2FormatDesc &inFD, const UWord inXPos, const UWord inYPos) |
| Blits the given 608/ASCII-ish character into a specified position in the given host buffer using the given attributes. More...
|
|
static bool | BurnString (const std::string &inString, const NTV2Line21Attrs &inAttribs, NTV2Buffer &inFB, const NTV2FormatDesc &inFBDescriptor, const UWord inRowNum=15, const UWord inColumnNum=1) |
| Blits the contents of the given UTF-8 encoded string into the given host buffer using the given display attributes and starting position, overwriting any existing "on-air" captions. More...
|
|
static bool | BurnStringAtXY (const std::string &inString, const NTV2Line21Attrs &inAttribs, NTV2Buffer &inFB, const NTV2FormatDesc &inFBDescriptor, const UWord inXPos, const UWord inYPos) |
| Blits the contents of the given UTF-8 encoded string into the given host buffer using the given display attributes and starting position. More...
|
|
Definition at line 31 of file ntv2captionrenderer.h.
◆ ~CNTV2CaptionRenderer()
virtual CNTV2CaptionRenderer::~CNTV2CaptionRenderer |
( |
| ) |
|
|
virtual |
◆ BurnChar()
Blits the given 608/ASCII-ish character into a specified position in the given host buffer using the given attributes.
- Parameters
-
[in] | inCharCode | Specifies the character code to be blitted. |
[in] | inAttribs | Specifies the desired display attributes (FG color, BG color, italics, etc.). |
| inFB | Specifies the host frame buffer to be blitted into. |
[in] | inFD | Describes the host frame buffer raster and pixel format. |
[in] | inXPos | Specifies the horizontal raster offset to the left edge of the character to be blitted, in pixels. |
[in] | inYPos | Specifies the vertical raster offset to the top edge of the character to be blitted, in lines. |
- Returns
- True if successful; otherwise false.
◆ BurnString()
Blits the contents of the given UTF-8 encoded string into the given host buffer using the given display attributes and starting position, overwriting any existing "on-air" captions.
- Parameters
-
[in] | inString | Specifies the UTF-8 encoded string to be blitted into the video buffer. Unicode codepoints that aren't supported by the caption font in use will be rendered as a "full block". |
[in] | inAttribs | Specifies the display attributes of the rendered characters. |
| inFB | Specifies the host frame buffer to be blitted into. |
[in] | inFBDescriptor | Describes the host frame buffer raster and pixel format. |
[in] | inRowNum | Specifies the row number at which character rendering will begin. The value will be clamped such that it is between 1 and 15 (inclusive). Defaults to 15, the bottom-most row position. |
[in] | inColumnNum | Specifies the column number at which character rendering will begin. The value will be clamped such that it is between 1 and 32 (inclusive). Defaults to 1, the left-most column position. |
- Returns
- True if successful; otherwise False.
- Note
- Wrapping and scrolling is not performed. If the string's length exceeds the rightmost screen column, the rightmost character position will continue to be overwritten until the last character from the string remains there.
◆ BurnStringAtXY()
Blits the contents of the given UTF-8 encoded string into the given host buffer using the given display attributes and starting position.
- Parameters
-
[in] | inString | Specifies the UTF-8 encoded string to be blitted into the host buffer. Unicode codepoints that aren't supported by the caption font in use will be rendered as a "full block". |
[in] | inAttribs | Specifies the display attributes of the rendered characters. |
| inFB | Specifies the host frame buffer to be blitted into. |
[in] | inFBDescriptor | Describes the host frame buffer raster and pixel format. |
[in] | inXPos | Specifies the horizontal pixel offset at which character blitting will begin. |
[in] | inYPos | Specifies the vertical pixel offset at which character blitting will begin. |
- Returns
- True if successful; otherwise False.
- Note
- Wrapping and scrolling is not performed. Anything past the raster's right-hand and/or bottom edge(s) will be clipped.
◆ Close()
virtual bool CNTV2CaptionRenderer::Close |
( |
void |
| ) |
|
|
virtual |
Closes me, releasing my resources. Once closed, I can no longer be used to render characters.
- Returns
- True if successful; otherwise false.
- Note
- It is not an error to call this function when I'm already closed.
◆ FlushGlyphCaches()
static bool CNTV2CaptionRenderer::FlushGlyphCaches |
( |
void |
| ) |
|
|
static |
Flushes all extant glyph caches.
◆ GetActivePreloadedGlyphsRastersAttributes()
virtual ULWordSequence CNTV2CaptionRenderer::GetActivePreloadedGlyphsRastersAttributes |
( |
void |
| ) |
const |
|
virtual |
◆ GetCharacterRasterOrigin()
virtual bool CNTV2CaptionRenderer::GetCharacterRasterOrigin |
( |
const UWord |
in608CaptionRow, |
|
|
const UWord |
in608CaptionCol, |
|
|
UWord & |
outVertLineOffset, |
|
|
UWord & |
outHorzPixelOffset |
|
) |
| const |
|
virtual |
Returns the raster position of the top-left corner of a given CEA-608 caption row and column.
- Parameters
-
[in] | in608CaptionRow | Specifies the CEA-608 caption row, which must be between 1 and 15. |
[in] | in608CaptionCol | Specifies the CEA-608 caption column, which must be between 1 and 32. |
[out] | outVertLineOffset | Receives the raster line offset from the top raster edge that corresponds to the top edge of the given caption row. Receives zero if the function fails. |
[out] | outHorzPixelOffset | Receives the raster pixel offset from the left raster edge that corresponds to the left edge of the given caption column. Receives zero if the function fails. |
- Returns
- True if successful; otherwise false.
◆ GetFormatDescriptor()
- Returns
- A format descriptor of the glyphs bitmap raster.
◆ GetGlyphHeightInLines()
virtual UWord CNTV2CaptionRenderer::GetGlyphHeightInLines |
( |
void |
| ) |
const |
|
inlinevirtual |
◆ GetGlyphsRaster()
Returns a copy of the glyphs bitmap raster pixel data for the given attribute.
- Parameters
-
[out] | outBuffer | Receives the copy of the glyphs bitmap raster pixel data. |
[in] | inAttrs | Specifies the desired character display attributes. |
- Returns
- True if successful; otherwise false upon failure.
◆ GetGlyphWidthInBytes()
virtual UWord CNTV2CaptionRenderer::GetGlyphWidthInBytes |
( |
void |
| ) |
const |
|
inlinevirtual |
◆ GetGlyphWidthInPixels()
virtual UWord CNTV2CaptionRenderer::GetGlyphWidthInPixels |
( |
void |
| ) |
const |
|
inlinevirtual |
◆ GetNumActivePreloadedGlyphsRasters()
virtual ULWord CNTV2CaptionRenderer::GetNumActivePreloadedGlyphsRasters |
( |
void |
| ) |
const |
|
inlinevirtual |
◆ GetPixelFormat()
virtual NTV2PixelFormat CNTV2CaptionRenderer::GetPixelFormat |
( |
void |
| ) |
const |
|
inlinevirtual |
Returns the frame buffer format that I'm currently "open" for.
- Returns
- The frame buffer format that I'm currently "open" for.
Definition at line 142 of file ntv2captionrenderer.h.
◆ GetPreloadedGlyphsRasterAddress()
virtual const UByte* CNTV2CaptionRenderer::GetPreloadedGlyphsRasterAddress |
( |
const NTV2Line21Attrs & |
inAttrs | ) |
const |
|
virtual |
Returns a const pointer to the raster that contains the preloaded glyph renderings for the given attribute.
- Parameters
-
[in] | inAttrs | Specifies the desired display attributes. |
- Returns
- A valid, non-NULL const pointer to the specified glyph family's raster image; or NULL if failed.
- Note
- This can be a time-consuming function call, as it causes all CCFont glyphs to be rendered with the given attributes for my current pixel format and frame dimensions.
◆ GetPreloadedGlyphsRasterHeightInLines()
virtual UWord CNTV2CaptionRenderer::GetPreloadedGlyphsRasterHeightInLines |
( |
void |
| ) |
const |
|
inlinevirtual |
- Returns
- The height, in lines, of the raster that contains the preloaded glyph renderings.
Definition at line 216 of file ntv2captionrenderer.h.
◆ GetPreloadedGlyphsRasterRowBytes()
virtual ULWord CNTV2CaptionRenderer::GetPreloadedGlyphsRasterRowBytes |
( |
void |
| ) |
const |
|
inlinevirtual |
- Returns
- The number of bytes per row in the raster that contains the preloaded glyph renderings.
Definition at line 211 of file ntv2captionrenderer.h.
◆ GetPreloadedGlyphsRasterWidthInPixels()
virtual UWord CNTV2CaptionRenderer::GetPreloadedGlyphsRasterWidthInPixels |
( |
void |
| ) |
const |
|
inlinevirtual |
- Returns
- The width, in pixels, of the raster that contains the preloaded glyph renderings.
Definition at line 221 of file ntv2captionrenderer.h.
◆ GetRenderer()
Returns the CNTV2CaptionRenderer instance using the given video frame buffer format descriptor, creating the cache if necessary.
- Parameters
-
[in] | inFBDescriptor | Describes the video frame buffer. |
[in] | inAutoOpen | If true, and the cache needed to be created, it's automatically opened. |
- Returns
- The cache instance.
◆ GetTotalBytes()
virtual ULWord CNTV2CaptionRenderer::GetTotalBytes |
( |
void |
| ) |
const |
|
inlinevirtual |
- Returns
- The total memory consumed by my preloaded glyph renderings, in bytes.
Definition at line 226 of file ntv2captionrenderer.h.
◆ GlyphDotHeightToRasterLines()
virtual UWord CNTV2CaptionRenderer::GlyphDotHeightToRasterLines |
( |
const UWord |
inVHeightInGlyphDots | ) |
const |
|
inlinevirtual |
Returns the equivalent number of horizontal raster pixels that correspond to the given number of glyph dots.
- Parameters
-
[in] | inVHeightInGlyphDots | Specifies the height to be scaled, in glyph dots. |
- Returns
- The number of horizontal raster pixels that are equivalent to the given number of glyph dots.
Definition at line 164 of file ntv2captionrenderer.h.
◆ GlyphDotWidthToRasterPixels()
virtual UWord CNTV2CaptionRenderer::GlyphDotWidthToRasterPixels |
( |
const UWord |
inHWidthInGlyphDots | ) |
const |
|
inlinevirtual |
Returns the equivalent number of horizontal raster pixels that correspond to the given number of glyph dots.
- Parameters
-
[in] | inHWidthInGlyphDots | Specifies the width to be scaled, in glyph dots. |
- Returns
- The number of horizontal raster pixels that are equivalent to the given number of glyph dots.
Definition at line 171 of file ntv2captionrenderer.h.
◆ IsOpen()
virtual bool CNTV2CaptionRenderer::IsOpen |
( |
void |
| ) |
const |
|
inlinevirtual |
Answers true if I'm currently open.
- Returns
- True if I'm currently open and able to render characters; otherwise false.
Definition at line 136 of file ntv2captionrenderer.h.
◆ Open()
virtual bool CNTV2CaptionRenderer::Open |
( |
void |
| ) |
|
|
virtual |
Opens me, and prepares me using my current pixel format and CC Font settings.
- Returns
- True if successful; otherwise false.
- Note
- Calling this when I'm already open will close and re-open me with the new format.
◆ Print()
virtual std::ostream& CNTV2CaptionRenderer::Print |
( |
std::ostream & |
inOutStream, |
|
|
const bool |
inIncludeActives = false |
|
) |
| const |
|
virtual |
Emits my human-readable representation into the given output stream.
- Parameters
-
[in] | inOutStream | The output stream that is to receive my human-readable representation. |
- Returns
- The output stream that was used.
The documentation for this class was generated from the following file: