drawSurface method

bool drawSurface(
  1. int x,
  2. int y,
  3. Pointer<SdlSurface> surface
)

Draw text to an SDL surface.

text must have been created using a TTF_TextEngine from TTF_CreateSurfaceTextEngine().

\param text the text to draw. \param x the x coordinate in pixels, positive from the left edge towards the right. \param y the y coordinate in pixels, positive from the top edge towards the bottom. \param surface the surface to draw on. \returns true on success or false on failure; call SDL_GetError() for more information.

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

\since This function is available since SDL_ttf 3.0.0.

\sa TTF_CreateSurfaceTextEngine \sa TTF_CreateText

extern SDL_DECLSPEC bool SDLCALL TTF_DrawSurfaceText(TTF_Text *text, int x, int y, SDL_Surface *surface)

Implementation

bool drawSurface(int x, int y, Pointer<SdlSurface> surface) =>
    ttfDrawSurfaceText(this, x, y, surface);