mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-01-23 05:39:39 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
16 lines
378 B
C#
16 lines
378 B
C#
using Sandbox.UI;
|
|
|
|
namespace Sandbox;
|
|
|
|
public partial class Bitmap
|
|
{
|
|
/// <summary>
|
|
/// Draws text onto this bitmap
|
|
/// </summary>
|
|
public void DrawText( TextRendering.Scope scope, Rect rect, TextFlag flags = TextFlag.Center )
|
|
{
|
|
using var block = new TextRendering.TextBlock( scope, new Vector2( 0, 0 ), flags, FontSmooth.Always );
|
|
block.Render( _canvas, rect );
|
|
}
|
|
}
|