CMTextFormatDescriptionGetDefaultTextBox(_:originIsAtTopLeft:heightOfTextTrack:defaultTextBoxOut:)
Returns the default text box.
Declaration
func CMTextFormatDescriptionGetDefaultTextBox(_ desc: CMFormatDescription, originIsAtTopLeft: Bool, heightOfTextTrack: CGFloat, defaultTextBoxOut: UnsafeMutablePointer<CGRect>) -> OSStatusParameters
- desc:
FormatDescription being interrogated.
- originIsAtTopLeft:
Pass true if the
CGRectwill 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
CGRectwill 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
originIsAtTopLeftis 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 iforiginIsAtTopLeftis true. - defaultTextBoxOut:
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
Working with Text Descriptions
CMTextDescriptionFlavorCMTextFormatDescriptionGetDefaultStyle(_:localFontIDOut:boldOut:italicOut:underlineOut:fontSizeOut:colorComponentsOut:)CMTextFormatDescriptionGetDisplayFlags(_:displayFlagsOut:)CMTextFormatDescriptionGetFontName(_:localFontID:fontNameOut:)CMTextFormatDescriptionGetJustification(_:horizontalOut:verticalOut:)CMTextFormatDescriptionCopyAsBigEndianTextDescriptionBlockBuffer(allocator:textFormatDescription:flavor:blockBufferOut:)CMTextFormatDescriptionCreateFromBigEndianTextDescriptionBlockBuffer(allocator:bigEndianTextDescriptionBlockBuffer:flavor:mediaType:formatDescriptionOut:)CMTextFormatDescriptionCreateFromBigEndianTextDescriptionData(allocator:bigEndianTextDescriptionData:size:flavor:mediaType:formatDescriptionOut:)CMSwapBigEndianTextDescriptionToHost(_:_:)CMSwapHostEndianTextDescriptionToBig(_:_:)