openMSX
|
#include "imgui.h"
#include "imgui_internal.h"
#include "misc/freetype/imgui_freetype.h"
#include <stdio.h>
#include "imstb_rectpack.h"
Go to the source code of this file.
Classes | |
struct | ImTriangulatorNode |
struct | ImTriangulatorNodeSpan |
struct | ImTriangulator |
Macros | |
#define | IMGUI_DEFINE_MATH_OPERATORS |
#define | STBRP_STATIC |
#define | STBRP_ASSERT(x) do { IM_ASSERT(x); } while (0) |
#define | STBRP_SORT ImQsort |
#define | STB_RECT_PACK_IMPLEMENTATION |
#define | ImDrawCmd_HeaderSize (offsetof(ImDrawCmd, VtxOffset) + sizeof(unsigned int)) |
#define | ImDrawCmd_HeaderCompare(CMD_LHS, CMD_RHS) (memcmp(CMD_LHS, CMD_RHS, ImDrawCmd_HeaderSize)) |
#define | ImDrawCmd_HeaderCopy(CMD_DST, CMD_SRC) (memcpy(CMD_DST, CMD_SRC, ImDrawCmd_HeaderSize)) |
#define | ImDrawCmd_AreSequentialIdxOffset(CMD_0, CMD_1) (CMD_0->IdxOffset + CMD_0->ElemCount == CMD_1->IdxOffset) |
#define | IM_NORMALIZE2F_OVER_ZERO(VX, VY) { float d2 = VX*VX + VY*VY; if (d2 > 0.0f) { float inv_len = ImRsqrt(d2); VX *= inv_len; VY *= inv_len; } } (void)0 |
#define | IM_FIXNORMAL2F_MAX_INVLEN2 100.0f |
#define | IM_FIXNORMAL2F(VX, VY) { float d2 = VX*VX + VY*VY; if (d2 > 0.000001f) { float inv_len2 = 1.0f / d2; if (inv_len2 > IM_FIXNORMAL2F_MAX_INVLEN2) inv_len2 = IM_FIXNORMAL2F_MAX_INVLEN2; VX *= inv_len2; VY *= inv_len2; } } (void)0 |
#define | ImFontGetCharAdvanceX(_FONT, _CH) ((int)(_CH) < (_FONT)->IndexAdvanceX.Size ? (_FONT)->IndexAdvanceX.Data[_CH] : (_FONT)->FallbackAdvanceX) |
#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)) |
Enumerations | |
enum | ImTriangulatorNodeType { ImTriangulatorNodeType_Convex , ImTriangulatorNodeType_Ear , ImTriangulatorNodeType_Reflex } |
Functions | |
ImVec2 | ImBezierCubicCalc (const ImVec2 &p1, const ImVec2 &p2, const ImVec2 &p3, const ImVec2 &p4, float t) |
ImVec2 | ImBezierQuadraticCalc (const ImVec2 &p1, const ImVec2 &p2, const ImVec2 &p3, float t) |
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) |
void | ImFontAtlasUpdateConfigDataPointers (ImFontAtlas *atlas) |
void | ImFontAtlasBuildSetupFont (ImFontAtlas *atlas, ImFont *font, ImFontConfig *font_config, float ascent, float descent) |
void | ImFontAtlasBuildPackCustomRects (ImFontAtlas *atlas, void *stbrp_context_opaque) |
void | ImFontAtlasBuildRender8bppRectFromString (ImFontAtlas *atlas, int x, int y, int w, int h, const char *in_str, char in_marker_char, unsigned char in_marker_pixel_value) |
void | ImFontAtlasBuildRender32bppRectFromString (ImFontAtlas *atlas, int x, int y, int w, int h, const char *in_str, char in_marker_char, unsigned int in_marker_pixel_value) |
void | ImFontAtlasBuildInit (ImFontAtlas *atlas) |
void | ImFontAtlasBuildFinish (ImFontAtlas *atlas) |
Variables | |
const int | FONT_ATLAS_DEFAULT_TEX_DATA_W = 122 |
const int | FONT_ATLAS_DEFAULT_TEX_DATA_H = 27 |
#define IM_FIXNORMAL2F | ( | VX, | |
VY | |||
) | { float d2 = VX*VX + VY*VY; if (d2 > 0.000001f) { float inv_len2 = 1.0f / d2; if (inv_len2 > IM_FIXNORMAL2F_MAX_INVLEN2) inv_len2 = IM_FIXNORMAL2F_MAX_INVLEN2; VX *= inv_len2; VY *= inv_len2; } } (void)0 |
Definition at line 765 of file imgui_draw.cc.
#define IM_FIXNORMAL2F_MAX_INVLEN2 100.0f |
Definition at line 764 of file imgui_draw.cc.
#define IM_NORMALIZE2F_OVER_ZERO | ( | VX, | |
VY | |||
) | { float d2 = VX*VX + VY*VY; if (d2 > 0.0f) { float inv_len = ImRsqrt(d2); VX *= inv_len; VY *= inv_len; } } (void)0 |
Definition at line 763 of file imgui_draw.cc.
#define ImDrawCmd_AreSequentialIdxOffset | ( | CMD_0, | |
CMD_1 | |||
) | (CMD_0->IdxOffset + CMD_0->ElemCount == CMD_1->IdxOffset) |
Definition at line 534 of file imgui_draw.cc.
#define ImDrawCmd_HeaderCompare | ( | CMD_LHS, | |
CMD_RHS | |||
) | (memcmp(CMD_LHS, CMD_RHS, ImDrawCmd_HeaderSize)) |
Definition at line 532 of file imgui_draw.cc.
#define ImDrawCmd_HeaderCopy | ( | CMD_DST, | |
CMD_SRC | |||
) | (memcpy(CMD_DST, CMD_SRC, ImDrawCmd_HeaderSize)) |
Definition at line 533 of file imgui_draw.cc.
#define ImDrawCmd_HeaderSize (offsetof(ImDrawCmd, VtxOffset) + sizeof(unsigned int)) |
Definition at line 531 of file imgui_draw.cc.
#define ImFontGetCharAdvanceX | ( | _FONT, | |
_CH | |||
) | ((int)(_CH) < (_FONT)->IndexAdvanceX.Size ? (_FONT)->IndexAdvanceX.Data[_CH] : (_FONT)->FallbackAdvanceX) |
Definition at line 3935 of file imgui_draw.cc.
#define IMGUI_DEFINE_MATH_OPERATORS |
Definition at line 31 of file imgui_draw.cc.
#define stb__in2 | ( | x | ) | ((i[x] << 8) + i[(x)+1]) |
Definition at line 4580 of file imgui_draw.cc.
#define stb__in3 | ( | x | ) | ((i[x] << 16) + stb__in2((x)+1)) |
Definition at line 4581 of file imgui_draw.cc.
#define stb__in4 | ( | x | ) | ((i[x] << 24) + stb__in3((x)+1)) |
Definition at line 4582 of file imgui_draw.cc.
#define STB_RECT_PACK_IMPLEMENTATION |
Definition at line 125 of file imgui_draw.cc.
#define STBRP_ASSERT | ( | x | ) | do { IM_ASSERT(x); } while (0) |
Definition at line 123 of file imgui_draw.cc.
#define STBRP_SORT ImQsort |
Definition at line 124 of file imgui_draw.cc.
#define STBRP_STATIC |
Definition at line 122 of file imgui_draw.cc.
Enumerator | |
---|---|
ImTriangulatorNodeType_Convex | |
ImTriangulatorNodeType_Ear | |
ImTriangulatorNodeType_Reflex |
Definition at line 1774 of file imgui_draw.cc.
ImVec2 ImBezierCubicCalc | ( | const ImVec2 & | p1, |
const ImVec2 & | p2, | ||
const ImVec2 & | p3, | ||
const ImVec2 & | p4, | ||
float | t | ||
) |
Definition at line 1300 of file imgui_draw.cc.
References p3, p4, t, w3, and w4.
Referenced by ImBezierCubicClosestPoint().
ImVec2 ImBezierQuadraticCalc | ( | const ImVec2 & | p1, |
const ImVec2 & | p2, | ||
const ImVec2 & | p3, | ||
float | t | ||
) |
Definition at line 1310 of file imgui_draw.cc.
void ImFontAtlasBuildFinish | ( | ImFontAtlas * | atlas | ) |
Definition at line 3334 of file imgui_draw.cc.
Referenced by ImFontAtlasBuildWithFreeTypeEx().
void ImFontAtlasBuildInit | ( | ImFontAtlas * | atlas | ) |
Definition at line 3313 of file imgui_draw.cc.
References FONT_ATLAS_DEFAULT_TEX_DATA_H, and FONT_ATLAS_DEFAULT_TEX_DATA_W.
Referenced by ImFontAtlasBuildWithFreeTypeEx().
void ImFontAtlasBuildMultiplyCalcLookupTable | ( | unsigned char | out_table[256], |
float | in_brighten_factor | ||
) |
Definition at line 2811 of file imgui_draw.cc.
Referenced by ImFontAtlasBuildWithFreeTypeEx().
void ImFontAtlasBuildMultiplyRectAlpha8 | ( | const unsigned char | table[256], |
unsigned char * | pixels, | ||
int | x, | ||
int | y, | ||
int | w, | ||
int | h, | ||
int | stride | ||
) |
Definition at line 2820 of file imgui_draw.cc.
void ImFontAtlasBuildPackCustomRects | ( | ImFontAtlas * | atlas, |
void * | stbrp_context_opaque | ||
) |
Definition at line 3170 of file imgui_draw.cc.
Referenced by ImFontAtlasBuildWithFreeTypeEx().
void ImFontAtlasBuildRender32bppRectFromString | ( | ImFontAtlas * | atlas, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h, | ||
const char * | in_str, | ||
char | in_marker_char, | ||
unsigned int | in_marker_pixel_value | ||
) |
Definition at line 3211 of file imgui_draw.cc.
void ImFontAtlasBuildRender8bppRectFromString | ( | ImFontAtlas * | atlas, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h, | ||
const char * | in_str, | ||
char | in_marker_char, | ||
unsigned char | in_marker_pixel_value | ||
) |
Definition at line 3201 of file imgui_draw.cc.
void ImFontAtlasBuildSetupFont | ( | ImFontAtlas * | atlas, |
ImFont * | font, | ||
ImFontConfig * | font_config, | ||
float | ascent, | ||
float | descent | ||
) |
Definition at line 3157 of file imgui_draw.cc.
Referenced by ImFontAtlasBuildWithFreeTypeEx().
void ImFontAtlasUpdateConfigDataPointers | ( | ImFontAtlas * | atlas | ) |
Definition at line 3143 of file imgui_draw.cc.
const int FONT_ATLAS_DEFAULT_TEX_DATA_H = 27 |
Definition at line 2432 of file imgui_draw.cc.
Referenced by ImFontAtlasBuildInit().
const int FONT_ATLAS_DEFAULT_TEX_DATA_W = 122 |
Definition at line 2431 of file imgui_draw.cc.
Referenced by ImFontAtlasBuildInit().