GLES2

Check-in [8b437402ec]
Login

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

Overview
Comment:fixes
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:8b437402ecd0504f646a49a77428c2c6cbf63c99
User & Date: arnulf 2013-08-24 14:06:18
Context
2013-08-24
19:02
fixes for rotate check-in: 5081502c76 user: arnulf tags: trunk
14:06
fixes check-in: 8b437402ec user: arnulf tags: trunk
2013-08-23
10:39
initial version check-in: 212a818ac6 user: arnulf tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/gles2Builtin.c.

888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
....
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653

1654
1655
1656
1657
1658
1659
1660
fprintf(stderr, "unexpected default in HotizontalBevel!!\n");
                exit(1);
		break;
	    }
            cmd_obj = Tcl_NewStringObj("::gles2::builtin::fillrectangle", -1);
	    cmd_objv[0] = cmd_obj;
	    if (Tcl_ListObjReplace(interp, obj, 0, 0, 1, cmd_objv) != TCL_OK) {
fprintf(stderr, "VerticalBevel: cannot insert command in front of vertex info\n");
                 exit(1);
	    }
            if (Tcl_EvalObjEx(interp, obj, 0) != TCL_OK) {
fprintf(stderr, "VerticalBevel: error in executing fillrectangle command:%s\n", Tcl_GetStringResult(interp));
                exit(1);
	     }
         }
         x1 += x1Delta;
         x2 += x2Delta;
    }
}
................................................................................
        borderWidth = position_box.width/2;
    }
    if (position_box.height < 2*borderWidth) {
        borderWidth = position_box.height/2;
    }
    VerticalBevel(interp, position_box.x, position_box.y, borderWidth, position_box.height, 1, relief, shadow_colors);
    VerticalBevel(interp, position_box.x+position_box.width-borderWidth, position_box.y, borderWidth, position_box.height, 0, relief, shadow_colors);
    HorizontalBevel(interp, position_box.x, position_box.y, position_box.width, borderWidth, 1, 1, 1, relief, shadow_colors);
    HorizontalBevel(interp, position_box.x, position_box.y, position_box.width, borderWidth, 1, 1, 1, relief, shadow_colors);

    HorizontalBevel(interp, position_box.x, position_box.y+position_box.height-borderWidth, position_box.width, borderWidth, 0, 0, 0, relief, shadow_colors);


    return result;
}

/*
 * ------------------------------------------------------------------------
 *  Gles2_BiDrawDiamondBorderCmd()







|



|







 







|
<
<
|
>







888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
....
1643
1644
1645
1646
1647
1648
1649
1650


1651
1652
1653
1654
1655
1656
1657
1658
1659
fprintf(stderr, "unexpected default in HotizontalBevel!!\n");
                exit(1);
		break;
	    }
            cmd_obj = Tcl_NewStringObj("::gles2::builtin::fillrectangle", -1);
	    cmd_objv[0] = cmd_obj;
	    if (Tcl_ListObjReplace(interp, obj, 0, 0, 1, cmd_objv) != TCL_OK) {
fprintf(stderr, "HorzontalBevel: cannot insert command in front of vertex info\n");
                 exit(1);
	    }
            if (Tcl_EvalObjEx(interp, obj, 0) != TCL_OK) {
fprintf(stderr, "HorzontalBevel: error in executing fillrectangle command:%s\n", Tcl_GetStringResult(interp));
                exit(1);
	     }
         }
         x1 += x1Delta;
         x2 += x2Delta;
    }
}
................................................................................
        borderWidth = position_box.width/2;
    }
    if (position_box.height < 2*borderWidth) {
        borderWidth = position_box.height/2;
    }
    VerticalBevel(interp, position_box.x, position_box.y, borderWidth, position_box.height, 1, relief, shadow_colors);
    VerticalBevel(interp, position_box.x+position_box.width-borderWidth, position_box.y, borderWidth, position_box.height, 0, relief, shadow_colors);
//    HorizontalBevel(interp, position_box.x, position_box.y, position_box.width, borderWidth, 1, 1, 1, relief, shadow_colors);


    HorizontalBevel(interp, position_box.x, position_box.y+position_box.height-borderWidth, position_box.width, borderWidth, 1, 1, 1, relief, shadow_colors);
    HorizontalBevel(interp, position_box.x, position_box.y, position_box.width, borderWidth, 0, 0, 0, relief, shadow_colors);

    return result;
}

/*
 * ------------------------------------------------------------------------
 *  Gles2_BiDrawDiamondBorderCmd()

Changes to generic/gles2Helpers.c.

13
14
15
16
17
18
19

20
21
22
23
24
25
26
...
328
329
330
331
332
333
334

335
336
337
338
339
340
341
342
343
344
345
346
347
...
369
370
371
372
373
374
375
376
377

378
379
380
381
382
383
384
385
#ifdef HAVE_SYS_PARAM_H
#    include <sys/param.h>
#endif
#include <tcl.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>

#include "gles2Int.h"

#define UCHAR(c) ((unsigned char) (c))

#ifdef GLES2_DEBUG
int _gles2_debug_level = 0;
 
................................................................................
    Tcl_Interp *interp,      /* current interpreter */
    Tcl_Obj *obj)            /* value */
{
    const char *string;
    char *rest;
    double d;
    int i;

    int units;
    GLfloat value = 0.0;
    static const double bias[] = {
        10.0,   25.4,   1.0,    0.35278 /*25.4 / 72.0*/
    };



    string = Tcl_GetString(obj);

    d = strtod(string, &rest);
    if (rest == string) {
        goto error;
................................................................................
    default:
        goto error;
    }
    i = (int) d;
    if ((units < 0) && (i == d)) {
        value = d;
    } else {
        value /= bias[units];
    }

    Tcl_SetObjResult(interp, Tcl_NewDoubleObj(value));
    return TCL_OK;

  error:
    if (interp != NULL) {
        Tcl_SetObjResult(interp, Tcl_ObjPrintf(
            "bad screen distance \"%.50s\"", string));
        Tcl_SetErrorCode(interp, "TK", "VALUE", "PIXELS", NULL);







>







 







>



|

<







 







|

>
|







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
...
329
330
331
332
333
334
335
336
337
338
339
340
341

342
343
344
345
346
347
348
...
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
#ifdef HAVE_SYS_PARAM_H
#    include <sys/param.h>
#endif
#include <tcl.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>
#include "gles2Int.h"

#define UCHAR(c) ((unsigned char) (c))

#ifdef GLES2_DEBUG
int _gles2_debug_level = 0;
 
................................................................................
    Tcl_Interp *interp,      /* current interpreter */
    Tcl_Obj *obj)            /* value */
{
    const char *string;
    char *rest;
    double d;
    int i;
    int val;
    int units;
    GLfloat value = 0.0;
    static const double bias[] = {
        1.0,   10.0,   25.4,   1.0,    0.35278 /*25.4 / 72.0*/
    };



    string = Tcl_GetString(obj);

    d = strtod(string, &rest);
    if (rest == string) {
        goto error;
................................................................................
    default:
        goto error;
    }
    i = (int) d;
    if ((units < 0) && (i == d)) {
        value = d;
    } else {
        value = d / bias[units];
    }
    val = round(value * 3.75);
    Tcl_SetObjResult(interp, Tcl_NewIntObj(val));
    return TCL_OK;

  error:
    if (interp != NULL) {
        Tcl_SetObjResult(interp, Tcl_ObjPrintf(
            "bad screen distance \"%.50s\"", string));
        Tcl_SetErrorCode(interp, "TK", "VALUE", "PIXELS", NULL);