Engine
Frameworkcreatedbymeusableforthecreationofsimplegames.CurrentlysupportsOpenGL(Verysimple)andVulkan.
Macros | Functions | Variables
imgui_draw.cpp File Reference
#include "imgui.h"
#include "imgui_internal.h"
#include <stdio.h>
#include <stdlib.h>
#include "stb_rect_pack.h"
#include "stb_truetype.h"

Go to the source code of this file.

Macros

#define IMGUI_DEFINE_MATH_OPERATORS
 
#define IMGUI_DEFINE_PLACEMENT_NEW
 
#define STBRP_ASSERT(x)   IM_ASSERT(x)
 
#define STBRP_STATIC
 
#define STB_RECT_PACK_IMPLEMENTATION
 
#define STBTT_malloc(x, u)   ((void)(u), ImGui::MemAlloc(x))
 
#define STBTT_free(x, u)   ((void)(u), ImGui::MemFree(x))
 
#define STBTT_assert(x)   IM_ASSERT(x)
 
#define STBTT_STATIC
 
#define STB_TRUETYPE_IMPLEMENTATION
 
#define GetCurrentClipRect()   (_ClipRectStack.Size ? _ClipRectStack.Data[_ClipRectStack.Size-1] : GNullClipRect)
 
#define GetCurrentTextureId()   (_TextureIdStack.Size ? _TextureIdStack.Data[_TextureIdStack.Size-1] : NULL)
 
#define stb__in2(x)   ((i[x] << 8) + i[(x)+1])
 
#define stb__in3(x)   ((i[x] << 16) + stb__in2((x)+1))
 
#define stb__in4(x)   ((i[x] << 24) + stb__in3((x)+1))
 

Functions

void ImFontAtlasBuildMultiplyCalcLookupTable (unsigned char out_table[256], float in_brighten_factor)
 
void ImFontAtlasBuildMultiplyRectAlpha8 (const unsigned char table[256], unsigned char *pixels, int x, int y, int w, int h, int stride)
 
bool ImFontAtlasBuildWithStbTruetype (ImFontAtlas *atlas)
 
void ImFontAtlasBuildRegisterDefaultCustomRects (ImFontAtlas *atlas)
 
void ImFontAtlasBuildSetupFont (ImFontAtlas *atlas, ImFont *font, ImFontConfig *font_config, float ascent, float descent)
 
void ImFontAtlasBuildPackCustomRects (ImFontAtlas *atlas, void *pack_context_opaque)
 
void ImFontAtlasBuildFinish (ImFontAtlas *atlas)
 

Variables

const int FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF = 90
 
const int FONT_ATLAS_DEFAULT_TEX_DATA_H = 27
 
const unsigned int FONT_ATLAS_DEFAULT_TEX_DATA_ID = 0x80000000
 
const char FONT_ATLAS_DEFAULT_TEX_DATA_PIXELS [FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF *FONT_ATLAS_DEFAULT_TEX_DATA_H+1]
 

Macro Definition Documentation

#define GetCurrentClipRect ( )    (_ClipRectStack.Size ? _ClipRectStack.Data[_ClipRectStack.Size-1] : GNullClipRect)

Definition at line 164 of file imgui_draw.cpp.

#define GetCurrentTextureId ( )    (_TextureIdStack.Size ? _TextureIdStack.Data[_TextureIdStack.Size-1] : NULL)

Definition at line 165 of file imgui_draw.cpp.

#define IMGUI_DEFINE_MATH_OPERATORS

Definition at line 16 of file imgui_draw.cpp.

#define IMGUI_DEFINE_PLACEMENT_NEW

Definition at line 17 of file imgui_draw.cpp.

#define stb__in2 (   x)    ((i[x] << 8) + i[(x)+1])

Definition at line 2487 of file imgui_draw.cpp.

#define stb__in3 (   x)    ((i[x] << 16) + stb__in2((x)+1))

Definition at line 2488 of file imgui_draw.cpp.

#define stb__in4 (   x)    ((i[x] << 24) + stb__in3((x)+1))

Definition at line 2489 of file imgui_draw.cpp.

#define STB_RECT_PACK_IMPLEMENTATION

Definition at line 87 of file imgui_draw.cpp.

#define STB_TRUETYPE_IMPLEMENTATION

Definition at line 96 of file imgui_draw.cpp.

#define STBRP_ASSERT (   x)    IM_ASSERT(x)

Definition at line 84 of file imgui_draw.cpp.

