Text

Text

Description

Supports the presentation (drawing) of text to screen using loaded Fonts to style the text. Load a different Font for each unique text presentation style (colour and size) you need in your game.

Draw Framerate

Draws the framerate to the screen using a simple font built into SwinGame.

  • Draw Framerate (x, y) [show]

    Draws the framerate to the screen using a simple font built into SwinGame.

    Parameters:
    x : Longint
    y : Longint
    Signatures by Language:
    C/C++: void draw_framerate_with_simple_font(int32_t x, int32_t y);
    C++: void draw_framerate(int32_t x, int32_t y);
    Pascal: procedure DrawFramerate(x: Longint; y: Longint);
  • Draw Framerate (x, y, font) [show]

    Draws the framerate to the screen using the supplied font.

    Parameters:
    x : Longint
    y : Longint
    font : Font
    Signatures by Language:
    C/C++: void draw_framerate(int32_t x, int32_t y, font font);
    Pascal: procedure DrawFramerate(x: Longint; y: Longint; font: Font);
  • Draw Framerate (x, y, name) [show]

    Draws the framerate to the screen using the supplied font.

    Parameters:
    x : Longint
    y : Longint
    name : String
    Signatures by Language:
    C/C++: void draw_framerate_font_named(int32_t x, int32_t y, const char *name);
    C++: void draw_framerate(int32_t x, int32_t y, const char *name);
    Pascal: procedure DrawFramerate(x: Longint; y: Longint; name: String);
  • Draw Framerate (x, y, name, size) [show]

    Draws the framerate to the screen using the supplied font.

    Parameters:
    x : Longint
    y : Longint
    name : String
    size : Longint
    Signatures by Language:
    C/C++: void draw_framerate_font_named_size(int32_t x, int32_t y, const char *name, int32_t size);
    C++: void draw_framerate(int32_t x, int32_t y, const char *name, int32_t size);
    Pascal: procedure DrawFramerate(x: Longint; y: Longint; name: String; size: Longint);

Draw Text

