Lines Matching refs:object

52 VGLSetXY(VGLBitmap *object, int x, int y, u_long color)  in VGLSetXY()  argument
57 if (x>=0 && x<object->VXsize && y>=0 && y<object->VYsize) { in VGLSetXY()
58 if (object == VGLDisplay) { in VGLSetXY()
61 } else if (object->Type != MEMBUF) in VGLSetXY()
66 offset = (y * object->VXsize + x) * object->PixelBytes; in VGLSetXY()
67 switch (object->Type) { in VGLSetXY()
79 switch (object->PixelBytes) { in VGLSetXY()
81 memcpy(&object->Bitmap[offset], &color, 1); in VGLSetXY()
84 memcpy(&object->Bitmap[offset], &color, 2); in VGLSetXY()
87 memcpy(&object->Bitmap[offset], &color, 3); in VGLSetXY()
90 memcpy(&object->Bitmap[offset], &color, 4); in VGLSetXY()
99 memcpy(&object->Bitmap[soffset], &color, 1); in VGLSetXY()
101 memcpy(&object->Bitmap[soffset], (byte *)&color + 1, 2); in VGLSetXY()
104 memcpy(&object->Bitmap[soffset], &color, 2); in VGLSetXY()
106 memcpy(&object->Bitmap[soffset], (byte *)&color + 2, 1); in VGLSetXY()
109 memcpy(&object->Bitmap[soffset], &color, 3); in VGLSetXY()
116 object->Bitmap[(unsigned)(VGLAdpInfo.va_line_width*y)+(x/4)] = ((byte)color); in VGLSetXY()
128 object->Bitmap[offset] |= (byte)color; in VGLSetXY()
131 if (object == VGLDisplay) in VGLSetXY()
137 VGLGetXY(VGLBitmap *object, int x, int y) in VGLGetXY() argument
143 if (x<0 || x>=object->VXsize || y<0 || y>=object->VYsize) in VGLGetXY()
145 if (object == VGLDisplay) in VGLGetXY()
146 object = &VGLVDisplay; in VGLGetXY()
147 else if (object->Type != MEMBUF) in VGLGetXY()
149 offset = (y * object->VXsize + x) * object->PixelBytes; in VGLGetXY()
150 switch (object->PixelBytes) { in VGLGetXY()
152 memcpy(&color, &object->Bitmap[offset], 1); in VGLGetXY()
155 memcpy(&color, &object->Bitmap[offset], 2); in VGLGetXY()
158 memcpy(&color, &object->Bitmap[offset], 3); in VGLGetXY()
161 memcpy(&color, &object->Bitmap[offset], 4); in VGLGetXY()
176 plot(VGLBitmap * object, int x, int y, int flag, u_long color) in plot() argument
180 VGLSetXY(object, y, x, color); in plot()
182 VGLSetXY(object, x, y, color); in plot()
187 VGLLine(VGLBitmap *object, int x1, int y1, int x2, int y2, u_long color) in VGLLine() argument
227 plot(object, x, y, reverse, color); in VGLLine()
231 plot(object, x1, y1, reverse, color); /* plot first two points */ in VGLLine()
243 plot(object, x, y, reverse, color); in VGLLine()
244 plot(object, ++x, y, reverse, color); in VGLLine()
246 plot(object, x1, y1, reverse, color); in VGLLine()
247 plot(object, --x1, y1, reverse, color); in VGLLine()
252 plot(object, x, y, reverse, color); in VGLLine()
253 plot(object, ++x, y += step, reverse, in VGLLine()
256 plot(object, x1, y1, reverse, color); in VGLLine()
257 plot(object, --x1, y1 -= step, reverse, in VGLLine()
261 plot(object, x, y += step, reverse, color); in VGLLine()
262 plot(object, ++x, y, reverse, color); in VGLLine()
264 plot(object, x1, y1 -= step, reverse, in VGLLine()
266 plot(object, --x1, y1, reverse, color); in VGLLine()
275 plot(object, ++x, y, reverse, color); /* pattern 1 */ in VGLLine()
277 plot(object, ++x, y, reverse, color); in VGLLine()
279 plot(object, --x1, y1, reverse, color); in VGLLine()
282 plot(object, ++x, y, reverse, color); /* pattern 2 */ in VGLLine()
284 plot(object, ++x, y += step, reverse, color); in VGLLine()
286 plot(object, --x1, y1, reverse, color); in VGLLine()
289 plot(object, ++x, y += step, reverse, color); in VGLLine()
291 plot(object, ++x, y, reverse, color); in VGLLine()
293 plot(object, --x1, y1 -= step, reverse, color); in VGLLine()
308 plot(object, x, y += step, reverse, color); in VGLLine()
309 plot(object, ++x, y += step, reverse, color); in VGLLine()
311 plot(object, x1, y1 -= step, reverse, color); in VGLLine()
312 plot(object, --x1, y1 -= step, reverse, color); in VGLLine()
317 plot(object, x, y, reverse, color); in VGLLine()
318 plot(object, ++x, y += step, reverse, in VGLLine()
322 plot(object, x1, y1, reverse, color); in VGLLine()
323 plot(object, --x1, y1 -= step, reverse, in VGLLine()
327 plot(object, x, y += step, reverse, color); in VGLLine()
328 plot(object, ++x, y, reverse, color); in VGLLine()
330 plot(object, x1, y1 -= step, reverse, color); in VGLLine()
331 plot(object, --x1, y1, reverse, color); in VGLLine()
339 plot(object, ++x, y += step, reverse, color); /* pattern 4 */ in VGLLine()
341 plot(object, ++x, y += step, reverse, in VGLLine()
344 plot(object, --x1, y1 -= step, reverse, in VGLLine()
348 plot(object, ++x, y, reverse, color); /* pattern 2 */ in VGLLine()
350 plot(object, ++x, y += step, reverse, color); in VGLLine()
352 plot(object, --x1, y1, reverse, color); in VGLLine()
355 plot(object, ++x, y += step, reverse, color); in VGLLine()
357 plot(object, ++x, y, reverse, color); in VGLLine()
360 plot(object, --x1, y1 -= step, reverse, color); in VGLLine()
362 plot(object, --x1, y1, reverse, color); in VGLLine()
371 VGLBox(VGLBitmap *object, int x1, int y1, int x2, int y2, u_long color) in VGLBox() argument
373 VGLLine(object, x1, y1, x2, y1, color); in VGLBox()
374 VGLLine(object, x2, y1, x2, y2, color); in VGLBox()
375 VGLLine(object, x2, y2, x1, y2, color); in VGLBox()
376 VGLLine(object, x1, y2, x1, y1, color); in VGLBox()
380 VGLFilledBox(VGLBitmap *object, int x1, int y1, int x2, int y2, u_long color) in VGLFilledBox() argument
384 for (y=y1; y<=y2; y++) VGLLine(object, x1, y, x2, y, color); in VGLFilledBox()
388 set4pixels(VGLBitmap *object, int x, int y, int xc, int yc, u_long color) in set4pixels() argument
391 VGLSetXY(object, xc+x, yc+y, color); in set4pixels()
392 VGLSetXY(object, xc-x, yc+y, color); in set4pixels()
394 VGLSetXY(object, xc+x, yc-y, color); in set4pixels()
395 VGLSetXY(object, xc-x, yc-y, color); in set4pixels()
399 VGLSetXY(object, xc, yc+y, color); in set4pixels()
401 VGLSetXY(object, xc, yc-y, color); in set4pixels()
406 VGLEllipse(VGLBitmap *object, int xc, int yc, int a, int b, u_long color) in VGLEllipse() argument
412 set4pixels(object, x, y, xc, yc, color); in VGLEllipse()
420 set4pixels(object, x, y, xc, yc, color); in VGLEllipse()
429 set2lines(VGLBitmap *object, int x, int y, int xc, int yc, u_long color) in set2lines() argument
432 VGLLine(object, xc+x, yc+y, xc-x, yc+y, color); in set2lines()
434 VGLLine(object, xc+x, yc-y, xc-x, yc-y, color); in set2lines()
437 VGLLine(object, xc, yc+y, xc, yc-y, color); in set2lines()
442 VGLFilledEllipse(VGLBitmap *object, int xc, int yc, int a, int b, u_long color) in VGLFilledEllipse() argument
448 set2lines(object, x, y, xc, yc, color); in VGLFilledEllipse()
456 set2lines(object, x, y, xc, yc, color); in VGLFilledEllipse()
465 VGLClear(VGLBitmap *object, u_long color) in VGLClear() argument
471 if (object == VGLDisplay) { in VGLClear()
474 } else if (object->Type != MEMBUF) in VGLClear()
476 switch (object->Type) { in VGLClear()
487 src.Xsize = object->Xsize; in VGLClear()
488 src.VXsize = object->VXsize; in VGLClear()
493 src.Bitmap = alloca(object->VXsize * object->PixelBytes); in VGLClear()
494 src.PixelBytes = object->PixelBytes; in VGLClear()
496 for (i = 0; i < object->VXsize; i++) in VGLClear()
497 bcopy(&color, src.Bitmap + i * object->PixelBytes, object->PixelBytes); in VGLClear()
498 for (i = 0; i < object->VYsize; i++) in VGLClear()
499 __VGLBitmapCopy(&src, 0, 0, object, 0, i, object->VXsize, -1); in VGLClear()
507 memset(object->Bitmap, (byte)color, VGLAdpInfo.va_line_width*object->VYsize); in VGLClear()
519 for (offset = 0; offset < VGLAdpInfo.va_line_width*object->VYsize; ) { in VGLClear()
521 len = min(object->VXsize*object->VYsize - offset, in VGLClear()
523 memset(object->Bitmap, (byte)color, len); in VGLClear()
530 if (object == VGLDisplay) in VGLClear()