#define STBRP_STATIC

Definition at line 86 of file imgui_draw.cpp.

#define STBTT_assert (   x)    IM_ASSERT(x)

Definition at line 93 of file imgui_draw.cpp.

#define STBTT_free (   x,
 
)    ((void)(u), ImGui::MemFree(x))

Definition at line 92 of file imgui_draw.cpp.

#define STBTT_malloc (   x,
 
)    ((void)(u), ImGui::MemAlloc(x))

Definition at line 91 of file imgui_draw.cpp.

#define STBTT_STATIC

Definition at line 95 of file imgui_draw.cpp.

Function Documentation

void ImFontAtlasBuildFinish ( ImFontAtlas atlas)

Definition at line 1674 of file imgui_draw.cpp.

void ImFontAtlasBuildMultiplyCalcLookupTable ( unsigned char  out_table[256],
float  in_brighten_factor 
)

Definition at line 1368 of file imgui_draw.cpp.

void ImFontAtlasBuildMultiplyRectAlpha8 ( const unsigned char  table[256],
unsigned char *  pixels,
int  x,
int  y,
int  w,
int  h,
int  stride 
)

Definition at line 1377 of file imgui_draw.cpp.

void ImFontAtlasBuildPackCustomRects ( ImFontAtlas atlas,
void *  pack_context_opaque 
)

Definition at line 1597 of file imgui_draw.cpp.

void ImFontAtlasBuildRegisterDefaultCustomRects ( ImFontAtlas atlas)

Definition at line 1575 of file imgui_draw.cpp.

void ImFontAtlasBuildSetupFont ( ImFontAtlas atlas,
ImFont font,
ImFontConfig font_config,
float  ascent,
float  descent 
)

Definition at line 1581 of file imgui_draw.cpp.

bool ImFontAtlasBuildWithStbTruetype ( ImFontAtlas atlas)

Definition at line 1385 of file imgui_draw.cpp.

Variable Documentation

const int FONT_ATLAS_DEFAULT_TEX_DATA_H = 27

Definition at line 1068 of file imgui_draw.cpp.

const unsigned int FONT_ATLAS_DEFAULT_TEX_DATA_ID = 0x80000000

Definition at line 1069 of file imgui_draw.cpp.

const char FONT_ATLAS_DEFAULT_TEX_DATA_PIXELS[FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF *FONT_ATLAS_DEFAULT_TEX_DATA_H+1]
Initial value:
=
{
"..- -XXXXXXX- X - X -XXXXXXX - XXXXXXX"
"..- -X.....X- X.X - X.X -X.....X - X.....X"
"--- -XXX.XXX- X...X - X...X -X....X - X....X"
"X - X.X - X.....X - X.....X -X...X - X...X"
"XX - X.X -X.......X- X.......X -X..X.X - X.X..X"
"X.X - X.X -XXXX.XXXX- XXXX.XXXX -X.X X.X - X.X X.X"
"X..X - X.X - X.X - X.X -XX X.X - X.X XX"
"X...X - X.X - X.X - XX X.X XX - X.X - X.X "
"X....X - X.X - X.X - X.X X.X X.X - X.X - X.X "
"X.....X - X.X - X.X - X..X X.X X..X - X.X - X.X "
"X......X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X XX-XX X.X "
"X.......X - X.X - X.X -X.....................X- X.X X.X-X.X X.X "
"X........X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X..X-X..X.X "
"X.........X -XXX.XXX- X.X - X..X X.X X..X - X...X-X...X "
"X..........X-X.....X- X.X - X.X X.X X.X - X....X-X....X "
"X......XXXXX-XXXXXXX- X.X - XX X.X XX - X.....X-X.....X "
"X...X..X --------- X.X - X.X - XXXXXXX-XXXXXXX "
"X..X X..X - -XXXX.XXXX- XXXX.XXXX ------------------------------------"
"X.X X..X - -X.......X- X.......X - XX XX - "
"XX X..X - - X.....X - X.....X - X.X X.X - "
" X..X - X...X - X...X - X..X X..X - "
" XX - X.X - X.X - X...XXXXXXXXXXXXX...X - "
"------------ - X - X -X.....................X- "
" ----------------------------------- X...XXXXXXXXXXXXX...X - "
" - X..X X..X - "
" - X.X X.X - "
" - XX XX - "
}

Definition at line 1070 of file imgui_draw.cpp.

const int FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF = 90

Definition at line 1067 of file imgui_draw.cpp.