Tk Source Code

Check-in [39bf9540]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix error in testing argument numbers in 'canvas image' command. Thanks to René Zaumseil.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | canvas_image | tip-489
Files: files | file ages | folders
SHA3-256: 39bf9540a6f2221ced829ff50785fc03890baeb9d80033ee5733dab67c8a6f95
User & Date: fvogel 2018-02-21 20:58:22
Context
2018-03-04
21:45
Merge branch tip-489 following acceptation of this TIP through TCT vote. check-in: afa7b579 user: fvogel tags: trunk
2018-02-21
20:58
Fix error in testing argument numbers in 'canvas image' command. Thanks to RenĂ© Zaumseil. Closed-Leaf check-in: 39bf9540 user: fvogel tags: canvas_image, tip-489
2018-02-10
15:36
Fix formatting in man canvas for the image command check-in: 1633e545 user: fvogel tags: canvas_image, tip-489
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tkCanvas.c.

2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
	CanvasSetOrigin(canvasPtr, canvasPtr->xOrigin, newY);
	break;
    }
    case CANV_IMAGE: {
        Tk_PhotoHandle photohandle;
        int subsample = 1, zoom = 1;

        if (objc < 3 && objc > 5) {
            Tcl_WrongNumArgs(interp, 2, objv, "imagename ?subsample? ?zoom?");
            result = TCL_ERROR;
            goto done;
        }

        if ((photohandle = Tk_FindPhoto(interp, Tcl_GetString(objv[2]) )) == 0) {
            result = TCL_ERROR;






|







2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
	CanvasSetOrigin(canvasPtr, canvasPtr->xOrigin, newY);
	break;
    }
    case CANV_IMAGE: {
        Tk_PhotoHandle photohandle;
        int subsample = 1, zoom = 1;

        if (objc < 3 || objc > 5) {
            Tcl_WrongNumArgs(interp, 2, objv, "imagename ?subsample? ?zoom?");
            result = TCL_ERROR;
            goto done;
        }

        if ((photohandle = Tk_FindPhoto(interp, Tcl_GetString(objv[2]) )) == 0) {
            result = TCL_ERROR;