|
|
|
|
@ -192,10 +192,10 @@ class TTkCanvas:
|
|
|
|
|
else: |
|
|
|
|
self._colors[y][x+i] = colors[i].mod(x+i,y) |
|
|
|
|
# Check the full wide chars on the edge of the two canvasses |
|
|
|
|
if 0 <= (x+a) < self._width and self._data[y][x+a] == '': |
|
|
|
|
if ((0 <= (x+a) < self._width) and self._data[y][x+a] == ''): |
|
|
|
|
self._data[y][x+a] = TTkCfg.theme.unicodeWideOverflowCh[0] |
|
|
|
|
self._colors[y][x+a] = TTkCfg.theme.unicodeWideOverflowColor |
|
|
|
|
if 0 <= (x+b-1) < self._width and TTkString._isWideCharData(self._data[y][x+b-1]): |
|
|
|
|
if ((0 <= (x+b-1) < self._width) and TTkString._isWideCharData(self._data[y][x+b-1])): |
|
|
|
|
self._data[y][x+b-1] = TTkCfg.theme.unicodeWideOverflowCh[1] |
|
|
|
|
self._colors[y][x+b-1] = TTkCfg.theme.unicodeWideOverflowColor |
|
|
|
|
|
|
|
|
|
@ -598,15 +598,10 @@ class TTkCanvas:
|
|
|
|
|
w = min(w,self._width-x) |
|
|
|
|
h = min(h,self._height-y) |
|
|
|
|
|
|
|
|
|
# if x>=self._width: x=self._width-1 |
|
|
|
|
# if y>=self._height: y=self._height-1 |
|
|
|
|
# if w>=self._width-x: w=self._width-x |
|
|
|
|
# if h>=self._height-y: h=self._height-y |
|
|
|
|
|
|
|
|
|
xoffset = 0 if x>=bx else bx-x |
|
|
|
|
yoffset = 0 if y>=by else by-y |
|
|
|
|
wslice = w if x+w < bx+bw else bx+bw-x |
|
|
|
|
hslice = h if y+h < by+bh else by+bh-y |
|
|
|
|
xoffset = min(max(0,bx-x),canvas._width-1) |
|
|
|
|
yoffset = min(max(0,by-y),canvas._height-1) |
|
|
|
|
wslice = min(w if x+w < bx+bw else bx+bw-x,canvas._width) |
|
|
|
|
hslice = min(h if y+h < by+bh else by+bh-y,canvas._height) |
|
|
|
|
|
|
|
|
|
for iy in range(yoffset,hslice): |
|
|
|
|
a, b = x+xoffset, x+wslice |
|
|
|
|
@ -614,16 +609,16 @@ class TTkCanvas:
|
|
|
|
|
self._colors[y+iy][a:b] = canvas._colors[iy][xoffset:wslice] |
|
|
|
|
|
|
|
|
|
# Check the full wide chars on the edge of the two canvasses |
|
|
|
|
if 0 <= a < self._width and self._data[y+iy][a]=='': |
|
|
|
|
if ((0 <= a < self._width) and self._data[y+iy][a]==''): |
|
|
|
|
self._data[y+iy][a] = TTkCfg.theme.unicodeWideOverflowCh[0] |
|
|
|
|
self._colors[y+iy][a] = TTkCfg.theme.unicodeWideOverflowColor |
|
|
|
|
if 0 < b <= self._width and TTkString._isWideCharData(self._data[y+iy][b-1]): |
|
|
|
|
if ((0 < b <= self._width) and TTkString._isWideCharData(self._data[y+iy][b-1])): |
|
|
|
|
self._data[y+iy][b-1] = TTkCfg.theme.unicodeWideOverflowCh[1] |
|
|
|
|
self._colors[y+iy][b-1] = TTkCfg.theme.unicodeWideOverflowColor |
|
|
|
|
if 0 < a <= self._width and TTkString._isWideCharData(self._data[y+iy][a-1]): |
|
|
|
|
if ((0 < a <= self._width) and TTkString._isWideCharData(self._data[y+iy][a-1])): |
|
|
|
|
self._data[y+iy][a-1] = TTkCfg.theme.unicodeWideOverflowCh[1] |
|
|
|
|
self._colors[y+iy][a-1] = TTkCfg.theme.unicodeWideOverflowColor |
|
|
|
|
if 0 <= b < self._width and self._data[y+iy][b]=='': |
|
|
|
|
if ((0 <= b < self._width) and self._data[y+iy][b]==''): |
|
|
|
|
self._data[y+iy][b] = TTkCfg.theme.unicodeWideOverflowCh[0] |
|
|
|
|
self._colors[y+iy][b] = TTkCfg.theme.unicodeWideOverflowColor |
|
|
|
|
|
|
|
|
|
|