Lines Matching defs:normals
9667 struct nk_vec2 *normals, *temp;
9670 /* temporary allocate normals + points */
9674 normals = (struct nk_vec2*) nk_buffer_alloc(list->vertices, NK_BUFFER_FRONT, size, pnt_align);
9675 if (!normals) return;
9676 temp = normals + points_count;
9681 /* calculate normals */
9694 normals[i1].x = diff.y;
9695 normals[i1].y = -diff.x;
9699 normals[points_count-1] = normals[points_count-2];
9705 temp[0] = nk_vec2_add(points[0], nk_vec2_muls(normals[0], AA_SIZE));
9706 temp[1] = nk_vec2_sub(points[0], nk_vec2_muls(normals[0], AA_SIZE));
9707 d = nk_vec2_muls(normals[points_count-1], AA_SIZE);
9720 /* average normals */
9721 dm = nk_vec2_muls(nk_vec2_add(normals[i1], normals[i2]), 0.5f);
9754 struct nk_vec2 d1 = nk_vec2_muls(normals[0], half_inner_thickness + AA_SIZE);
9755 struct nk_vec2 d2 = nk_vec2_muls(normals[0], half_inner_thickness);
9762 d1 = nk_vec2_muls(normals[points_count-1], half_inner_thickness + AA_SIZE);
9763 d2 = nk_vec2_muls(normals[points_count-1], half_inner_thickness);
9778 /* average normals */
9779 struct nk_vec2 dm = nk_vec2_muls(nk_vec2_add(normals[i1], normals[i2]), 0.5f);
9817 /* free temporary normals + points */
9901 struct nk_vec2 *normals = 0;
9906 /* temporary allocate normals */
9910 normals = (struct nk_vec2*) nk_buffer_alloc(list->vertices, NK_BUFFER_FRONT, size, pnt_align);
9911 if (!normals) return;
9922 /* compute normals */
9935 normals[i0].x = diff.y;
9936 normals[i0].y = -diff.x;
9942 struct nk_vec2 n0 = normals[i0];
9943 struct nk_vec2 n1 = normals[i1];
9966 /* free temporary normals + points */