Draws text using a simple bitmap font that is built into SwinGame.

  • Draw Text (theText, textColor, const pt) [show]

    Draws text using a simple bitmap font that is built into SwinGame.

    Parameters:
    theText : String
    textColor : Color
    pt : Point2D
    Signatures by Language:
    C/C++: void draw_simple_text_pt(const char *theText, color textColor, const point2d *pt);
    C/C++: void draw_simple_text_pt_byval(const char *theText, color textColor, const point2d pt);
    C++: void draw_text(const char *theText, color textColor, const point2d &pt);
    Pascal: procedure DrawText(theText: String; textColor: Color; const pt: Point2D);
  • Draw Text (theText, textColor, theFont, const pt) [show]

    Draws the text at the specified point using the color and font indicated.

    This version only draws a single line of text, to draw text that contains line breaks use the DrawTextLines procedure.

    Parameters:
    theText : String
    textColor : Color
    theFont : Font
    pt : Point2D
    Signatures by Language:
    C/C++: void draw_text_at_point(const char *theText, color textColor, font theFont, const point2d *pt);
    C/C++: void draw_text_at_point_byval(const char *theText, color textColor, font theFont, const point2d pt);
    C++: void draw_text(const char *theText, color textColor, font theFont, const point2d &pt);
    Pascal: procedure DrawText(theText: String; textColor: Color; theFont: Font; const pt: Point2D);
  • Draw Text (theText, textColor, x, y) [show]

    Draws text using a simple bitmap font that is built into SwinGame.

    Parameters:
    theText : String
    textColor : Color
    x : Single
    y : Single
    Signatures by Language:
    C/C++: void draw_simple_text(const char *theText, color textColor, float x, float y);
    C++: void draw_text(const char *theText, color textColor, float x, float y);
    Pascal: procedure DrawText(theText: String; textColor: Color; x: Single; y: Single);
  • Draw Text (theText, textColor, name, const pt) [show]

    Draws the text at the specified point using the color and font indicated.

    This version only draws a single line of text, to draw text that contains line breaks use the DrawTextLines procedure.

    Parameters:
    theText : String
    textColor : Color
    name : String
    pt : Point2D
    Signatures by Language:
    C/C++: void draw_text_at_point_with_font_named(const char *theText, color textColor, const char *name, const point2d *pt);
    C/C++: void draw_text_at_point_with_font_named_byval(const char *theText, color textColor, const char *name, const point2d pt);
    C++: void draw_text(const char *theText, color textColor, const char *name, const point2d &pt);
    Pascal: procedure DrawText(theText: String; textColor: Color; name: String; const pt: Point2D);
  • Draw Text (dest, theText, textColor, name, const pt) [show]

    Draws the text onto the bitmap at the specified point using the color and font indicated. Drawing text is a slow operation, and drawing it to a bitmap, then drawing the bitmap to screen is a good idea if the text does not change frequently.

    This version only draws a single line of text, to draw text that contains line breaks use the DrawTextLines procedure.

    Parameters:
    dest : Bitmap
    theText : String
    textColor : Color
    name : String
    pt : Point2D
    Signatures by Language:
    C/C++: void draw_text_on_bitmap_at_point_with_font_named(bitmap dest, const char *theText, color textColor, const char *name, const point2d *pt);
    C/C++: void draw_text_on_bitmap_at_point_with_font_named_byval(bitmap dest, const char *theText, color textColor, const char *name, const point2d pt);
    C++: void draw_text(bitmap dest, const char *theText, color textColor, const char *name, const point2d &pt);
    Pascal: procedure DrawText(dest: Bitmap; theText: String; textColor: Color; name: String; const pt: Point2D);
    • source code
    • lib name: DrawTextOnBitmapAtPointWithFontNamed
  • Draw Text (theText, textColor, theFont, x, y) [show]

    Draws the text at the specified point using the color and font indicated.

    This version only draws a single line of text, to draw text that contains line breaks use the DrawTextLines procedure.

    Parameters:
    theText : String
    textColor : Color
    theFont : Font
    x : Single
    y : Single
    Signatures by Language:
    C/C++: void draw_text(const char *theText, color textColor, font theFont, float x, float y);
    Pascal: procedure DrawText(theText: String; textColor: Color; theFont: Font; x: Single; y: Single);
  • Draw Text (theText, textColor, name, x, y) [show]

    Draws the text at the specified point using the color and font indicated.

    This version only draws a single line of text, to draw text that contains line breaks use the DrawTextLines procedure.

    Parameters:
    theText : String
    textColor : Color
    name : String
    x : Single
    y : Single
    Signatures by Language:
    C/C++: void draw_text_with_font_named(const char *theText, color textColor, const char *name, float x, float y);
    C++: void draw_text(const char *theText, color textColor, const char *name, float x, float y);
    Pascal: procedure DrawText(theText: String; textColor: Color; name: String; x: Single; y: Single);
  • Draw Text (dest, theText, textColor, x, y) [show]

    Draws text using a simple bitmap font that is built into SwinGame.

    Parameters:
    dest : Bitmap
    theText : String
    textColor : Color
    x : Single
    y : Single
    Signatures by Language:
    C/C++: void draw_simple_text_on_bitmap(bitmap dest, const char *theText, color textColor, float x, float y);
    C++: void draw_text(bitmap dest, const char *theText, color textColor, float x, float y);
    Pascal: procedure DrawText(dest: Bitmap; theText: String; textColor: Color; x: Single; y: Single);
  • Draw Text (dest, theText, textColor, theFont, const pt) [show]

    Draws the text onto the bitmap at the specified point using the color and font indicated. Drawing text is a slow operation, and drawing it to a bitmap, then drawing the bitmap to screen is a good idea if the text does not change frequently.

    This version only draws a single line of text, to draw text that contains line breaks use the DrawTextLines procedure.

    Parameters:
    dest : Bitmap
    theText : String
    textColor : Color
    theFont : Font
    pt : Point2D
    Signatures by Language:
    C/C++: void draw_text_on_bitmap_at_point(bitmap dest, const char *theText, color textColor, font theFont, const point2d *pt);
    C/C++: void draw_text_on_bitmap_at_point_byval(bitmap dest, const char *theText, color textColor, font theFont, const point2d pt);
    C++: void draw_text(bitmap dest, const char *theText, color textColor, font theFont, const point2d &pt);
    Pascal: procedure DrawText(dest: Bitmap; theText: String; textColor: Color; theFont: Font; const pt: Point2D);
  • Draw Text (theText, textColor, name, size, const pt) [show]

    This version only draws a single line of text, to draw text that contains line breaks use the DrawTextLines procedure.

    Parameters:
    theText : String
    textColor : Color
    name : String
    size : Longint
    pt : Point2D
    Signatures by Language:
    C/C++: void draw_text_at_point_with_font_named_and_size(const char *theText, color textColor, const char *name, int32_t size, const point2d *pt);
    C/C++: void draw_text_at_point_with_font_named_and_size_byval(const char *theText, color textColor, const char *name, int32_t size, const point2d pt);
    C++: void draw_text(const char *theText, color textColor, const char *name, int32_t size, const point2d &pt);
    Pascal: procedure DrawText(theText: String; textColor: Color; name: String; size: Longint; const pt: Point2D);
    • source code
    • lib name: DrawTextAtPointWithFontNamedAndSize
  • Draw Text (dest, theText, textColor, name, size, const pt) [show]

    Draws the text onto the bitmap at the specified point using the color and font indicated. Drawing text is a slow operation, and drawing it to a bitmap, then drawing the bitmap to screen is a good idea if the text does not change frequently.

    This version only draws a single line of text, to draw text that contains line breaks use the DrawTextLines procedure.

    Parameters:
    dest : Bitmap
    theText : String
    textColor : Color
    name : String
    size : Longint
    pt : Point2D
    Signatures by Language:
    C/C++: void draw_text_on_bitmap_at_point_with_font_named_and_size(bitmap dest, const char *theText, color textColor, const char *name, int32_t size, const point2d *pt);
    C/C++: void draw_text_on_bitmap_at_point_with_font_named_and_size_byval(bitmap dest, const char *theText, color textColor, const char *name, int32_t size, const point2d pt);
    C++: void draw_text(bitmap dest, const char *theText, color textColor, const char *name, int32_t size, const point2d &pt);
    Pascal: procedure DrawText(dest: Bitmap; theText: String; textColor: Color; name: String; size: Longint; const pt: Point2D);
    • source code
    • lib name: DrawTextOnBitmapAtPointWithFontNamedAndSize
  • Draw Text (theText, textColor, name, size, x, y) [show]

    Draws theText at the specified point using the color and font indicated.

    This version only draws a single line of text, to draw text that contains line breaks use the DrawTextLines procedure.

    Parameters:
    theText : String
    textColor : Color
    name : String
    size : Longint
    x : Single
    y : Single
    Signatures by Language:
    C/C++: void draw_text_with_font_named_size(const char *theText, color textColor, const char *name, int32_t size, float x, float y);
    C++: void draw_text(const char *theText, color textColor, const char *name, int32_t size, float x, float y);
    Pascal: procedure DrawText(theText: String; textColor: Color; name: String; size: Longint; x: Single; y: Single);
  • Draw Text (dest, theText, textColor, theFont, x, y) [show]

    Draws the text onto the bitmap at the specified x,y location using the color and font indicated. Drawing text is a slow operation, and drawing it to a bitmap, then drawing the bitmap to screen is a good idea if the text does not change frequently.

    This version only draws a single line of text, to draw text that contains line breaks use the DrawTextLines procedure.

    Parameters:
    dest : Bitmap
    theText : String
    textColor : Color
    theFont : Font
    x : Longint
    y : Longint
    Signatures by Language:
    C/C++: void draw_text_on_bitmap(bitmap dest, const char *theText, color textColor, font theFont, int32_t x, int32_t y);
    C++: void draw_text(bitmap dest, const char *theText, color textColor, font theFont, int32_t x, int32_t y);
    Pascal: procedure DrawText(dest: Bitmap; theText: String; textColor: Color; theFont: Font; x: Longint; y: Longint);
  • Draw Text (dest, theText, textColor, name, x, y) [show]

    Draws the text onto the bitmap at the specified x,y location using the color and font indicated. Drawing text is a slow operation, and drawing it to a bitmap, then drawing the bitmap to screen is a good idea if the text does not change frequently.

    This version only draws a single line of text, to draw text that contains line breaks use the DrawTextLines procedure.

    Parameters:
    dest : Bitmap
    theText : String
    textColor : Color
    name : String
    x : Longint
    y : Longint
    Signatures by Language:
    C/C++: void draw_text_on_bitmap_with_font_named(bitmap dest, const char *theText, color textColor, const char *name, int32_t x, int32_t y);
    C++: void draw_text(bitmap dest, const char *theText, color textColor, const char *name, int32_t x, int32_t y);
    Pascal: procedure DrawText(dest: Bitmap; theText: String; textColor: Color; name: String; x: Longint; y: Longint);
  • Draw Text (dest, theText, textColor, name, size, x, y) [show]

    Draws the text onto the bitmap at the specified x,y location using the color and font indicated. Drawing text is a slow operation, and drawing it to a bitmap, then drawing the bitmap to screen is a good idea if the text does not change frequently.

    This version only draws a single line of text, to draw text that contains line breaks use the DrawTextLines procedure.

    Parameters:
    dest : Bitmap
    theText : String
    textColor : Color
    name : String
    size : Longint
    x : Longint
    y : Longint
    Signatures by Language:
    C/C++: void draw_text_on_bitmap_with_font_named_and_size(bitmap dest, const char *theText, color textColor, const char *name, int32_t size, int32_t x, int32_t y);
    C++: void draw_text(bitmap dest, const char *theText, color textColor, const char *name, int32_t size, int32_t x, int32_t y);
    Pascal: procedure DrawText(dest: Bitmap; theText: String; textColor: Color; name: String; size: Longint; x: Longint; y: Longint);
    • source code
    • lib name: DrawTextOnBitmapWithFontNamedAndSize

