Merge branch 'master' of https://github.com/memononen/nanovg
This commit is contained in:
commit
2331f1ff11
@ -895,10 +895,14 @@ static int glnvg__convertPaint(GLNVGcontext* gl, GLNVGfragUniforms* frag, NVGpai
|
||||
tex = glnvg__findTexture(gl, paint->image);
|
||||
if (tex == NULL) return 0;
|
||||
if ((tex->flags & NVG_IMAGE_FLIPY) != 0) {
|
||||
float flipped[6];
|
||||
nvgTransformScale(flipped, 1.0f, -1.0f);
|
||||
nvgTransformMultiply(flipped, paint->xform);
|
||||
nvgTransformInverse(invxform, flipped);
|
||||
float m1[6], m2[6];
|
||||
nvgTransformTranslate(m1, 0.0f, frag->extent[1] * 0.5f);
|
||||
nvgTransformMultiply(m1, paint->xform);
|
||||
nvgTransformScale(m2, 1.0f, -1.0f);
|
||||
nvgTransformMultiply(m2, m1);
|
||||
nvgTransformTranslate(m1, 0.0f, -frag->extent[1] * 0.5f);
|
||||
nvgTransformMultiply(m1, m2);
|
||||
nvgTransformInverse(invxform, m1);
|
||||
} else {
|
||||
nvgTransformInverse(invxform, paint->xform);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user