Tk Source Code

Attachment Details
Login
Overview

Artifact ID: 616a9ed31fabf4d941c997c304d9f84ee9a36c05
Ticket: 1493260fffffffffffffffffffffffffffffffff
Date: 2006-05-23 05:51:52
User: eabrek
Artifact Attached: cbc1d70328167a255cb6db994f63e9c2c0b52a87
Filename:fix220787.txt
Description:Diff of repo and fixed file
Content:
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
1153,1224c1153,1160
< 
<         if( (gc->fill_style == FillStippled ||
<              gc->fill_style == FillOpaqueStippled) &&
<             gc->stipple != None)
<         {
<             COLORREF oldBkClr, oldTxClr;
<             HDC dcMem, dcMask;
<             HBRUSH stipple;
<             HPEN fillPen;
<             HBITMAP oldBitmap, bitmap, bmpMask, oldBmpMask;
<             TkWinDrawable *twdPtr = (TkWinDrawable *)gc->stipple;
<        	    fillPen = CreatePen(PS_NULL, 0, 0);
< 
<             if (twdPtr->type != TWD_BITMAP) {
< 	        panic("unexpected drawable type in stipple");
<             }
< 
<             if( gc->fill_style != FillOpaqueStippled )
< 	       SetBkMode(dc, TRANSPARENT);
< 
<             dcMem  = CreateCompatibleDC(dc);
<             dcMask = CreateCompatibleDC(dc);
<             bitmap  = CreateCompatibleBitmap(dc, x+width, y+height);
<             bmpMask = CreateCompatibleBitmap(dc, x+width, y+height);
<             oldBitmap  = SelectObject(dcMem, bitmap);
<             oldBmpMask = SelectObject(dcMask, bmpMask);
<             SelectObject(dcMem, fillPen);
<             SelectObject(dcMask, fillPen);
< 
<             brush = CreateSolidBrush(gc->foreground);
<             SelectObject(dcMem, brush);
< 
<             if (gc->arc_mode == ArcChord) {
< 	        Chord(dcMem, x, y, x+width+1, y+height+1, xstart, ystart, xend, yend);
<             } else if ( gc->arc_mode == ArcPieSlice ) {
< 	        Pie(dcMem, x, y, x+width+1, y+height+1, xstart, ystart, xend, yend);
<             }
< 
<             stipple = CreatePatternBrush(twdPtr->bitmap.handle);
<             SelectObject(dcMask, stipple);
<             if (gc->arc_mode == ArcChord) {
< 	        Chord(dcMask, x, y, x+width+1, y+height+1, xstart, ystart, xend, yend);
<             } else if ( gc->arc_mode == ArcPieSlice ) {
< 	        Pie(dcMask, x, y, x+width+1, y+height+1, xstart, ystart, xend, yend);
<             }
< 
<             oldBkClr = SetBkColor(dc, 0xffffff);
<             oldTxClr = SetTextColor(dc, 0);
<             BitBlt(dc, x, y, width, height, dcMem, x, y, SRCINVERT);
<             BitBlt(dc, x, y, width, height, dcMask, x, y, NOTSRCAND);
<             BitBlt(dc, x, y, width, height, dcMem, x, y, SRCINVERT);
<             SetBkColor(dc, oldBkClr);
<             SetTextColor(dc, oldTxClr);
< 
<             DeleteObject(fillPen);
<             DeleteObject(stipple);
<             DeleteObject(brush);
<             DeleteObject(bmpMask);
<             DeleteObject(bitmap);
<             DeleteDC(dcMask);
<             DeleteDC(dcMem);
< 
<         } else {
< 	    brush = CreateSolidBrush(gc->foreground);
< 	    oldBrush = SelectObject(dc, brush);
< 	    if (gc->arc_mode == ArcChord) {
< 	        Chord(dc, x, y, x+width+1, y+height+1, xstart, ystart, xend, yend);
< 	    } else if ( gc->arc_mode == ArcPieSlice ) {
< 	        Pie(dc, x, y, x+width+1, y+height+1, xstart, ystart, xend, yend);
< 	    }
< 	    DeleteObject(SelectObject(dc, oldBrush));
<         }
---
> 	brush = CreateSolidBrush(gc->foreground);
> 	oldBrush = SelectObject(dc, brush);
> 	if (gc->arc_mode == ArcChord) {
> 	    Chord(dc, x, y, x+width+1, y+height+1, xstart, ystart, xend, yend);
> 	} else if ( gc->arc_mode == ArcPieSlice ) {
> 	    Pie(dc, x, y, x+width+1, y+height+1, xstart, ystart, xend, yend);
> 	}
> 	DeleteObject(SelectObject(dc, oldBrush));
1252,1254d1187
<     if( gc->line_width == 0 )
< 	return CreatePen(PS_NULL, 0, 0);
<