mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
54 lines
3.6 KiB
C#
54 lines
3.6 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.ImGui.Generator; do not edit by hand.
|
|
#nullable enable
|
|
|
|
namespace Brutal.ImGuiApi
|
|
{
|
|
public partial class ImGui
|
|
{
|
|
public unsafe partial class PInvoke
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// get current scaled font size (= height in pixels). AFTER global scale factors applied. *IMPORTANT*
|
|
/// DO NOT PASS THIS VALUE TO PushFont()! Use ImGui::GetStyle().FontSizeBase to get value before global
|
|
/// scale factors.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L531">imgui.h:531</see>
|
|
/// ,
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9100">imgui.cpp:9100</see>
|
|
/// <br/><c>float GetFontSize()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Parameters stacks (font)
|
|
/// - PushFont(font, 0.0f) // Change font and keep current size
|
|
/// - PushFont(NULL, 20.0f) // Keep font and change current size
|
|
/// - PushFont(font, 20.0f) // Change font and set size to 20.0f
|
|
/// - PushFont(font, style.FontSizeBase * 2.0f) // Change font and set size to be twice bigger than current size.
|
|
/// - PushFont(font, font->LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior.
|
|
/// *IMPORTANT* before 1.92, fonts had a single size. They can now be dynamically be adjusted.
|
|
/// - In 1.92 we have REMOVED the single parameter version of PushFont() because it seems like the easiest way to provide an error-proof transition.
|
|
/// - PushFont(font) before 1.92 = PushFont(font, font->LegacySize) after 1.92 // Use default font size as passed to AddFontXXX() function.
|
|
/// *IMPORTANT* global scale factors are applied over the provided size.
|
|
/// - Global scale factors are: 'style.FontScaleMain', 'style.FontScaleDpi' and maybe more.
|
|
/// - If you want to apply a factor to the _current_ font size:
|
|
/// - CORRECT: PushFont(NULL, style.FontSizeBase) // use current unscaled size == does nothing
|
|
/// - CORRECT: PushFont(NULL, style.FontSizeBase * 2.0f) // use current unscaled size x2 == make text twice bigger
|
|
/// - INCORRECT: PushFont(NULL, GetFontSize()) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE!
|
|
/// - INCORRECT: PushFont(NULL, GetFontSize() * 2.0f) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE!
|
|
/// </code>
|
|
/// <code>
|
|
/// Get current font size (= height in pixels) of current font, with global scale factors applied.
|
|
/// - Use style.FontSizeBase to get value before global scale factors.
|
|
/// - recap: ImGui::GetFontSize() == style.FontSizeBase * (style.FontScaleMain * style.FontScaleDpi * other_scaling_factors)
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("imgui")]
|
|
public static unsafe partial float GetFontSize();
|
|
}
|
|
}
|
|
}
|