Import Tk 8.6.11
This commit is contained in:
@@ -352,8 +352,8 @@ ArcCoords(
|
||||
objs[2] = Tcl_NewDoubleObj(arcPtr->bbox[2]);
|
||||
objs[3] = Tcl_NewDoubleObj(arcPtr->bbox[3]);
|
||||
Tcl_SetObjResult(interp, Tcl_NewListObj(4, objs));
|
||||
} else if ((objc == 1)||(objc == 4)) {
|
||||
if (objc==1) {
|
||||
} else if ((objc == 1) || (objc == 4)) {
|
||||
if (objc == 1) {
|
||||
if (Tcl_ListObjGetElements(interp, objv[0], &objc,
|
||||
(Tcl_Obj ***) &objv) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
@@ -510,7 +510,7 @@ ConfigureArc(
|
||||
if (arcPtr->disabledFillStipple!=None) {
|
||||
stipple = arcPtr->disabledFillStipple;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (arcPtr->style == ARC_STYLE) {
|
||||
newGC = NULL;
|
||||
@@ -576,11 +576,11 @@ ConfigureArc(
|
||||
|
||||
static void
|
||||
DeleteArc(
|
||||
Tk_Canvas canvas, /* Info about overall canvas. */
|
||||
TCL_UNUSED(Tk_Canvas), /* Info about overall canvas. */
|
||||
Tk_Item *itemPtr, /* Item that is being deleted. */
|
||||
Display *display) /* Display containing window for canvas. */
|
||||
{
|
||||
ArcItem *arcPtr = (ArcItem *) itemPtr;
|
||||
ArcItem *arcPtr = (ArcItem *)itemPtr;
|
||||
|
||||
Tk_DeleteOutline(display, &(arcPtr->outline));
|
||||
if (arcPtr->numOutlinePoints != 0) {
|
||||
@@ -626,7 +626,6 @@ DeleteArc(
|
||||
*--------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
ComputeArcBbox(
|
||||
Tk_Canvas canvas, /* Canvas that contains item. */
|
||||
@@ -663,13 +662,13 @@ ComputeArcBbox(
|
||||
*/
|
||||
|
||||
if (arcPtr->bbox[1] > arcPtr->bbox[3]) {
|
||||
double tmp = arcPtr->bbox[3];
|
||||
tmp = arcPtr->bbox[3];
|
||||
|
||||
arcPtr->bbox[3] = arcPtr->bbox[1];
|
||||
arcPtr->bbox[1] = tmp;
|
||||
}
|
||||
if (arcPtr->bbox[0] > arcPtr->bbox[2]) {
|
||||
double tmp = arcPtr->bbox[2];
|
||||
tmp = arcPtr->bbox[2];
|
||||
|
||||
arcPtr->bbox[2] = arcPtr->bbox[0];
|
||||
arcPtr->bbox[0] = tmp;
|
||||
@@ -678,7 +677,7 @@ ComputeArcBbox(
|
||||
ComputeArcOutline(canvas,arcPtr);
|
||||
|
||||
/*
|
||||
* To compute the bounding box, start with the the bbox formed by the two
|
||||
* To compute the bounding box, start with the bbox formed by the two
|
||||
* endpoints of the arc. Then add in the center of the arc's oval (if
|
||||
* relevant) and the 3-o'clock, 6-o'clock, 9-o'clock, and 12-o'clock
|
||||
* positions, if they are relevant.
|
||||
@@ -769,8 +768,10 @@ DisplayArc(
|
||||
Tk_Item *itemPtr, /* Item to be displayed. */
|
||||
Display *display, /* Display on which to draw item. */
|
||||
Drawable drawable, /* Pixmap or window in which to draw item. */
|
||||
int x, int y, /* Describes region of canvas that must be */
|
||||
int width, int height) /* redisplayed (not used). */
|
||||
TCL_UNUSED(int), /* Describes region of canvas that must be */
|
||||
TCL_UNUSED(int), /* redisplayed (not used). */
|
||||
TCL_UNUSED(int),
|
||||
TCL_UNUSED(int))
|
||||
{
|
||||
ArcItem *arcPtr = (ArcItem *) itemPtr;
|
||||
short x1, y1, x2, y2;
|
||||
@@ -942,7 +943,6 @@ DisplayArc(
|
||||
*--------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ARGSUSED */
|
||||
static double
|
||||
ArcToPoint(
|
||||
Tk_Canvas canvas, /* Canvas containing item. */
|
||||
@@ -1107,7 +1107,6 @@ ArcToPoint(
|
||||
*--------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
ArcToArea(
|
||||
Tk_Canvas canvas, /* Canvas containing item. */
|
||||
@@ -1447,7 +1446,7 @@ ComputeArcOutline(
|
||||
*/
|
||||
|
||||
if (arcPtr->numOutlinePoints == 0) {
|
||||
arcPtr->outlinePtr = ckalloc(26 * sizeof(double));
|
||||
arcPtr->outlinePtr = (double *)ckalloc(26 * sizeof(double));
|
||||
arcPtr->numOutlinePoints = 22;
|
||||
}
|
||||
outlinePtr = arcPtr->outlinePtr;
|
||||
@@ -1461,7 +1460,7 @@ ComputeArcOutline(
|
||||
* curved arc segment, which are marked with X's in the figure below:
|
||||
*
|
||||
*
|
||||
* * * *
|
||||
* * * *
|
||||
* * *
|
||||
* * * * *
|
||||
* * * * *
|
||||
@@ -1814,7 +1813,7 @@ ArcToPostscript(
|
||||
Tcl_Interp *interp, /* Leave Postscript or error message here. */
|
||||
Tk_Canvas canvas, /* Information about overall canvas. */
|
||||
Tk_Item *itemPtr, /* Item for which Postscript is wanted. */
|
||||
int prepass) /* 1 means this is a prepass to collect font
|
||||
TCL_UNUSED(int)) /* 1 means this is a prepass to collect font
|
||||
* information; 0 means final Postscript is
|
||||
* being created. */
|
||||
{
|
||||
@@ -2028,17 +2027,16 @@ ArcToPostscript(
|
||||
|
||||
static int
|
||||
StyleParseProc(
|
||||
ClientData clientData, /* some flags.*/
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Used for reporting errors. */
|
||||
Tk_Window tkwin, /* Window containing canvas widget. */
|
||||
TCL_UNUSED(Tk_Window), /* Window containing canvas widget. */
|
||||
const char *value, /* Value of option. */
|
||||
char *widgRec, /* Pointer to record for item. */
|
||||
int offset) /* Offset into item. */
|
||||
{
|
||||
int c;
|
||||
size_t length;
|
||||
|
||||
register Style *stylePtr = (Style *) (widgRec + offset);
|
||||
Style *stylePtr = (Style *) (widgRec + offset);
|
||||
|
||||
if (value == NULL || *value == 0) {
|
||||
*stylePtr = PIESLICE_STYLE;
|
||||
@@ -2092,15 +2090,15 @@ StyleParseProc(
|
||||
|
||||
static const char *
|
||||
StylePrintProc(
|
||||
ClientData clientData, /* Ignored. */
|
||||
Tk_Window tkwin, /* Ignored. */
|
||||
TCL_UNUSED(void *), /* Ignored. */
|
||||
TCL_UNUSED(Tk_Window), /* Ignored. */
|
||||
char *widgRec, /* Pointer to record for item. */
|
||||
int offset, /* Offset into item. */
|
||||
Tcl_FreeProc **freeProcPtr) /* Pointer to variable to fill in with
|
||||
TCL_UNUSED(Tcl_FreeProc **)) /* Pointer to variable to fill in with
|
||||
* information about how to reclaim storage
|
||||
* for return string. */
|
||||
{
|
||||
register Style *stylePtr = (Style *) (widgRec + offset);
|
||||
Style *stylePtr = (Style *) (widgRec + offset);
|
||||
|
||||
if (*stylePtr == ARC_STYLE) {
|
||||
return "arc";
|
||||
|
||||
Reference in New Issue
Block a user