Draw Text Lines

Draws the text at the specified x,y location using the fore and back colors, and the font indicated.

This version should be used to draw text that contains multiple lines, to draw a single line of text use the DrawText procedure.

  • Draw Text Lines (theText, textColor, backColor, name, size, align, x, y, w, h) [show]

    Draws the text at the specified x,y location using the fore and back colors, and the font indicated.

    This version should be used to draw text that contains multiple lines, to draw a single line of text use the DrawText procedure.

    Parameters:
    theText : String
    textColor : Color
    backColor : Color
    name : String
    size : Longint
    align : FontAlignment
    x : Single
    y : Single
    w : Longint
    h : Longint
    Signatures by Language:
    C/C++: void draw_text_lines_with_font_named_and_size(const char *theText, color textColor, color backColor, const char *name, int32_t size, font_alignment align, float x, float y, int32_t w, int32_t h);
    C++: void draw_text_lines(const char *theText, color textColor, color backColor, const char *name, int32_t size, font_alignment align, float x, float y, int32_t w, int32_t h);
    Pascal: procedure DrawTextLines(theText: String; textColor: Color; backColor: Color; name: String; size: Longint; align: FontAlignment; x: Single; y: Single; w: Longint; h: Longint);
    • source code
    • lib name: DrawTextLinesWithFontNamedAndSize
  • Draw Text Lines (dest, theText, textColor, backColor, name, align, x, y, w, h) [show]

    Draws the text onto the bitmap at the specified x,y location using the fore and back colors, and the font indicated.

    This version should be used to draw text that contains multiple lines, to draw a single line of text use the DrawText procedure.

    Parameters:
    dest : Bitmap
    theText : String
    textColor : Color
    backColor : Color
    name : String
    align : FontAlignment
    x : Longint
    y : Longint
    w : Longint
    h : Longint
    Signatures by Language:
    C/C++: void draw_text_lines_on_bitmap_with_font_named(bitmap dest, const char *theText, color textColor, color backColor, const char *name, font_alignment align, int32_t x, int32_t y, int32_t w, int32_t h);
    C++: void draw_text_lines(bitmap dest, const char *theText, color textColor, color backColor, const char *name, font_alignment align, int32_t x, int32_t y, int32_t w, int32_t h);
    Pascal: procedure DrawTextLines(dest: Bitmap; theText: String; textColor: Color; backColor: Color; name: String; align: FontAlignment; x: Longint; y: Longint; w: Longint; h: Longint);
    • source code
    • lib name: DrawTextLinesOnBitmapWithFontNamed
  • Draw Text Lines (dest, theText, textColor, backColor, theFont, align, x, y, w, h) [show]

    Draws the text onto the bitmap at the specified x,y location using the fore and back colors, and the font indicated.

    This version should be used to draw text that contains multiple lines, to draw a single line of text use the DrawText procedure.

    Parameters:
    dest : Bitmap
    theText : String
    textColor : Color
    backColor : Color
    theFont : Font
    align : FontAlignment
    x : Longint
    y : Longint
    w : Longint
    h : Longint
    Signatures by Language:
    C/C++: void draw_text_lines_on_bitmap(bitmap dest, const char *theText, color textColor, color backColor, font theFont, font_alignment align, int32_t x, int32_t y, int32_t w, int32_t h);
    C++: void draw_text_lines(bitmap dest, const char *theText, color textColor, color backColor, font theFont, font_alignment align, int32_t x, int32_t y, int32_t w, int32_t h);
    Pascal: procedure DrawTextLines(dest: Bitmap; theText: String; textColor: Color; backColor: Color; theFont: Font; align: FontAlignment; x: Longint; y: Longint; w: Longint; h: Longint);
  • Draw Text Lines (dest, theText, textColor, backColor, name, size, align, x, y, w, h) [show]

    Draws theText onto the bitmap at the specified x,y location using the fore and back colors, and the font indicated.

    This version should be used to draw text that contains multiple lines, to draw a single line of text use the DrawText procedure.

    Parameters:
    dest : Bitmap
    theText : String
    textColor : Color
    backColor : Color
    name : String
    size : Longint
    align : FontAlignment
    x : Longint
    y : Longint
    w : Longint
    h : Longint
    Signatures by Language:
    C/C++: void draw_text_lines_on_bitmap_with_font_named_and_size(bitmap dest, const char *theText, color textColor, color backColor, const char *name, int32_t size, font_alignment align, int32_t x, int32_t y, int32_t w, int32_t h);
    C++: void draw_text_lines(bitmap dest, const char *theText, color textColor, color backColor, const char *name, int32_t size, font_alignment align, int32_t x, int32_t y, int32_t w, int32_t h);
    Pascal: procedure DrawTextLines(dest: Bitmap; theText: String; textColor: Color; backColor: Color; name: String; size: Longint; align: FontAlignment; x: Longint; y: Longint; w: Longint; h: Longint);
    • source code
    • lib name: DrawTextLinesOnBitmapWithFontNamedAndSize
  • Draw Text Lines (theText, textColor, backColor, name, align, const withinRect) [show]

    Draws the text in the specified rectangle using the fore and back colors, and the font indicated.

    This version should be used to draw text that contains multiple lines, to draw a single line of text use the DrawTextOnScreen procedure.

    Parameters:
    theText : String
    textColor : Color
    backColor : Color
    name : String
    align : FontAlignment
    withinRect : Rectangle
    Signatures by Language:
    C/C++: void draw_text_lines_in_rect_with_font_named(const char *theText, color textColor, color backColor, const char *name, font_alignment align, const rectangle *withinRect);
    C/C++: void draw_text_lines_in_rect_with_font_named_byval(const char *theText, color textColor, color backColor, const char *name, font_alignment align, const rectangle withinRect);
    C++: void draw_text_lines(const char *theText, color textColor, color backColor, const char *name, font_alignment align, const rectangle &withinRect);
    Pascal: procedure DrawTextLines(theText: String; textColor: Color; backColor: Color; name: String; align: FontAlignment; const withinRect: Rectangle);
    • source code
    • lib name: DrawTextLinesInRectWithFontNamed
  • Draw Text Lines (theText, textColor, backColor, theFont, align, const withinRect) [show]

    Draws the text in the specified rectangle using the fore and back colors, and the font indicated.

    This version should be used to draw text that contains multiple lines, to draw a single line of text use the DrawTextOnScreen procedure.

    Parameters:
    theText : String
    textColor : Color
    backColor : Color
    theFont : Font
    align : FontAlignment
    withinRect : Rectangle
    Signatures by Language:
    C/C++: void draw_text_lines_in_rect(const char *theText, color textColor, color backColor, font theFont, font_alignment align, const rectangle *withinRect);
    C/C++: void draw_text_lines_in_rect_byval(const char *theText, color textColor, color backColor, font theFont, font_alignment align, const rectangle withinRect);
    C++: void draw_text_lines(const char *theText, color textColor, color backColor, font theFont, font_alignment align, const rectangle &withinRect);
    Pascal: procedure DrawTextLines(theText: String; textColor: Color; backColor: Color; theFont: Font; align: FontAlignment; const withinRect: Rectangle);
  • Draw Text Lines (dest, theText, textColor, backColor, theFont, align, const withinRect) [show]

    Draws the text onto the bitmap in the rectangle using the fore and back colors, and the font indicated.

    This version should be used to draw text that contains multiple lines, to draw a single line of text use the DrawText procedure.

    Parameters:
    dest : Bitmap
    theText : String
    textColor : Color
    backColor : Color
    theFont : Font
    align : FontAlignment
    withinRect : Rectangle
    Signatures by Language:
    C/C++: void draw_text_lines_in_rect_on_bitmap(bitmap dest, const char *theText, color textColor, color backColor, font theFont, font_alignment align, const rectangle *withinRect);
    C/C++: void draw_text_lines_in_rect_on_bitmap_byval(bitmap dest, const char *theText, color textColor, color backColor, font theFont, font_alignment align, const rectangle withinRect);
    C++: void draw_text_lines(bitmap dest, const char *theText, color textColor, color backColor, font theFont, font_alignment align, const rectangle &withinRect);
    Pascal: procedure DrawTextLines(dest: Bitmap; theText: String; textColor: Color; backColor: Color; theFont: Font; align: FontAlignment; const withinRect: Rectangle);
  • Draw Text Lines (dest, theText, textColor, backColor, name, align, const withinRect) [show]

    Draws the text onto the bitmap in the rectangle using the fore and back colors, and the font indicated.

    This version should be used to draw text that contains multiple lines, to draw a single line of text use the DrawText procedure.

    Parameters:
    dest : Bitmap
    theText : String
    textColor : Color
    backColor : Color
    name : String
    align : FontAlignment
    withinRect : Rectangle
    Signatures by Language:
    C/C++: void draw_text_lines_in_rect_on_bitmap_with_font_named(bitmap dest, const char *theText, color textColor, color backColor, const char *name, font_alignment align, const rectangle *withinRect);
    C/C++: void draw_text_lines_in_rect_on_bitmap_with_font_named_byval(bitmap dest, const char *theText, color textColor, color backColor, const char *name, font_alignment align, const rectangle withinRect);
    C++: void draw_text_lines(bitmap dest, const char *theText, color textColor, color backColor, const char *name, font_alignment align, const rectangle &withinRect);
    Pascal: procedure DrawTextLines(dest: Bitmap; theText: String; textColor: Color; backColor: Color; name: String; align: FontAlignment; const withinRect: Rectangle);
    • source code
    • lib name: DrawTextLinesInRectOnBitmapWithFontNamed
  • Draw Text Lines (theText, textColor, backColor, name, size, align, const withinRect) [show]

    Draws theText in the specified rectangle using the fore and back colors, and the font indicated.

    This version should be used to draw text that contains multiple lines, to draw a single line of text use the DrawTextOnScreen procedure.

    Parameters:
    theText : String
    textColor : Color
    backColor : Color
    name : String
    size : Longint
    align : FontAlignment
    withinRect : Rectangle
    Signatures by Language:
    C/C++: void draw_text_lines_in_rect_with_font_named_and_size(const char *theText, color textColor, color backColor, const char *name, int32_t size, font_alignment align, const rectangle *withinRect);
    C/C++: void draw_text_lines_in_rect_with_font_named_and_size_byval(const char *theText, color textColor, color backColor, const char *name, int32_t size, font_alignment align, const rectangle withinRect);
    C++: void draw_text_lines(const char *theText, color textColor, color backColor, const char *name, int32_t size, font_alignment align, const rectangle &withinRect);
    Pascal: procedure DrawTextLines(theText: String; textColor: Color; backColor: Color; name: String; size: Longint; align: FontAlignment; const withinRect: Rectangle);
    • source code
    • lib name: DrawTextLinesInRectWithFontNamedAndSize
  • Draw Text Lines (dest, theText, textColor, backColor, name, size, align, const withinRect) [show]

    Draws the text onto the bitmap in the rectangle using the fore and back colors, and the font indicated.

    This version should be used to draw text that contains multiple lines, to draw a single line of text use the DrawText procedure.

    Parameters:
    dest : Bitmap
    theText : String
    textColor : Color
    backColor : Color
    name : String
    size : Longint
    align : FontAlignment
    withinRect : Rectangle
    Signatures by Language:
    C/C++: void draw_text_lines_in_rect_on_bitmap_with_font_named_and_size(bitmap dest, const char *theText, color textColor, color backColor, const char *name, int32_t size, font_alignment align, const rectangle *withinRect);
    C/C++: void draw_text_lines_in_rect_on_bitmap_with_font_named_and_size_byval(bitmap dest, const char *theText, color textColor, color backColor, const char *name, int32_t size, font_alignment align, const rectangle withinRect);
    C++: void draw_text_lines(bitmap dest, const char *theText, color textColor, color backColor, const char *name, int32_t size, font_alignment align, const rectangle &withinRect);
    Pascal: procedure DrawTextLines(dest: Bitmap; theText: String; textColor: Color; backColor: Color; name: String; size: Longint; align: FontAlignment; const withinRect: Rectangle);
    • source code
    • lib name: DrawTextLinesInRectOnBitmapWithFontNamedAndSize
  • Draw Text Lines (theText, textColor, backColor, theFont, align, x, y, w, h) [show]

    Draws the text at the specified x,y location using the fore and back colors, and the font indicated.

    This version should be used to draw text that contains multiple lines, to draw a single line of text use the DrawText procedure.

    Parameters:
    theText : String
    textColor : Color
    backColor : Color
    theFont : Font
    align : FontAlignment
    x : Single
    y : Single
    w : Longint
    h : Longint
    Signatures by Language:
    C/C++: void draw_text_lines(const char *theText, color textColor, color backColor, font theFont, font_alignment align, float x, float y, int32_t w, int32_t h);
    Pascal: procedure DrawTextLines(theText: String; textColor: Color; backColor: Color; theFont: Font; align: FontAlignment; x: Single; y: Single; w: Longint; h: Longint);
  • Draw Text Lines (theText, textColor, backColor, name, align, x, y, w, h) [show]

    Draws the text at the specified x,y location using the fore and back colors, and the font indicated.

    This version should be used to draw text that contains multiple lines, to draw a single line of text use the DrawText procedure.

    Parameters:
    theText : String
    textColor : Color
    backColor : Color
    name : String
    align : FontAlignment
    x : Single
    y : Single
    w : Longint
    h : Longint
    Signatures by Language:
    C/C++: void draw_text_lines_with_font_named(const char *theText, color textColor, color backColor, const char *name, font_alignment align, float x, float y, int32_t w, int32_t h);
    C++: void draw_text_lines(const char *theText, color textColor, color backColor, const char *name, font_alignment align, float x, float y, int32_t w, int32_t h);
    Pascal: procedure DrawTextLines(theText: String; textColor: Color; backColor: Color; name: String; align: FontAlignment; x: Single; y: Single; w: Longint; h: Longint);

Draw Text Lines On Screen

Draws the text onto the screen at the specified x,y location using the fore and back colors, and the font indicated. As the text is draw directly onto the screen the camera location does not effect its position. This is useful for drawing text on a HUD or similar actions.

This version should be used to draw text that contains multiple lines, to draw a single line of text use the DrawTextOnScreen procedure.

  • Draw Text Lines On Screen (theText, textColor, backColor, name, size, align, x, y, w, h) [show]

    Draws the text onto the screen at the specified x,y location using the fore and back colors, and the font indicated. As the text is draw directly onto the screen the camera location does not effect its position. This is useful for drawing text on a HUD or similar actions.

    This version should be used to draw text that contains multiple lines, to draw a single line of text use the DrawTextOnScreen procedure.

    Parameters:
    theText : String
    textColor : Color
    backColor : Color
    name : String
    size : Longint
    align : FontAlignment
    x : Longint
    y : Longint
    w : Longint
    h : Longint
    Signatures by Language:
    C/C++: void draw_text_lines_on_screen_with_font_named_with_size(const char *theText, color textColor, color backColor, const char *name, int32_t size, font_alignment align, int32_t x, int32_t y, int32_t w, int32_t h);
    C++: void draw_text_lines_on_screen(const char *theText, color textColor, color backColor, const char *name, int32_t size, font_alignment align, int32_t x, int32_t y, int32_t w, int32_t h);
    Pascal: procedure DrawTextLinesOnScreen(theText: String; textColor: Color; backColor: Color; name: String; size: Longint; align: FontAlignment; x: Longint; y: Longint; w: Longint; h: Longint);
    • source code
    • lib name: DrawTextLinesOnScreenWithFontNamedWithSize
  • Draw Text Lines On Screen (theText, textColor, backColor, theFont, align, const withinRect) [show]

    Draws the text onto the screen in the specified rectangle using the fore and back colors, and the font indicated. As the text is draw directly onto the screen the camera location does not effect its position. This is useful for drawing text on a HUD or similar actions.

    This version should be used to draw text that contains multiple lines, to draw a single line of text use the DrawTextOnScreen procedure.

    Parameters:
    theText : String
    textColor : Color
    backColor : Color
    theFont : Font
    align : FontAlignment
    withinRect : Rectangle
    Signatures by Language:
    C/C++: void draw_text_lines_in_rect_on_screen(const char *theText, color textColor, color backColor, font theFont, font_alignment align, const rectangle *withinRect);
    C/C++: void draw_text_lines_in_rect_on_screen_byval(const char *theText, color textColor, color backColor, font theFont, font_alignment align, const rectangle withinRect);
    C++: void draw_text_lines_on_screen(const char *theText, color textColor, color backColor, font theFont, font_alignment align, const rectangle &withinRect);
    Pascal: procedure DrawTextLinesOnScreen(theText: String; textColor: Color; backColor: Color; theFont: Font; align: FontAlignment; const withinRect: Rectangle);
  • Draw Text Lines On Screen (theText, textColor, backColor, name, align, const withinRect) [show]

    Draws the text onto the screen in the specified rectangle using the fore and back colors, and the font indicated. As the text is draw directly onto the screen the camera location does not effect its position. This is useful for drawing text on a HUD or similar actions.

    This version should be used to draw text that contains multiple lines, to draw a single line of text use the DrawTextOnScreen procedure.

    Parameters:
    theText : String
    textColor : Color
    backColor : Color
    name : String
    align : FontAlignment
    withinRect : Rectangle
    Signatures by Language:
    C/C++: void draw_text_lines_in_rect_on_screen_with_font_named(const char *theText, color textColor, color backColor, const char *name, font_alignment align, const rectangle *withinRect);
    C/C++: void draw_text_lines_in_rect_on_screen_with_font_named_byval(const char *theText, color textColor, color backColor, const char *name, font_alignment align, const rectangle withinRect);
    C++: void draw_text_lines_on_screen(const char *theText, color textColor, color backColor, const char *name, font_alignment align, const rectangle &withinRect);
    Pascal: procedure DrawTextLinesOnScreen(theText: String; textColor: Color; backColor: Color; name: String; align: FontAlignment; const withinRect: Rectangle);
    • source code
    • lib name: DrawTextLinesInRectOnScreenWithFontNamed
  • Draw Text Lines On Screen (theText, textColor, backColor, name, size, align, const withinRect) [show]

    Draws the text onto the screen in the specified rectangle using the fore and back colors, and the font indicated. As the text is draw directly onto the screen the camera location does not effect its position. This is useful for drawing text on a HUD or similar actions.

    This version should be used to draw text that contains multiple lines, to draw a single line of text use the DrawTextOnScreen procedure.

    Parameters:
    theText : String
    textColor : Color
    backColor : Color
    name : String
    size : Longint
    align : FontAlignment
    withinRect : Rectangle
    Signatures by Language:
    C/C++: void draw_text_lines_in_rect_on_screen_with_font_named_and_size(const char *theText, color textColor, color backColor, const char *name, int32_t size, font_alignment align, const rectangle *withinRect);
    C/C++: void draw_text_lines_in_rect_on_screen_with_font_named_and_size_byval(const char *theText, color textColor, color backColor, const char *name, int32_t size, font_alignment align, const rectangle withinRect);
    C++: void draw_text_lines_on_screen(const char *theText, color textColor, color backColor, const char *name, int32_t size, font_alignment align, const rectangle &withinRect);
    Pascal: procedure DrawTextLinesOnScreen(theText: String; textColor: Color; backColor: Color; name: String; size: Longint; align: FontAlignment; const withinRect: Rectangle);
    • source code
    • lib name: DrawTextLinesInRectOnScreenWithFontNamedAndSize
  • Draw Text Lines On Screen (theText, textColor, backColor, theFont, align, x, y, w, h) [show]

    Draws the text onto the screen at the specified x,y location using the fore and back colors, and the font indicated. As the text is draw directly onto the screen the camera location does not effect its position. This is useful for drawing text on a HUD or similar actions.

    This version should be used to draw text that contains multiple lines, to draw a single line of text use the DrawTextOnScreen procedure.

    Parameters:
    theText : String
    textColor : Color
    backColor : Color
    theFont : Font
    align : FontAlignment
    x : Longint
    y : Longint
    w : Longint
    h : Longint
    Signatures by Language:
    C/C++: void draw_text_lines_on_screen(const char *theText, color textColor, color backColor, font theFont, font_alignment align, int32_t x, int32_t y, int32_t w, int32_t h);
    Pascal: procedure DrawTextLinesOnScreen(theText: String; textColor: Color; backColor: Color; theFont: Font; align: FontAlignment; x: Longint; y: Longint; w: Longint; h: Longint);
  • Draw Text Lines On Screen (theText, textColor, backColor, name, align, x, y, w, h) [show]

    Draws the text onto the screen at the specified x,y location using the fore and back colors, and the font indicated. As the text is draw directly onto the screen the camera location does not effect its position. This is useful for drawing text on a HUD or similar actions.

    This version should be used to draw text that contains multiple lines, to draw a single line of text use the DrawTextOnScreen procedure.

    Parameters:
    theText : String
    textColor : Color
    backColor : Color
    name : String
    align : FontAlignment
    x : Longint
    y : Longint
    w : Longint
    h : Longint
    Signatures by Language:
    C/C++: void draw_text_lines_on_screen_with_font_named(const char *theText, color textColor, color backColor, const char *name, font_alignment align, int32_t x, int32_t y, int32_t w, int32_t h);
    C++: void draw_text_lines_on_screen(const char *theText, color textColor, color backColor, const char *name, font_alignment align, int32_t x, int32_t y, int32_t w, int32_t h);
    Pascal: procedure DrawTextLinesOnScreen(theText: String; textColor: Color; backColor: Color; name: String; align: FontAlignment; x: Longint; y: Longint; w: Longint; h: Longint);
    • source code
    • lib name: DrawTextLinesOnScreenWithFontNamed

