Function

CMTextFormatDescriptionGetDefaultTextBox

Returns the default text box.

Declaration

OSStatus CMTextFormatDescriptionGetDefaultTextBox(CMFormatDescriptionRef desc, Boolean originIsAtTopLeft, CGFloat heightOfTextTrack, CGRect *defaultTextBoxOut);

Parameters

desc

FormatDescription being interrogated.

originIsAtTopLeft

Pass true if the CGRect will be used in an environment where (0,0) is at the top-left corner of an enclosing rectangle and y coordinates increase as you go down.

Pass false if the CGRect will be used in an environment where (0,0) is at the bottom-left corner of an enclosing rectangle and y coordinates increase as you go up.

heightOfTextTrack

If originIsAtTopLeft is false, pass the height of the enclosing text track or destination. This value will be used to properly compute the default text box for the given origin. Ignored if originIsAtTopLeft is true.

outDefaultTextBox

On output, receives the default text box.

Return Value

A result code. Returns noErr if successful.

Discussion

Within a text track, text is rendered within a text box. There is a default text box set, which can be over-ridden by a sample.

See Also

Text-Specific Functions

CMTextFormatDescriptionGetDefaultStyle

Returns the default style.

CMTextFormatDescriptionGetDisplayFlags

Returns the displayFlags.

CMTextFormatDescriptionGetFontName

Returns the font name for a local font ID.

CMTextFormatDescriptionGetJustification

Returns horizontal and vertical justification.

CMTextFormatDescriptionCopyAsBigEndianTextDescriptionBlockBuffer

Copies the contents of a CMTextFormatDescription to a CMBlockBuffer in big-endian byte ordering.

CMTextFormatDescriptionCreateFromBigEndianTextDescriptionBlockBuffer

Creates a CMTextFormatDescription from a big-endian TextDescription data structure in a CMBlockBuffer.

CMTextFormatDescriptionCreateFromBigEndianTextDescriptionData

Creates a CMTextFormatDescription from a big-endian TextDescription data structure.

CMSwapBigEndianTextDescriptionToHost

Converts a TextDescription data structure from big-endian to host-endian in place.

CMSwapHostEndianTextDescriptionToBig

Converts a TextDescription data structure from host-endian to big-endian in place.