This commit is contained in:
Branimir Karadžić
2014-05-03 15:18:28 -07:00
parent 6dc6dd6148
commit ac925b00c8
30 changed files with 842 additions and 1851 deletions

4
3rdparty/sdf/sdf.h vendored
View File

@@ -203,7 +203,7 @@ void sdfBuildNoAlloc(unsigned char* out, int outstride, float maxdist,
for (y = 1; y < height-1; y++) {
for (x = 1; x < width-1; x++) {
int k = x+y*width, kn, ch = 0;
struct SDFpoint c = { (float)x, (float)y }, pt;
struct SDFpoint c = { (float)x, (float)y }, pt = { 0.0f, 0.0f };
float pd = tdist[k], d;
// (-1,-1)
kn = k - 1 - width;
@@ -257,7 +257,7 @@ void sdfBuildNoAlloc(unsigned char* out, int outstride, float maxdist,
for (y = height-2; y > 0 ; y--) {
for (x = width-2; x > 0; x--) {
int k = x+y*width, kn, ch = 0;
struct SDFpoint c = { (float)x, (float)y }, pt;
struct SDFpoint c = { (float)x, (float)y }, pt = { 0.0f, 0.0f };
float pd = tdist[k], d;
// (1,0)
kn = k + 1;