memononen / nanovg

Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.
zlib License
5.06k stars 767 forks source link

xform undeclared #602

Open mxmilkiib opened 3 years ago

mxmilkiib commented 3 years ago

Hi, I'm using nanovg-git in the AUR, getting this on trying to build atm;

...
../src/stb_image.h:4075:13: note: in expansion of macro ‘CASE’
 4075 |             CASE(STBI__F_paeth_first)  cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-out_n],0,0)); break;
      |             ^~~~
../src/stb_image.h:4075:105: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
 4075 |             CASE(STBI__F_paeth_first)  cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-out_n],0,0)); break;
      |                                                                                                         ^~~~~
../src/nanovg.c: In function ‘nvgText’:
../src/nanovg.c:2473:42: error: ‘xform’ undeclared (first use in this function)
 2473 |  int isFlipped = nvg__isTransformFlipped(xform);
      |                                          ^~~~~
../src/nanovg.c:2473:42: note: each undeclared identifier is reported only once for each function it appears in
In file included from ../src/nanovg.c:30:
../src/stb_image.h: In function ‘stbi__tga_get_comp’:
../src/stb_image.h:4856:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
 4856 |       case 16: if(is_grey) return STBI_grey_alpha;
      |                  ^
../src/stb_image.h:4858:7: note: here
 4858 |       case 15: if(is_rgb16) *is_rgb16 = 1;
      |       ^~~~
make[1]: *** [nanovg.make:237: obj/native/Release/nanovg.o] Error 1
make: *** [Makefile:39: nanovg] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
error making: nanovg-git
mulle-nat commented 3 years ago

I probably messed that up trying to accomodate style changes. The line in nanovg should read:

int isFlipped = nvg__isTransformFlipped(state->xform);