Draw Text On Screen

Draws text using a simple bitmap font that is built into SwinGame. As the text is draw directly onto the screen the camera location does not effect its position. This is useful for drawing text on a HUD or similar actions.

  • Draw Text On Screen (theText, textColor, x, y) [show]

    Draws text using a simple bitmap font that is built into SwinGame. As the text is draw directly onto the screen the camera location does not effect its position. This is useful for drawing text on a HUD or similar actions.

    Parameters:
    theText : String
    textColor : Color
    x : Single
    y : Single
    Signatures by Language:
    C/C++: void draw_simple_text_on_screen(const char *theText, color textColor, float x, float y);
    C++: void draw_text_on_screen(const char *theText, color textColor, float x, float y);
    Pascal: procedure DrawTextOnScreen(theText: String; textColor: Color; x: Single; y: Single);
  • Draw Text On Screen (theText, textColor, name, const pt) [show]

    Draws theText onto the screen at the specified point using the color and font indicated. As the text is draw directly onto the screen the camera location does not effect its position. This is useful for drawing text on a HUD or similar actions.

    This version only draws a single line of text, to draw text that contains line breaks use the DrawTextLinesOnScreen procedure.

    Parameters:
    theText : String
    textColor : Color
    name : String
    pt : Point2D
    Signatures by Language:
    C/C++: void draw_text_on_screen_at_point_with_font_named(const char *theText, color textColor, const char *name, const point2d *pt);
    C/C++: void draw_text_on_screen_at_point_with_font_named_byval(const char *theText, color textColor, const char *name, const point2d pt);
    C++: void draw_text_on_screen(const char *theText, color textColor, const char *name, const point2d &pt);
    Pascal: procedure DrawTextOnScreen(theText: String; textColor: Color; name: String; const pt: Point2D);
    • source code
    • lib name: DrawTextOnScreenAtPointWithFontNamed
  • Draw Text On Screen (theText, textColor, theFont, const pt) [show]

    Draws theText onto the screen at the specified point using the color and font indicated. As the text is draw directly onto the screen the camera location does not effect its position. This is useful for drawing text on a HUD or similar actions.

    This version only draws a single line of text, to draw text that contains line breaks use the DrawTextLinesOnScreen procedure.

    Parameters:
    theText : String
    textColor : Color
    theFont : Font
    pt : Point2D
    Signatures by Language:
    C/C++: void draw_text_on_screen_at_point(const char *theText, color textColor, font theFont, const point2d *pt);
    C/C++: void draw_text_on_screen_at_point_byval(const char *theText, color textColor, font theFont, const point2d pt);
    C++: void draw_text_on_screen(const char *theText, color textColor, font theFont, const point2d &pt);
    Pascal: procedure DrawTextOnScreen(theText: String; textColor: Color; theFont: Font; const pt: Point2D);
  • Draw Text On Screen (theText, textColor, theFont, x, y) [show]

    Draws the text onto the screen at the specified x,y location using the color and font indicated. As the text is draw directly onto the screen the camera location does not effect its position. This is useful for drawing text on a HUD or similar actions.

    This version only draws a single line of text, to draw text that contains line breaks use the DrawTextLinesOnScreen procedure.

    Parameters:
    theText : String
    textColor : Color
    theFont : Font
    x : Longint
    y : Longint
    Signatures by Language:
    C/C++: void draw_text_on_screen(const char *theText, color textColor, font theFont, int32_t x, int32_t y);
    Pascal: procedure DrawTextOnScreen(theText: String; textColor: Color; theFont: Font; x: Longint; y: Longint);
  • Draw Text On Screen (theText, textColor, name, x, y) [show]

    Draws the text onto the screen at the specified x,y location using the color and font indicated. As the text is draw directly onto the screen the camera location does not effect its position. This is useful for drawing text on a HUD or similar actions.

    This version only draws a single line of text, to draw text that contains line breaks use the DrawTextLinesOnScreen procedure.

    Parameters:
    theText : String
    textColor : Color
    name : String
    x : Longint
    y : Longint
    Signatures by Language:
    C/C++: void draw_text_on_screen_with_font_named(const char *theText, color textColor, const char *name, int32_t x, int32_t y);
    C++: void draw_text_on_screen(const char *theText, color textColor, const char *name, int32_t x, int32_t y);
    Pascal: procedure DrawTextOnScreen(theText: String; textColor: Color; name: String; x: Longint; y: Longint);
  • Draw Text On Screen (theText, textColor, name, size, const pt) [show]

    Draws theText onto the screen at the specified point using the color and font indicated. As the text is draw directly onto the screen the camera location does not effect its position. This is useful for drawing text on a HUD or similar actions.

    This version only draws a single line of text, to draw text that contains line breaks use the DrawTextLinesOnScreen procedure.

    Parameters:
    theText : String
    textColor : Color
    name : String
    size : Longint
    pt : Point2D
    Signatures by Language:
    C/C++: void draw_text_on_screen_at_point_with_font_named_and_size(const char *theText, color textColor, const char *name, int32_t size, const point2d *pt);
    C/C++: void draw_text_on_screen_at_point_with_font_named_and_size_byval(const char *theText, color textColor, const char *name, int32_t size, const point2d pt);
    C++: void draw_text_on_screen(const char *theText, color textColor, const char *name, int32_t size, const point2d &pt);
    Pascal: procedure DrawTextOnScreen(theText: String; textColor: Color; name: String; size: Longint; const pt: Point2D);
    • source code
    • lib name: DrawTextOnScreenAtPointWithFontNamedAndSize
  • Draw Text On Screen (theText, textColor, name, size, x, y) [show]

    Draws the text onto the screen at the specified x,y location using the color and font indicated. As the text is draw directly onto the screen the camera location does not effect its position. This is useful for drawing text on a HUD or similar actions.

    This version only draws a single line of text, to draw text that contains line breaks use the DrawTextLinesOnScreen procedure.

    Parameters:
    theText : String
    textColor : Color
    name : String
    size : Longint
    x : Longint
    y : Longint
    Signatures by Language:
    C/C++: void draw_text_on_screen_with_font_named_and_size(const char *theText, color textColor, const char *name, int32_t size, int32_t x, int32_t y);
    C++: void draw_text_on_screen(const char *theText, color textColor, const char *name, int32_t size, int32_t x, int32_t y);
    Pascal: procedure DrawTextOnScreen(theText: String; textColor: Color; name: String; size: Longint; x: Longint; y: Longint);
    • source code
    • lib name: DrawTextOnScreenWithFontNamedAndSize

