Home | History | Annotate | Download | only in gdx2d

Lines Matching refs:y2

517 static inline void vline(const gdx2d_pixmap* pixmap, int32_t y1, int32_t y2
528 if(y1 > y2) {
530 y1 = y2;
531 y2 = tmp;
535 if(y2 < 0) return;
538 if(y2 >= (int32_t)pixmap->height) y2 = pixmap->height - 1;
539 y2 += 1;
543 while(y1 != y2) {
611 int32_t y2 = y + height - 1;
616 if(y2 < 0) return;
621 if(y2 >= (int32_t)pixmap->height) y2 = pixmap->height - 1;
623 y2++;
624 while(y!=y2) {
663 { if (_y2 > _y1) { edge.y1 = _y1; edge.y2 = _y2; edge.x1 = _x1; edge.x2 = _x2; } \
664 else { edge.y2 = _y1; edge.y1 = _y2; edge.x2 = _x1; edge.x1 = _x2; } }
666 void gdx2d_fill_triangle(const gdx2d_pixmap* pixmap, int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t x3, int32_t y3, uint32_t col) {
673 int32_t y2;
681 if ((x2 - x1) * (y3 - y1) == (x3 - x1) * (y2 - y1)) {
686 EDGE_ASSIGN(edges[0], x1, y1, x2, y2);
688 EDGE_ASSIGN(edges[2], x2, y2, x3, y3);
691 edge0_len = edges[0].y2 - edges[0].y1;
692 edge1_len = edges[1].y2 - edges[1].y1;
693 edge2_len = edges[2].y2 - edges[2].y1;
723 ((float) (edges[0].y2 - edges[0].y1));
725 ((float) (edges[1].y2 - edges[1].y1));
729 bound_y2 = min(edges[1].y2, pixmap->height-1);
735 slope0 * (float) (edges[0].y2 - y) + 0.5);
737 slope1 * (float) (edges[1].y2 - y) + 0.5);
745 if (edges[2].y2 - edges[2].y1 > 0) {
748 ((float) (edges[2].y2 - edges[2].y1));
751 bound_y2 = min(edges[2].y2, pixmap->height-1);
756 slope0 * (float) (edges[0].y2 - y) + 0.5);
758 slope2 * (float) (edges[2].y2 - y) + 0.5);