Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
itdan3344
stb
提交
48710234
S
stb
项目概览
itdan3344
/
stb
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
stb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
48710234
编写于
1月 15, 2017
作者:
S
Sean Barrett
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
credits; 1/2/4-bit png fix; easy font spacing; NO_STDIO in image_write
上级
96714b2a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
30 addition
and
9 deletion
+30
-9
stb_easy_font.h
stb_easy_font.h
+8
-3
stb_image.h
stb_image.h
+5
-2
stb_image_write.h
stb_image_write.h
+1
-0
stb_sprintf.h
stb_sprintf.h
+16
-4
未找到文件。
stb_easy_font.h
浏览文件 @
48710234
// stb_easy_font.h - v
0.7
- bitmap font for 3D rendering - public domain
// stb_easy_font.h - v
1.0
- bitmap font for 3D rendering - public domain
// Sean Barrett, Feb 2015
//
// Easy-to-deploy,
...
...
@@ -73,9 +73,14 @@
//
// VERSION HISTORY
//
// (2017-01-15) 1.0 space character takes same space as numbers; fix bad spacing of 'f'
// (2016-01-22) 0.7 width() supports multiline text; add height()
// (2015-09-13) 0.6 #include <math.h>; updated license
// (2015-02-01) 0.5 First release
//
// CONTRIBUTORS
//
// github:vassvik -- bug report
#if 0
// SAMPLE CODE:
...
...
@@ -109,7 +114,7 @@ struct {
unsigned
char
h_seg
;
unsigned
char
v_seg
;
}
stb_easy_font_charinfo
[
96
]
=
{
{
5
,
0
,
0
},
{
3
,
0
,
0
},
{
5
,
1
,
1
},
{
7
,
1
,
4
},
{
6
,
0
,
0
},
{
3
,
0
,
0
},
{
5
,
1
,
1
},
{
7
,
1
,
4
},
{
7
,
3
,
7
},
{
7
,
6
,
12
},
{
7
,
8
,
19
},
{
4
,
16
,
21
},
{
4
,
17
,
22
},
{
4
,
19
,
23
},
{
23
,
21
,
24
},
{
23
,
22
,
31
},
{
20
,
23
,
34
},
{
22
,
23
,
36
},
{
19
,
24
,
36
},
{
21
,
25
,
36
},
...
...
@@ -126,7 +131,7 @@ struct {
{
7
,
109
,
165
},
{
7
,
118
,
167
},
{
6
,
118
,
172
},
{
4
,
120
,
176
},
{
6
,
122
,
177
},
{
4
,
122
,
181
},
{
23
,
124
,
182
},
{
22
,
129
,
182
},
{
4
,
130
,
182
},
{
22
,
131
,
183
},
{
6
,
133
,
187
},
{
22
,
135
,
191
},
{
6
,
137
,
192
},
{
22
,
139
,
196
},
{
5
,
144
,
197
},
{
22
,
147
,
198
},
{
6
,
137
,
192
},
{
22
,
139
,
196
},
{
6
,
144
,
197
},
{
22
,
147
,
198
},
{
6
,
150
,
202
},
{
19
,
151
,
206
},
{
21
,
152
,
207
},
{
6
,
155
,
209
},
{
3
,
160
,
210
},
{
23
,
160
,
211
},
{
22
,
164
,
216
},
{
22
,
165
,
220
},
{
22
,
167
,
224
},
{
22
,
169
,
228
},
{
21
,
171
,
232
},
{
21
,
173
,
233
},
...
...
stb_image.h
浏览文件 @
48710234
...
...
@@ -192,7 +192,7 @@
Ryamond Barbiero Paul Du Bois Engin Manap snagar@github
Michaelangel007@github Oriol Ferrer Mesia socks-the-fox Zelex@github
Philipp Wiesemann Josh Tobin rlyeh@github grim210@github
Blazej Dariusz Roszkowski
Blazej Dariusz Roszkowski
Dale Weiler
LICENSE
...
...
@@ -4842,7 +4842,10 @@ static void *stbi__do_png(stbi__png *p, int *x, int *y, int *n, int req_comp, st
void
*
result
=
NULL
;
if
(
req_comp
<
0
||
req_comp
>
4
)
return
stbi__errpuc
(
"bad req_comp"
,
"Internal error"
);
if
(
stbi__parse_png_file
(
p
,
STBI__SCAN_load
,
req_comp
))
{
ri
->
bits_per_channel
=
p
->
depth
;
if
(
p
->
depth
<
8
)
ri
->
bits_per_channel
=
8
;
else
ri
->
bits_per_channel
=
p
->
depth
;
result
=
p
->
out
;
p
->
out
=
NULL
;
if
(
req_comp
&&
req_comp
!=
p
->
s
->
img_out_n
)
{
...
...
stb_image_write.h
浏览文件 @
48710234
...
...
@@ -103,6 +103,7 @@ CREDITS:
Jonas Karlsson
Filip Wasil
Thatcher Ulrich
github:poppolopoppo
LICENSE
...
...
stb_sprintf.h
浏览文件 @
48710234
...
...
@@ -4,6 +4,9 @@
//
// allowed types: sc uidBboXx p AaGgEef n
// lengths : h ll j z t I64 I32 I
//
// Contributors (bugfixes):
// github:d26435
#ifndef STB_SPRINTF_H_INCLUDE
#define STB_SPRINTF_H_INCLUDE
...
...
@@ -118,16 +121,25 @@ PERFORMANCE vs MSVC 2008 32-/64-bit (GCC is even slower than MSVC):
"...512 char string..." ( 35.0x/32.5x faster!)
*/
#if defined(__has_feature)
#if __has_feature(address_sanitizer)
#define STBI__ASAN __attribute__((no_sanitize("address")))
#endif
#endif
#ifndef STBI__ASAN
#define STBI__ASAN
#endif
#ifdef STB_SPRINTF_STATIC
#define STBSP__PUBLICDEC static
#define STBSP__PUBLICDEF static
#define STBSP__PUBLICDEF static
STBI__ASAN
#else
#ifdef __cplusplus
#define STBSP__PUBLICDEC extern "C"
#define STBSP__PUBLICDEF extern "C"
#define STBSP__PUBLICDEF extern "C"
STBI__ASAN
#else
#define STBSP__PUBLICDEC extern
#define STBSP__PUBLICDEF
#define STBSP__PUBLICDEC extern
#define STBSP__PUBLICDEF
STBI__ASAN
#endif
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录