Lines Matching refs:w
78 self._fcmd2b("<BBBBBB", 0x76, 0, 0, self.w, self.h) # viewport 'v'
79 self._fcmd2b("<BBBBBB", 0x79, 0, 0, self.w, self.h) # window 'y'
142 def clip_line(c, w, h): argument
151 elif c[0] > w:
159 elif c[2] > w:
175 c[3] += ((w - 1 - c[2]) * (c[3] - c[1])) // (c[2] - c[0])
176 c[2] = w - 1
216 self.w = self.buf[5][1]
272 def screen_dump(self, buf, x=0, y=0, w=None, h=None): argument
273 if w is None:
274 w = self.w - x
277 if w <= 127:
278 line = bytearray(2 * w + 1)
282 buflen = (w + 1) // 2
284 line2 = memoryview(line)[: 2 * (w - buflen) + 1]
285 for i in range(min(len(buf) // (2 * w), h)):
286 ix = i * w * 2
296 l = self.w * self.h * 2 + 2
297 self._fcmd2b("<BBHBBB", 0x70, l, 16, self.w, self.h)
306 while n < self.w * self.h * 2:
339 if 0 <= x < self.w and 0 <= y < self.h:
342 def rect(self, x, y, w, h, cmd=0x72): argument
343 if x + w <= 0 or y + h <= 0 or x >= self.w or y >= self.h:
349 w += x
357 self._fcmd2b("<BBBBBB", 0x51, x, y, min(w, 255), min(h, 255))
363 self._fcmd2b("<BBBBBB", 0x57, x, y, min(w, 255), 1)
364 if x + w < self.w:
365 self._fcmd2b("<BBBBBB", 0x57, x + w, y, 1, min(h, 255))
367 self._fcmd2b("<BBBBBB", 0x57, x, y + h, min(w, 255), 1)
369 self._fcmd2b("<BBBBBB", cmd, x, y, min(w, 255), min(h, 255))
371 def rect_outline(self, x, y, w, h): argument
372 self.rect(x, y, w, h, 0x57)
374 def rect_interior(self, x, y, w, h): argument
375 self.rect(x, y, w, h, 0x51)
383 if self.clip_line(ar4, self.w, self.h):
389 def rect_no_clip(self, x, y, w, h): argument
390 self._fcmd2b("<BBBBBB", 0x72, x, y, w, h)
392 def rect_outline_no_clip(self, x, y, w, h): argument
393 self._fcmd2b("<BBBBBB", 0x57, x, y, w, h)
395 def rect_interior_no_clip(self, x, y, w, h): argument
396 self._fcmd2b("<BBBBBB", 0x51, x, y, w, h)
432 def set_spi_win(self, x, y, w, h): argument
434 "<BBBHHHHHHHH", self.buf19, 0, 2, 0x55, 10, x, y, x + w - 1, y + h - 1, 0, 0, 0, 0xFFFF
450 def set_scroll_win(self, win, x=-1, y=0, w=0, h=0, vec=0, pat=0, fill=0x07E0, color=0): argument
451 pack_into("<BBBHHHHHHHH", self.buf19, 0, 2, 0x55, win, x, y, w, h, vec, pat, fill, color)