MCPcopy Create free account
hub / github.com/SimHacker/micropolis / TkIncludePoint

Function TkIncludePoint

micropolis-activity/src/tk/tktrig.c:724–748  ·  view source on GitHub ↗

ARGSUSED */

(canvasPtr, itemPtr, pointPtr)

Source from the content-addressed store, hash-verified

722 * None.
723 *
724 * Side effects:
725 * The boudn.
726 *
727 *--------------------------------------------------------------
728 */
729
730 /* ARGSUSED */
731void
732TkIncludePoint(canvasPtr, itemPtr, pointPtr)
733 Tk_Canvas *canvasPtr; /* Canvas containing item. */
734 register Tk_Item *itemPtr; /* Item whose bounding box is
735 * being calculated. */
736 double *pointPtr; /* Address of two doubles giving
737 * x and y coordinates of point. */
738{
739 int tmp;
740
741 tmp = pointPtr[0] + 0.5;
742 if (tmp < itemPtr->x1) {
743 itemPtr->x1 = tmp;
744 }
745 if (tmp > itemPtr->x2) {
746 itemPtr->x2 = tmp;
747 }
748 tmp = pointPtr[1] + 0.5;
749 if (tmp < itemPtr->y1) {
750 itemPtr->y1 = tmp;
751 }

Callers 3

ComputeArcBboxFunction · 0.85
ComputePolygonBboxFunction · 0.85
ComputeLineBboxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected