ttfGetTextDirection function ttf

int ttfGetTextDirection(
  1. Pointer<TtfText> text
)

Get the direction to be used for text shaping a text object.

This defaults to the direction of the font used by the text object.

\param text the text to query. \returns the direction to be used for text shaping.

\threadsafety This function should be called on the thread that created the text.

\since This function is available since SDL_ttf 3.0.0.

extern SDL_DECLSPEC TTF_Direction SDLCALL TTF_GetTextDirection(TTF_Text *text)

Implementation

int ttfGetTextDirection(Pointer<TtfText> text) {
  final ttfGetTextDirectionLookupFunction = _libTtf
      .lookupFunction<
        Int32 Function(Pointer<TtfText> text),
        int Function(Pointer<TtfText> text)
      >('TTF_GetTextDirection');
  return ttfGetTextDirectionLookupFunction(text);
}