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 videoHeight)
 
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...
 
TextAnchorPoint anchorPoint
 The anchor point of the text box. Defaults to CENTER. More...
 
TextHorizontalAlignment horizontalAlignment
 The horizontal alignment of the text within the box. Defaults to ALIGN_CENTER. More...
 
TextVerticalAlignment verticalAlignment
 The vertical alignment of the text within the box. Defaults to TextVerticalAlignment::Top. More...
 
float textWidth
 The width of the text box. Defaults to -1, which indicates 'use full video width'. More...
 
float textHeight
 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 lifetime
 An indication of when the cue should be removed. More...
 
uint64_t expirationTimeMs
 The time at which the cue should be removed, in video time. If 0, the cue remains until removed by the condition indicated in timingMode. More...
 

Constructor & Destructor Documentation

◆ Cue()

IYIClosedCaptionsRenderer::Cue::Cue ( )

Member Function Documentation

◆ GenerateTextSceneNodeStyles()

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.

◆ GetText()

CYIString IYIClosedCaptionsRenderer::Cue::GetText ( ) const

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

◆ RestyleCue()

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

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

Member Data Documentation

◆ anchorPoint

TextAnchorPoint IYIClosedCaptionsRenderer::Cue::anchorPoint

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

◆ expirationTimeMs

uint64_t IYIClosedCaptionsRenderer::Cue::expirationTimeMs

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

◆ horizontalAlignment

TextHorizontalAlignment IYIClosedCaptionsRenderer::Cue::horizontalAlignment

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

◆ lifetime

Lifetime IYIClosedCaptionsRenderer::Cue::lifetime

An indication of when the cue should be removed.

◆ position

glm::vec2 IYIClosedCaptionsRenderer::Cue::position

The position within the video frame. In pixels.

◆ spans

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

The spans of text.

◆ textHeight

float IYIClosedCaptionsRenderer::Cue::textHeight

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.

◆ textWidth

float IYIClosedCaptionsRenderer::Cue::textWidth

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

◆ verticalAlignment

TextVerticalAlignment IYIClosedCaptionsRenderer::Cue::verticalAlignment

The vertical alignment of the text within the box. Defaults to TextVerticalAlignment::Top.

◆ windowColor

CYIColor IYIClosedCaptionsRenderer::Cue::windowColor

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


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