Draw Text To

Draws the text onto the bitmap at the specified point using the color and font indicated. Drawing text is a slow operation, and drawing it to a bitmap, then drawing the bitmap to screen is a good idea if the text does not change frequently.

This version only draws a single line of text, to draw text that contains line breaks use the DrawTextLines procedure.

  • Draw Text To (font, str, clrFg, backgroundColor) : Bitmap [show]

    Draws the text onto the bitmap at the specified point using the color and font indicated. Drawing text is a slow operation, and drawing it to a bitmap, then drawing the bitmap to screen is a good idea if the text does not change frequently.

    This version only draws a single line of text, to draw text that contains line breaks use the DrawTextLines procedure.

    Parameters:
    font : Font
    str : String
    clrFg : Color
    backgroundColor : Color
    Returns:
    Bitmap :
    Signatures by Language:
    C/C++: bitmap draw_text_to_bitmap_at_point_with_font_named_and_size(font font, const char *str, color clrFg, color backgroundColor);
    C++: bitmap draw_text_to(font font, const char *str, color clrFg, color backgroundColor);
    Pascal: function DrawTextTo(font: Font; str: String; clrFg: Color; backgroundColor: Color): Bitmap;
    • source code
    • lib name: DrawTextToBitmapAtPointWithFontNamedAndSize

Font Font Style

Returns the style settings for the font.

  • Font Font Style (font) : FontStyle [show]

    Returns the style settings for the font.

    Parameters:
    font : Font
    Returns:
    FontStyle :
    Signatures by Language:
    C/C++: font_style font_font_style(font font);
    Pascal: function FontFontStyle(font: Font): FontStyle;

Font Name For

Determines the name that will be used for a font loaded with the indicated fontName and size.

  • Font Name For (fontName, size) : String [show]

    Determines the name that will be used for a font loaded with the indicated fontName and size.

    Parameters:
    fontName : String
    size : Longint
    Returns:
    String :
    Signatures by Language:
    C/C++: void font_name_for(const char *fontName, int32_t size, char *result);
    Pascal: function FontNameFor(fontName: String; size: Longint): String;

Font Named

Returns the Font that has been loaded with the specified name, see LoadFontNamed.

  • Font Named (name) : Font [show]

    Returns the Font that has been loaded with the specified name, see LoadFontNamed.

    Parameters:
    name : String
    Returns:
    Font :
    Signatures by Language:
    C/C++: font font_named(const char *name);
    Pascal: function FontNamed(name: String): Font;
  • Font Named (name, size) : Font [show]

    Returns the Font that has been loaded with the specified name, and font size using LoadFont.

    Parameters:
    name : String
    size : Longint
    Returns:
    Font :
    Signatures by Language:
    C/C++: font font_named_with_size(const char *name, int32_t size);
    C++: font font_named(const char *name, int32_t size);
    Pascal: function FontNamed(name: String; size: Longint): Font;

