Lines Matching refs:pt1
81 cvClipLine( CvSize img_size, CvPoint* pt1, CvPoint* pt2 )
93 if( !pt1 || !pt2 )
99 x1 = pt1->x; y1 = pt1->y; x2 = pt2->x; y2 = pt2->y;
141 pt1->x = x1;
142 pt1->y = y1;
160 cvInitLineIterator( const CvArr* img, CvPoint pt1, CvPoint pt2,
183 if( (unsigned)pt1.x >= (unsigned)(mat->width) ||
185 (unsigned)pt1.y >= (unsigned)(mat->height) ||
193 dx = pt2.x - pt1.x;
194 dy = pt2.y - pt1.y;
201 pt1.x ^= (pt1.x ^ pt2.x) & s;
202 pt1.y ^= (pt1.y ^ pt2.y) & s;
210 iterator->ptr = (uchar*)(mat->data.ptr + pt1.y * step + pt1.x * bt_pix0);
256 icvLine( CvMat* mat, CvPoint pt1, CvPoint pt2,
259 if( cvClipLine( cvGetMatSize(mat), &pt1, &pt2 ))
270 count = cvInitLineIterator( mat, pt1, pt2, &iterator, connectivity, 1 );
296 icvLineAA( CvMat* img, CvPoint pt1, CvPoint pt2,
315 pt1.x -= XY_ONE*2;
316 pt1.y -= XY_ONE*2;
324 if( !cvClipLine( size, &pt1, &pt2 ))
327 dx = pt2.x - pt1.x;
328 dy = pt2.y - pt1.y;
339 pt1.x ^= pt2.x & j;
340 pt2.x ^= pt1.x & j;
341 pt1.x ^= pt2.x & j;
342 pt1.y ^= pt2.y & j;
343 pt2.y ^= pt1.y & j;
344 pt1.y ^= pt2.y & j;
349 ecount = (pt2.x >> XY_SHIFT) - (pt1.x >> XY_SHIFT);
350 j = -(pt1.x & (XY_ONE - 1));
351 pt1.y += (int) ((((int64) y_step) * j) >> XY_SHIFT) + (XY_ONE >> 1);
356 i = (pt1.x >> (XY_SHIFT - 7)) & 0x78;
363 pt1.x ^= pt2.x & i;
364 pt2.x ^= pt1.x & i;
365 pt1.x ^= pt2.x & i;
366 pt1.y ^= pt2.y & i;
367 pt2.y ^= pt1.y & i;
368 pt1.y ^= pt2.y & i;
373 ecount = (pt2.y >> XY_SHIFT) - (pt1.y >> XY_SHIFT);
374 j = -(pt1.y & (XY_ONE - 1));
375 pt1.x += (int) ((((int64) x_step) * j) >> XY_SHIFT) + (XY_ONE >> 1);
380 i = (pt1.y >> (XY_SHIFT - 7)) & 0x78;
418 ptr += (pt1.x >> XY_SHIFT) * 3;
422 uchar *tptr = ptr + ((pt1.y >> XY_SHIFT) - 1) * step;
426 int a, dist = (pt1.y >> (XY_SHIFT - 5)) & 31;
442 pt1.y += y_step;
450 ptr += (pt1.y >> XY_SHIFT) * step;
454 uchar *tptr = ptr + ((pt1.x >> XY_SHIFT) - 1) * 3;
458 int a, dist = (pt1.x >> (XY_SHIFT - 5)) & 31;
474 pt1.x += x_step;
493 ptr += (pt1.x >> XY_SHIFT);
497 uchar *tptr = ptr + ((pt1.y >> XY_SHIFT) - 1) * step;
501 int a, dist = (pt1.y >> (XY_SHIFT - 5)) & 31;
517 pt1.y += y_step;
525 ptr += (pt1.y >> XY_SHIFT) * step;
529 uchar *tptr = ptr + ((pt1.x >> XY_SHIFT) - 1);
533 int a, dist = (pt1.x >> (XY_SHIFT - 5)) & 31;
549 pt1.x += x_step;
561 icvLine2( CvMat* img, CvPoint pt1, CvPoint pt2, const void* color )
578 pt1.x -= XY_ONE*2;
579 pt1.y -= XY_ONE*2;
587 if( !cvClipLine( size, &pt1, &pt2 ))
590 dx = pt2.x - pt1.x;
591 dy = pt2.y - pt1.y;
602 pt1.x ^= pt2.x & j;
603 pt2.x ^= pt1.x & j;
604 pt1.x ^= pt2.x & j;
605 pt1.y ^= pt2.y & j;
606 pt2.y ^= pt1.y & j;
607 pt1.y ^= pt2.y & j;
611 ecount = (pt2.x - pt1.x) >> XY_SHIFT;
617 pt1.x ^= pt2.x & i;
618 pt2.x ^= pt1.x & i;
619 pt1.x ^= pt2.x & i;
620 pt1.y ^= pt2.y & i;
621 pt2.y ^= pt1.y & i;
622 pt1.y ^= pt2.y & i;
626 ecount = (pt2.y - pt1.y) >> XY_SHIFT;
629 pt1.x += (XY_ONE >> 1);
630 pt1.y += (XY_ONE >> 1);
647 ptr += (pt1.x >> XY_SHIFT) * 3;
651 tptr = ptr + (pt1.y >> XY_SHIFT) * step;
653 pt1.y += y_step;
660 ptr += (pt1.y >> XY_SHIFT) * step;
664 tptr = ptr + (pt1.x >> XY_SHIFT) * 3;
666 pt1.x += x_step;
687 ptr += (pt1.x >> XY_SHIFT);
691 tptr = ptr + (pt1.y >> XY_SHIFT) * step;
693 pt1.y += y_step;
700 ptr += (pt1.y >> XY_SHIFT) * step;
704 tptr = ptr + (pt1.x >> XY_SHIFT);
706 pt1.x += x_step;
725 ptr += (pt1.x >> XY_SHIFT) * pix_size;
729 tptr = ptr + (pt1.y >> XY_SHIFT) * step;
731 pt1.y += y_step;
738 ptr += (pt1.y >> XY_SHIFT) * step;
742 tptr = ptr + (pt1.x >> XY_SHIFT) * pix_size;
744 pt1.x += x_step;
1041 CvPoint pt0, pt1;
1044 pt1.x = p.x >> XY_SHIFT;
1045 pt1.y = p.y >> XY_SHIFT;
1046 icvLine( img, pt0, pt1, color, line_type );
1166 CvPoint pt0, pt1, t0, t1;
1168 CV_READ_EDGE( pt0, pt1, reader );
1174 pt1.x = (pt1.x + offset.x) << (XY_SHIFT - shift);
1175 pt1.y = (pt1.y + delta) >> shift;
1185 x.i = pt1.x; y.i = pt1.y;
1186 pt1.x = cvRound((x.f + offset.x) * XY_ONE);
1187 pt1.y = cvRound(y.f + offset.y);
1192 t0.y = pt0.y; t1.y = pt1.y;
1194 t1.x = (pt1.x + (XY_ONE >> 1)) >> XY_SHIFT;
1199 t0.x = pt0.x; t1.x = pt1.x;
1201 t1.y = pt1.y << XY_SHIFT;
1205 if( pt0.y == pt1.y )
1208 if( pt0.y > pt1.y )
1209 CV_SWAP( pt0, pt1, t0 );
1212 bounds.height = MAX( bounds.height, pt1.y );
1214 if( pt0.x < pt1.x )
1217 bounds.width = MAX( bounds.width, pt1.x );
1221 bounds.x = MIN( bounds.x, pt1.x );
1226 edge.y1 = pt1.y;
1228 edge.dx = (pt1.x - pt0.x) / (pt1.y - pt0.y);
1737 cvLine( void* img, CvPoint pt1, CvPoint pt2, CvScalar color,
1763 icvThickLine( mat, pt1, pt2, buf, thickness, line_type, 3, shift );
1770 cvRectangle( void* img, CvPoint pt1, CvPoint pt2,
1800 pt[0] = pt1;
1802 pt[1].y = pt1.y;
1804 pt[3].x = pt1.x;
2539 CvPoint pt1, pt2;
2545 CV_READ_SEQ_ELEM( pt1, reader );
2546 pt1.x += offset.x;
2547 pt1.y += offset.y;
2553 pt1.x = cvRound( (pt1f.x + offset.x) * XY_ONE );
2554 pt1.y = cvRound( (pt1f.y + offset.y) * XY_ONE );
2573 icvThickLine( mat, pt1, pt2, clr, thickness, line_type, 2, shift );
2574 pt1 = pt2;