Changeset 3529
- Timestamp:
- 05/27/09 07:04:30 (4 years ago)
- File:
-
- 1 edited
-
libpipi/trunk/examples/img2twit.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libpipi/trunk/examples/img2twit.cpp
r3528 r3529 649 649 float fx, fy, fr, fg, fb, fs; 650 650 get_point(i, &fx, &fy, &fr, &fg, &fb, &fs); 651 dt.insert(K::Point_2(fx , fy));651 dt.insert(K::Point_2(fx + dw * RANGE_X, fy + dh * RANGE_Y)); 652 652 /* Keep link to point */ 653 653 lookup[(int)(fx * 2) + dw * RANGE_X * 2 * (int)(fy * 2)] = i; … … 655 655 656 656 /* Add fake points to close the triangulation */ 657 dt.insert(K::Point_2( -dw * RANGE_X, -dh * RANGE_Y));658 dt.insert(K::Point_2( 2 * dw * RANGE_X, -dh * RANGE_Y));659 dt.insert(K::Point_2( -dw * RANGE_X, 2* dh * RANGE_Y));660 dt.insert(K::Point_2( 2 * dw * RANGE_X, 2* dh * RANGE_Y));657 dt.insert(K::Point_2(0, 0)); 658 dt.insert(K::Point_2(3 * dw * RANGE_X, 0)); 659 dt.insert(K::Point_2(0, 3 * dh * RANGE_Y)); 660 dt.insert(K::Point_2(3 * dw * RANGE_X, 3 * dh * RANGE_Y)); 661 661 662 662 for(y = ry; y < ry + rh; y++) … … 664 664 for(x = rx; x < rx + rw; x++) 665 665 { 666 K::Point_2 m((float)x * dw * RANGE_X / p->w ,667 (float)y * dh * RANGE_Y / p->h );666 K::Point_2 m((float)x * dw * RANGE_X / p->w + dw * RANGE_X, 667 (float)y * dh * RANGE_Y / p->h + dh * RANGE_Y); 668 668 Point_coordinate_vector coords; 669 669 CGAL::Triple< … … 680 680 float fx, fy, fr, fg, fb, fs; 681 681 682 fx = (*it).first.x() ;683 fy = (*it).first.y() ;682 fx = (*it).first.x() - dw * RANGE_X; 683 fy = (*it).first.y() - dh * RANGE_Y; 684 684 685 685 if(fx < 0 || fy < 0
Note: See TracChangeset
for help on using the changeset viewer.
