You.i Engine
IYIClosedCaptionsRenderer::Cue Struct Reference

Detailed Description

A struct containing information about a cue. This information can be used to render that cue in the renderer implementation.

#include <player/YiClosedCaptionsRenderer.h>

Public Member Functions

 Cue ()
 
CYIString GetText () const
 
void RestyleCue (const CYIClosedCaptionsStylingBridge::Style &userStyle, float fVideoHeight)
 
std::vector< CYITextSceneNode::YI_TEXT_STYLE_DEFGenerateTextSceneNodeStyles () const
 

Public Attributes

std::vector< Spanspans
 The spans of text. More...
 
CYIColor windowColor
 The window background color. Defaults to 50% transparent black. More...
 
glm::vec2 position
 The position within the video frame. In pixels. More...
 
TEXT_ANCHOR_POINT eAnchorPoint
 The anchor point of the text box. Defaults to CENTER. More...
 
TEXT_HORIZONTAL_ALIGNMENT eHorizontalAlignment
 The horizontal alignment of the text within the box. Defaults to ALIGN_CENTER. More...
 
TEXT_VERTICAL_ALIGNMENT eVerticalAlignment
 The vertical alignment of the text within the box. Defaults to ALIGN_VERTICALLY_TOP. More...
 
float fTextWidth
 The width of the text box. Defaults to -1, which indicates 'use full video width'. More...
 
float fTextHeight
 The height of the text box. Defaults to 0. This is used for positionning only – the height of the text box used for layout is equal to the video height. More...
 
LIFETIME eLifetime
 An indication of when the cue should be removed. More...
 
uint64_t uExpirationTimeMs
 The time at which the cue should be removed, in video time. If 0, the cue remains until removed by the condition indicated in eTimingMode. More...
 

Constructor & Destructor Documentation

IYIClosedCaptionsRenderer::Cue::Cue ( )

Member Function Documentation

std::vector<CYITextSceneNode::YI_TEXT_STYLE_DEF> IYIClosedCaptionsRenderer::Cue::GenerateTextSceneNodeStyles ( ) const

Generates a vector of text styles from the list of spans contained in this cue. This styles list can be used by instances of CYITextSceneNode.

CYIString IYIClosedCaptionsRenderer::Cue::GetText ( ) const

Builds and returns a single string composed of the text from the spans contained in this cue.

void IYIClosedCaptionsRenderer::Cue::RestyleCue ( const CYIClosedCaptionsStylingBridge::Style userStyle,
float  fVideoHeight 
)

Re-styles this cue using the provided style information. Has no effect if the style's mode is anything other than CYIClosedCaptionsStylingBridge::USE_STYLE_FROM_USER.

Member Data Documentation

TEXT_ANCHOR_POINT IYIClosedCaptionsRenderer::Cue::eAnchorPoint

The anchor point of the text box. Defaults to CENTER.

TEXT_HORIZONTAL_ALIGNMENT IYIClosedCaptionsRenderer::Cue::eHorizontalAlignment

The horizontal alignment of the text within the box. Defaults to ALIGN_CENTER.

LIFETIME IYIClosedCaptionsRenderer::Cue::eLifetime

An indication of when the cue should be removed.

TEXT_VERTICAL_ALIGNMENT IYIClosedCaptionsRenderer::Cue::eVerticalAlignment

The vertical alignment of the text within the box. Defaults to ALIGN_VERTICALLY_TOP.

float IYIClosedCaptionsRenderer::Cue::fTextHeight

The height of the text box. Defaults to 0. This is used for positionning only – the height of the text box used for layout is equal to the video height.

float IYIClosedCaptionsRenderer::Cue::fTextWidth

The width of the text box. Defaults to -1, which indicates 'use full video width'.

glm::vec2 IYIClosedCaptionsRenderer::Cue::position

The position within the video frame. In pixels.

std::vector<Span> IYIClosedCaptionsRenderer::Cue::spans

The spans of text.

uint64_t IYIClosedCaptionsRenderer::Cue::uExpirationTimeMs

The time at which the cue should be removed, in video time. If 0, the cue remains until removed by the condition indicated in eTimingMode.

CYIColor IYIClosedCaptionsRenderer::Cue::windowColor

The window background color. Defaults to 50% transparent black.


The documentation for this struct was generated from the following file: