MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / DrawText

Method DrawText

Source/Engine/Debug/DebugDraw.cpp:2276–2290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2274}
2275
2276void DebugDraw::DrawText(const StringView& text, const Float2& position, const Color& color, int32 size, float duration)
2277{
2278 if (text.Length() == 0 || size < 4)
2279 return;
2280 PROFILE_MEM(EngineDebug);
2281 Array<DebugText2D>* list = duration > 0 ? &Context->DebugDrawDefault.DefaultText2D : &Context->DebugDrawDefault.OneFrameText2D;
2282 auto& t = list->AddOne();
2283 t.Text.Resize(text.Length() + 1);
2284 Platform::MemoryCopy(t.Text.Get(), text.Get(), text.Length() * sizeof(Char));
2285 t.Text[text.Length()] = 0;
2286 t.Position = position;
2287 t.Size = size;
2288 t.Color = color;
2289 t.TimeLeft = duration;
2290}
2291
2292void DebugDraw::DrawText(const StringView& text, const Vector3& position, const Color& color, int32 size, float duration, float scale)
2293{

Callers 15

DrawMethod · 0.45
DrawMethod · 0.45
DrawSelfMethod · 0.45
DrawSelfMethod · 0.45
DrawSelfMethod · 0.45
DrawSelfMethod · 0.45
DrawMethod · 0.45
DrawMethod · 0.45
DrawMethod · 0.45
DrawMethod · 0.45
DrawMethod · 0.45
DrawMethod · 0.45

Calls 4

AddOneMethod · 0.80
LengthMethod · 0.45
ResizeMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected