Lines Matching refs:polygon_info

451 static void LogPolygonInfo(const PolygonInfo *polygon_info)  in LogPolygonInfo()  argument
461 p=polygon_info->edges; in LogPolygonInfo()
462 for (i=0; i < (ssize_t) polygon_info->number_edges; i++) in LogPolygonInfo()
508 *polygon_info; in ConvertPathToPolygon() local
528 polygon_info=(PolygonInfo *) AcquireMagickMemory(sizeof(*polygon_info)); in ConvertPathToPolygon()
529 if (polygon_info == (PolygonInfo *) NULL) in ConvertPathToPolygon()
532 polygon_info->edges=(EdgeInfo *) AcquireQuantumMemory(number_edges, in ConvertPathToPolygon()
533 sizeof(*polygon_info->edges)); in ConvertPathToPolygon()
534 if (polygon_info->edges == (EdgeInfo *) NULL) in ConvertPathToPolygon()
536 (void) memset(polygon_info->edges,0,number_edges* in ConvertPathToPolygon()
537 sizeof(*polygon_info->edges)); in ConvertPathToPolygon()
546 polygon_info->edges[edge].number_points=(size_t) n; in ConvertPathToPolygon()
547 polygon_info->edges[edge].scanline=0.0; in ConvertPathToPolygon()
548 polygon_info->edges[edge].highwater=0; in ConvertPathToPolygon()
549 polygon_info->edges[edge].ghostline=ghostline; in ConvertPathToPolygon()
550 polygon_info->edges[edge].direction=(ssize_t) direction; in ConvertPathToPolygon()
551 polygon_info->edges[edge].points=points; in ConvertPathToPolygon()
552 polygon_info->edges[edge].bounds=bounds; in ConvertPathToPolygon()
553 polygon_info->number_edges=0; in ConvertPathToPolygon()
567 polygon_info->edges=(EdgeInfo *) ResizeQuantumMemory( in ConvertPathToPolygon()
568 polygon_info->edges,(size_t) number_edges, in ConvertPathToPolygon()
569 sizeof(*polygon_info->edges)); in ConvertPathToPolygon()
570 if (polygon_info->edges == (EdgeInfo *) NULL) in ConvertPathToPolygon()
573 polygon_info->edges[edge].number_points=(size_t) n; in ConvertPathToPolygon()
574 polygon_info->edges[edge].scanline=(-1.0); in ConvertPathToPolygon()
575 polygon_info->edges[edge].highwater=0; in ConvertPathToPolygon()
576 polygon_info->edges[edge].ghostline=ghostline; in ConvertPathToPolygon()
577 polygon_info->edges[edge].direction=(ssize_t) (direction > 0); in ConvertPathToPolygon()
580 polygon_info->edges[edge].points=points; in ConvertPathToPolygon()
581 polygon_info->edges[edge].bounds=bounds; in ConvertPathToPolygon()
582 polygon_info->edges[edge].bounds.y1=points[0].y; in ConvertPathToPolygon()
583 polygon_info->edges[edge].bounds.y2=points[n-1].y; in ConvertPathToPolygon()
621 polygon_info->edges=(EdgeInfo *) ResizeQuantumMemory( in ConvertPathToPolygon()
622 polygon_info->edges,(size_t) number_edges, in ConvertPathToPolygon()
623 sizeof(*polygon_info->edges)); in ConvertPathToPolygon()
624 if (polygon_info->edges == (EdgeInfo *) NULL) in ConvertPathToPolygon()
627 polygon_info->edges[edge].number_points=(size_t) n; in ConvertPathToPolygon()
628 polygon_info->edges[edge].scanline=(-1.0); in ConvertPathToPolygon()
629 polygon_info->edges[edge].highwater=0; in ConvertPathToPolygon()
630 polygon_info->edges[edge].ghostline=ghostline; in ConvertPathToPolygon()
631 polygon_info->edges[edge].direction=(ssize_t) (direction > 0); in ConvertPathToPolygon()
634 polygon_info->edges[edge].points=points; in ConvertPathToPolygon()
635 polygon_info->edges[edge].bounds=bounds; in ConvertPathToPolygon()
636 polygon_info->edges[edge].bounds.y1=points[0].y; in ConvertPathToPolygon()
637 polygon_info->edges[edge].bounds.y2=points[n-1].y; in ConvertPathToPolygon()
678 polygon_info->edges=(EdgeInfo *) ResizeQuantumMemory( in ConvertPathToPolygon()
679 polygon_info->edges,(size_t) number_edges, in ConvertPathToPolygon()
680 sizeof(*polygon_info->edges)); in ConvertPathToPolygon()
681 if (polygon_info->edges == (EdgeInfo *) NULL) in ConvertPathToPolygon()
684 polygon_info->edges[edge].number_points=(size_t) n; in ConvertPathToPolygon()
685 polygon_info->edges[edge].scanline=(-1.0); in ConvertPathToPolygon()
686 polygon_info->edges[edge].highwater=0; in ConvertPathToPolygon()
687 polygon_info->edges[edge].ghostline=ghostline; in ConvertPathToPolygon()
688 polygon_info->edges[edge].direction=(ssize_t) (direction > 0); in ConvertPathToPolygon()
691 polygon_info->edges[edge].points=points; in ConvertPathToPolygon()
692 polygon_info->edges[edge].bounds=bounds; in ConvertPathToPolygon()
693 polygon_info->edges[edge].bounds.y1=points[0].y; in ConvertPathToPolygon()
694 polygon_info->edges[edge].bounds.y2=points[n-1].y; in ConvertPathToPolygon()
699 polygon_info->number_edges=edge; in ConvertPathToPolygon()
700 qsort(polygon_info->edges,(size_t) polygon_info->number_edges, in ConvertPathToPolygon()
701 sizeof(*polygon_info->edges),DrawCompareEdges); in ConvertPathToPolygon()
703 LogPolygonInfo(polygon_info); in ConvertPathToPolygon()
704 return(polygon_info); in ConvertPathToPolygon()
950 static size_t DestroyEdge(PolygonInfo *polygon_info, in DestroyEdge() argument
953 assert(edge < polygon_info->number_edges); in DestroyEdge()
954 polygon_info->edges[edge].points=(PointInfo *) RelinquishMagickMemory( in DestroyEdge()
955 polygon_info->edges[edge].points); in DestroyEdge()
956 polygon_info->number_edges--; in DestroyEdge()
957 if (edge < polygon_info->number_edges) in DestroyEdge()
958 (void) memmove(polygon_info->edges+edge,polygon_info->edges+edge+1, in DestroyEdge()
959 (size_t) (polygon_info->number_edges-edge)*sizeof(*polygon_info->edges)); in DestroyEdge()
960 return(polygon_info->number_edges); in DestroyEdge()
985 static PolygonInfo *DestroyPolygonInfo(PolygonInfo *polygon_info) in DestroyPolygonInfo() argument
990 for (i=0; i < (ssize_t) polygon_info->number_edges; i++) in DestroyPolygonInfo()
991 polygon_info->edges[i].points=(PointInfo *) in DestroyPolygonInfo()
992 RelinquishMagickMemory(polygon_info->edges[i].points); in DestroyPolygonInfo()
993 polygon_info->edges=(EdgeInfo *) RelinquishMagickMemory(polygon_info->edges); in DestroyPolygonInfo()
994 return((PolygonInfo *) RelinquishMagickMemory(polygon_info)); in DestroyPolygonInfo()
1324 const DrawInfo *draw_info,const PolygonInfo *polygon_info, in DrawBoundingRectangles() argument
1384 if (polygon_info != (PolygonInfo *) NULL) in DrawBoundingRectangles()
1386 bounds=polygon_info->edges[0].bounds; in DrawBoundingRectangles()
1387 for (i=1; i < (ssize_t) polygon_info->number_edges; i++) in DrawBoundingRectangles()
1389 if (polygon_info->edges[i].bounds.x1 < (double) bounds.x1) in DrawBoundingRectangles()
1390 bounds.x1=polygon_info->edges[i].bounds.x1; in DrawBoundingRectangles()
1391 if (polygon_info->edges[i].bounds.y1 < (double) bounds.y1) in DrawBoundingRectangles()
1392 bounds.y1=polygon_info->edges[i].bounds.y1; in DrawBoundingRectangles()
1393 if (polygon_info->edges[i].bounds.x2 > (double) bounds.x2) in DrawBoundingRectangles()
1394 bounds.x2=polygon_info->edges[i].bounds.x2; in DrawBoundingRectangles()
1395 if (polygon_info->edges[i].bounds.y2 > (double) bounds.y2) in DrawBoundingRectangles()
1396 bounds.y2=polygon_info->edges[i].bounds.y2; in DrawBoundingRectangles()
1410 for (i=0; i < (ssize_t) polygon_info->number_edges; i++) in DrawBoundingRectangles()
1412 if (polygon_info->edges[i].direction != 0) in DrawBoundingRectangles()
1420 start.x=(double) (polygon_info->edges[i].bounds.x1-mid); in DrawBoundingRectangles()
1421 start.y=(double) (polygon_info->edges[i].bounds.y1-mid); in DrawBoundingRectangles()
1422 end.x=(double) (polygon_info->edges[i].bounds.x2+mid); in DrawBoundingRectangles()
1423 end.y=(double) (polygon_info->edges[i].bounds.y2+mid); in DrawBoundingRectangles()
1433 if (i < (ssize_t) polygon_info->number_edges) in DrawBoundingRectangles()
4500 static PolygonInfo **DestroyPolygonThreadSet(PolygonInfo **polygon_info) in DestroyPolygonThreadSet() argument
4505 assert(polygon_info != (PolygonInfo **) NULL); in DestroyPolygonThreadSet()
4507 if (polygon_info[i] != (PolygonInfo *) NULL) in DestroyPolygonThreadSet()
4508 polygon_info[i]=DestroyPolygonInfo(polygon_info[i]); in DestroyPolygonThreadSet()
4509 polygon_info=(PolygonInfo **) RelinquishMagickMemory(polygon_info); in DestroyPolygonThreadSet()
4510 return(polygon_info); in DestroyPolygonThreadSet()
4520 **polygon_info; in AcquirePolygonThreadSet() local
4529 polygon_info=(PolygonInfo **) AcquireQuantumMemory(number_threads, in AcquirePolygonThreadSet()
4530 sizeof(*polygon_info)); in AcquirePolygonThreadSet()
4531 if (polygon_info == (PolygonInfo **) NULL) in AcquirePolygonThreadSet()
4533 (void) memset(polygon_info,0,number_threads*sizeof(*polygon_info)); in AcquirePolygonThreadSet()
4536 return(DestroyPolygonThreadSet(polygon_info)); in AcquirePolygonThreadSet()
4539 polygon_info[i]=ConvertPathToPolygon(path_info); in AcquirePolygonThreadSet()
4540 if (polygon_info[i] == (PolygonInfo *) NULL) in AcquirePolygonThreadSet()
4541 return(DestroyPolygonThreadSet(polygon_info)); in AcquirePolygonThreadSet()
4544 return(polygon_info); in AcquirePolygonThreadSet()
4547 static double GetFillAlpha(PolygonInfo *polygon_info,const double mid, in GetFillAlpha() argument
4578 p=polygon_info->edges; in GetFillAlpha()
4579 for (j=0; j < (ssize_t) polygon_info->number_edges; j++, p++) in GetFillAlpha()
4585 (void) DestroyEdge(polygon_info,(size_t) j); in GetFillAlpha()
4687 p=polygon_info->edges; in GetFillAlpha()
4688 for (j=0; j < (ssize_t) polygon_info->number_edges; j++, p++) in GetFillAlpha()
4733 **magick_restrict polygon_info; in DrawPolygonPrimitive() local
4761 polygon_info=AcquirePolygonThreadSet(primitive_info); in DrawPolygonPrimitive()
4762 if (polygon_info == (PolygonInfo **) NULL) in DrawPolygonPrimitive()
4767 status=DrawBoundingRectangles(image,draw_info,polygon_info[0],exception); in DrawPolygonPrimitive()
4770 polygon_info=DestroyPolygonThreadSet(polygon_info); in DrawPolygonPrimitive()
4780 bounds=polygon_info[0]->edges[0].bounds; in DrawPolygonPrimitive()
4781 for (i=1; i < (ssize_t) polygon_info[0]->number_edges; i++) in DrawPolygonPrimitive()
4783 p=polygon_info[0]->edges+i; in DrawPolygonPrimitive()
4801 polygon_info=DestroyPolygonThreadSet(polygon_info); in DrawPolygonPrimitive()
4815 (polygon_info[0]->number_edges == 0)) in DrawPolygonPrimitive()
4872 polygon_info=DestroyPolygonThreadSet(polygon_info); in DrawPolygonPrimitive()
4926 fill_alpha=GetFillAlpha(polygon_info[id],mid,fill,draw_info->fill_rule, in DrawPolygonPrimitive()
4945 polygon_info=DestroyPolygonThreadSet(polygon_info); in DrawPolygonPrimitive()