Lines Matching refs:object

50 VGLSetXY(VGLBitmap *object, int x, int y, u_long color)  in VGLSetXY()  argument
55 if (x>=0 && x<object->VXsize && y>=0 && y<object->VYsize) { in VGLSetXY()
56 if (object == VGLDisplay) { in VGLSetXY()
59 } else if (object->Type != MEMBUF) in VGLSetXY()
64 offset = (y * object->VXsize + x) * object->PixelBytes; in VGLSetXY()
65 switch (object->Type) { in VGLSetXY()
77 switch (object->PixelBytes) { in VGLSetXY()
79 memcpy(&object->Bitmap[offset], &color, 1); in VGLSetXY()
82 memcpy(&object->Bitmap[offset], &color, 2); in VGLSetXY()
85 memcpy(&object->Bitmap[offset], &color, 3); in VGLSetXY()
88 memcpy(&object->Bitmap[offset], &color, 4); in VGLSetXY()
97 memcpy(&object->Bitmap[soffset], &color, 1); in VGLSetXY()
99 memcpy(&object->Bitmap[soffset], (byte *)&color + 1, 2); in VGLSetXY()
102 memcpy(&object->Bitmap[soffset], &color, 2); in VGLSetXY()
104 memcpy(&object->Bitmap[soffset], (byte *)&color + 2, 1); in VGLSetXY()
107 memcpy(&object->Bitmap[soffset], &color, 3); in VGLSetXY()
114 object->Bitmap[(unsigned)(VGLAdpInfo.va_line_width*y)+(x/4)] = ((byte)color); in VGLSetXY()
126 object->Bitmap[offset] |= (byte)color; in VGLSetXY()
129 if (object == VGLDisplay) in VGLSetXY()
135 VGLGetXY(VGLBitmap *object, int x, int y) in VGLGetXY() argument
141 if (x<0 || x>=object->VXsize || y<0 || y>=object->VYsize) in VGLGetXY()
143 if (object == VGLDisplay) in VGLGetXY()
144 object = &VGLVDisplay; in VGLGetXY()
145 else if (object->Type != MEMBUF) in VGLGetXY()
147 offset = (y * object->VXsize + x) * object->PixelBytes; in VGLGetXY()
148 switch (object->PixelBytes) { in VGLGetXY()
150 memcpy(&color, &object->Bitmap[offset], 1); in VGLGetXY()
153 memcpy(&color, &object->Bitmap[offset], 2); in VGLGetXY()
156 memcpy(&color, &object->Bitmap[offset], 3); in VGLGetXY()
159 memcpy(&color, &object->Bitmap[offset], 4); in VGLGetXY()
174 plot(VGLBitmap * object, int x, int y, int flag, u_long color) in plot() argument
178 VGLSetXY(object, y, x, color); in plot()
180 VGLSetXY(object, x, y, color); in plot()
185 VGLLine(VGLBitmap *object, int x1, int y1, int x2, int y2, u_long color) in VGLLine() argument
225 plot(object, x, y, reverse, color); in VGLLine()
229 plot(object, x1, y1, reverse, color); /* plot first two points */ in VGLLine()
241 plot(object, x, y, reverse, color); in VGLLine()
242 plot(object, ++x, y, reverse, color); in VGLLine()
244 plot(object, x1, y1, reverse, color); in VGLLine()
245 plot(object, --x1, y1, reverse, color); in VGLLine()
250 plot(object, x, y, reverse, color); in VGLLine()
251 plot(object, ++x, y += step, reverse, in VGLLine()
254 plot(object, x1, y1, reverse, color); in VGLLine()
255 plot(object, --x1, y1 -= step, reverse, in VGLLine()
259 plot(object, x, y += step, reverse, color); in VGLLine()
260 plot(object, ++x, y, reverse, color); in VGLLine()
262 plot(object, x1, y1 -= step, reverse, in VGLLine()
264 plot(object, --x1, y1, reverse, color); in VGLLine()
273 plot(object, ++x, y, reverse, color); /* pattern 1 */ in VGLLine()
275 plot(object, ++x, y, reverse, color); in VGLLine()
277 plot(object, --x1, y1, reverse, color); in VGLLine()
280 plot(object, ++x, y, reverse, color); /* pattern 2 */ in VGLLine()
282 plot(object, ++x, y += step, reverse, color); in VGLLine()
284 plot(object, --x1, y1, reverse, color); in VGLLine()
287 plot(object, ++x, y += step, reverse, color); in VGLLine()
289 plot(object, ++x, y, reverse, color); in VGLLine()
291 plot(object, --x1, y1 -= step, reverse, color); in VGLLine()
306 plot(object, x, y += step, reverse, color); in VGLLine()
307 plot(object, ++x, y += step, reverse, color); in VGLLine()
309 plot(object, x1, y1 -= step, reverse, color); in VGLLine()
310 plot(object, --x1, y1 -= step, reverse, color); in VGLLine()
315 plot(object, x, y, reverse, color); in VGLLine()
316 plot(object, ++x, y += step, reverse, in VGLLine()
320 plot(object, x1, y1, reverse, color); in VGLLine()
321 plot(object, --x1, y1 -= step, reverse, in VGLLine()
325 plot(object, x, y += step, reverse, color); in VGLLine()
326 plot(object, ++x, y, reverse, color); in VGLLine()
328 plot(object, x1, y1 -= step, reverse, color); in VGLLine()
329 plot(object, --x1, y1, reverse, color); in VGLLine()
337 plot(object, ++x, y += step, reverse, color); /* pattern 4 */ in VGLLine()
339 plot(object, ++x, y += step, reverse, in VGLLine()
342 plot(object, --x1, y1 -= step, reverse, in VGLLine()
346 plot(object, ++x, y, reverse, color); /* pattern 2 */ in VGLLine()
348 plot(object, ++x, y += step, reverse, color); in VGLLine()
350 plot(object, --x1, y1, reverse, color); in VGLLine()
353 plot(object, ++x, y += step, reverse, color); in VGLLine()
355 plot(object, ++x, y, reverse, color); in VGLLine()
358 plot(object, --x1, y1 -= step, reverse, color); in VGLLine()
360 plot(object, --x1, y1, reverse, color); in VGLLine()
369 VGLBox(VGLBitmap *object, int x1, int y1, int x2, int y2, u_long color) in VGLBox() argument
371 VGLLine(object, x1, y1, x2, y1, color); in VGLBox()
372 VGLLine(object, x2, y1, x2, y2, color); in VGLBox()
373 VGLLine(object, x2, y2, x1, y2, color); in VGLBox()
374 VGLLine(object, x1, y2, x1, y1, color); in VGLBox()
378 VGLFilledBox(VGLBitmap *object, int x1, int y1, int x2, int y2, u_long color) in VGLFilledBox() argument
382 for (y=y1; y<=y2; y++) VGLLine(object, x1, y, x2, y, color); in VGLFilledBox()
386 set4pixels(VGLBitmap *object, int x, int y, int xc, int yc, u_long color) in set4pixels() argument
389 VGLSetXY(object, xc+x, yc+y, color); in set4pixels()
390 VGLSetXY(object, xc-x, yc+y, color); in set4pixels()
392 VGLSetXY(object, xc+x, yc-y, color); in set4pixels()
393 VGLSetXY(object, xc-x, yc-y, color); in set4pixels()
397 VGLSetXY(object, xc, yc+y, color); in set4pixels()
399 VGLSetXY(object, xc, yc-y, color); in set4pixels()
404 VGLEllipse(VGLBitmap *object, int xc, int yc, int a, int b, u_long color) in VGLEllipse() argument
410 set4pixels(object, x, y, xc, yc, color); in VGLEllipse()
418 set4pixels(object, x, y, xc, yc, color); in VGLEllipse()
427 set2lines(VGLBitmap *object, int x, int y, int xc, int yc, u_long color) in set2lines() argument
430 VGLLine(object, xc+x, yc+y, xc-x, yc+y, color); in set2lines()
432 VGLLine(object, xc+x, yc-y, xc-x, yc-y, color); in set2lines()
435 VGLLine(object, xc, yc+y, xc, yc-y, color); in set2lines()
440 VGLFilledEllipse(VGLBitmap *object, int xc, int yc, int a, int b, u_long color) in VGLFilledEllipse() argument
446 set2lines(object, x, y, xc, yc, color); in VGLFilledEllipse()
454 set2lines(object, x, y, xc, yc, color); in VGLFilledEllipse()
463 VGLClear(VGLBitmap *object, u_long color) in VGLClear() argument
469 if (object == VGLDisplay) { in VGLClear()
472 } else if (object->Type != MEMBUF) in VGLClear()
474 switch (object->Type) { in VGLClear()
485 src.Xsize = object->Xsize; in VGLClear()
486 src.VXsize = object->VXsize; in VGLClear()
491 src.Bitmap = alloca(object->VXsize * object->PixelBytes); in VGLClear()
492 src.PixelBytes = object->PixelBytes; in VGLClear()
494 for (i = 0; i < object->VXsize; i++) in VGLClear()
495 bcopy(&color, src.Bitmap + i * object->PixelBytes, object->PixelBytes); in VGLClear()
496 for (i = 0; i < object->VYsize; i++) in VGLClear()
497 __VGLBitmapCopy(&src, 0, 0, object, 0, i, object->VXsize, -1); in VGLClear()
505 memset(object->Bitmap, (byte)color, VGLAdpInfo.va_line_width*object->VYsize); in VGLClear()
517 for (offset = 0; offset < VGLAdpInfo.va_line_width*object->VYsize; ) { in VGLClear()
519 len = min(object->VXsize*object->VYsize - offset, in VGLClear()
521 memset(object->Bitmap, (byte)color, len); in VGLClear()
528 if (object == VGLDisplay) in VGLClear()