Font Set Style

Alters the style of the font. This is time consuming, so load fonts multiple times and set the style for each if needed.

  • Font Set Style (font, value) [show]

    Alters the style of the font. This is time consuming, so load fonts multiple times and set the style for each if needed.

    Parameters:
    font : Font
    value : FontStyle
    Signatures by Language:
    C/C++: void font_set_style(font font, font_style value);
    Pascal: procedure FontSetStyle(font: Font; value: FontStyle);

Free Font

Frees the resources used by the loaded Font.

  • Free Font (var fontToFree) [show]

    Frees the resources used by the loaded Font.

    Parameters:
    fontToFree : Font
    Signatures by Language:
    C/C++: void free_font(font *fontToFree);
    C++: void free_font(font &fontToFree);
    Pascal: procedure FreeFont(var fontToFree: Font);

Has Font

Determines if SwinGame has a font loaded for the supplied name. This checks against all fonts loaded, those loaded without a name are assigned the filename as a default.

  • Has Font (name) : Boolean [show]

    Determines if SwinGame has a font loaded for the supplied name. This checks against all fonts loaded, those loaded without a name are assigned the filename as a default.

    Parameters:
    name : String
    Returns:
    Boolean :
    Signatures by Language:
    C/C++: bool has_font(const char *name);
    Pascal: function HasFont(name: String): Boolean;

Load Font

Loads a font from file with the specified side. Fonts must be freed using the FreeFont routine once finished with. Once the font is loaded you can set its style using SetFontStyle. Fonts are then used to draw and measure text in your programs.

  • Load Font (fontName, size) : Font [show]

    Loads a font from file with the specified side. Fonts must be freed using the FreeFont routine once finished with. Once the font is loaded you can set its style using SetFontStyle. Fonts are then used to draw and measure text in your programs.

    Parameters:
    fontName : String
    size : Longint
    Returns:
    Font :
    Signatures by Language:
    C/C++: font load_font(const char *fontName, int32_t size);
    Pascal: function LoadFont(fontName: String; size: Longint): Font;

Load Font Named

Loads and returns a font that can be used to draw text. The supplied filename is used to locate the font to load. The supplied name indicates the name to use to refer to this Font in SwinGame. The Font can then be retrieved by passing this name to the FontNamed function.

  • Load Font Named (name, filename, size) : Font [show]

    Loads and returns a font that can be used to draw text. The supplied filename is used to locate the font to load. The supplied name indicates the name to use to refer to this Font in SwinGame. The Font can then be retrieved by passing this name to the FontNamed function.

    Parameters:
    name : String
    filename : String
    size : Longint
    Returns:
    Font :
    Signatures by Language:
    C/C++: font load_font_named(const char *name, const char *filename, int32_t size);
    Pascal: function LoadFontNamed(name: String; filename: String; size: Longint): Font;

Release All Fonts

Releases all of the fonts that have been loaded.

  • Release All Fonts () [show]

    Releases all of the fonts that have been loaded.


Release Font

Releases the SwinGame resources associated with the font of the specified name.

  • Release Font (name) [show]

    Releases the SwinGame resources associated with the font of the specified name.

    Parameters:
    name : String
    Signatures by Language:
    C/C++: void release_font(const char *name);
    Pascal: procedure ReleaseFont(name: String);

Text Alignment From

Returns the font alignment for the passed in character (l = left. r = right, c = center).

  • Text Alignment From (str) : FontAlignment [show]

    Returns the font alignment for the passed in character (l = left. r = right, c = center).

    Parameters:
    str : String
    Returns:
    FontAlignment :
    Signatures by Language:
    C/C++: font_alignment text_alignment_from(const char *str);
    Pascal: function TextAlignmentFrom(str: String): FontAlignment;

Text Height

Returns the height (in pixels) of the passed in text and the font it will be drawn with.

  • Text Height (theFont, theText) : Longint [show]

    Returns the height (in pixels) of the passed in text and the font it will be drawn with.

    Parameters:
    theFont : Font
    theText : String
    Returns:
    Longint :
    Signatures by Language:
    C/C++: int32_t text_height(font theFont, const char *theText);
    Pascal: function TextHeight(theFont: Font; theText: String): Longint;

Text Width

Returns the width (in pixels) of the passed in text and the font it will be drawn with.

  • Text Width (theFont, theText) : Longint [show]

    Returns the width (in pixels) of the passed in text and the font it will be drawn with.

    Parameters:
    theFont : Font
    theText : String
    Returns:
    Longint :
    Signatures by Language:
    C/C++: int32_t text_width(font theFont, const char *theText);
    Pascal: function TextWidth(theFont: Font; theText: String): Longint;