Beispiel #1
0
void drawGraphLines(GHandle gh)
{
	 //color_t oldColor;
	 //oldColor = gh->color;
//     gh->color=White;
//     //Vertical Line
//     gwinDrawLine(gh, 5,0, 5,gwinGetHeight(gh));
//     gwinDrawLine(gh, 0,(gwinGetHeight(gh)/2)-5, 5,(gwinGetHeight(gh)/2)-5); //half way tick
//     gwinDrawLine(gh, 3,(gwinGetHeight(gh)/4)-5, 5,(gwinGetHeight(gh)/4)-5); //qtr ticks
//     gwinDrawLine(gh, 3,((gwinGetHeight(gh)/4)*3)-5, 5,((gwinGetHeight(gh)/4)*3)-5); //qtr ticks
//     gwinDrawLine(gh, 0,0, 5,0); //top end
//     //Horizontal Line
//     gwinDrawLine(gh, 0,gwinGetHeight(gh)-5, gwinGetWidth(gh),gwinGetHeight(gh)-5);
//     gwinDrawLine(gh, (gwinGetWidth(gh)/2)+5, gwinGetHeight(gh)-5, (gwinGetWidth(gh)/2)+5, gwinGetHeight(gh)); //half way tickhttps://www.google.com/webhp?hl=en
//     gwinDrawLine(gh, (gwinGetWidth(gh)/4)+5, gwinGetHeight(gh)-5, (gwinGetWidth(gh)/4)+5, gwinGetHeight(gh)-3); //qtr tick
//     gwinDrawLine(gh, ((gwinGetWidth(gh)/4)*3)+5, gwinGetHeight(gh)-5, ((gwinGetWidth(gh)/4)*3)+5, gwinGetHeight(gh)-3); //qtr way tick
//     gwinDrawLine(gh, gwinGetWidth(gh)-1, gwinGetHeight(gh)-5, gwinGetWidth(gh)-1, gwinGetHeight(gh)); //bottom end

	coord_t i, j;
	color_t r,g,b;
	coord_t width = gwinGetWidth(gh);
	coord_t height = gwinGetHeight(gh);

	for (i = 0; i < width; i++) {
	   for(j = 0; j < height; j++) {
		   //r = ((((_acgraphH[i+(j*width)] >> 11) & 0x1F)*527)+23) >> 6;
		   //g = ((((_acgraphH[i+(j*width)] >> 5) & 0x3f)*259)+33) >> 6;
		   //b = (((_acgraphH[i+(j*width)])  & 0x1f) + 23) >> 6;
		   if (activeGraph == 3 || gh->parent == ghContainerGraphCV) {
			   r = RED_OF(_acgraphH2[i+(j*width)] >> 11);
			   g = GREEN_OF(_acgraphH2[i+(j*width)] >> 5);
			   b = BLUE_OF(_acgraphH2[i+(j*width)]);
			   surface2[j*width+i]=(RGB2COLOR(r,g,b));
		   } else {
			   r = RED_OF(_acgraphH[i+(j*width)] >> 11);
			   g = GREEN_OF(_acgraphH[i+(j*width)] >> 5);
			   b = BLUE_OF(_acgraphH[i+(j*width)]);
			   surface[j*width+i]=(RGB2COLOR(r,g,b));
		   }
		   //gwinDrawPixel(pixmap,i, j);
	   }
Beispiel #2
0
	LLDSPEC void gdisp_lld_fill_area(GDisplay *g) {
		xPriv *	priv = (xPriv *)g->priv;
		XColor	col;

		col.red = RED_OF(g->p.color) << 8;
		col.green = GREEN_OF(g->p.color) << 8;
		col.blue = BLUE_OF(g->p.color) << 8;
		XAllocColor(dis, cmap, &col);
		XSetForeground(dis, priv->gc, col.pixel);
		XFillRectangle(dis, priv->pix, priv->gc, g->p.x, g->p.y, g->p.cx, g->p.cy);
		XFillRectangle(dis, priv->win, priv->gc, g->p.x, g->p.y, g->p.cx, g->p.cy);
		XFlush(dis);
	}
Beispiel #3
0
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g)
{
	xPriv *	priv = (xPriv *)g->priv;
	XColor	col;

	col.red = RED_OF(g->p.color) << 8;
	col.green = GREEN_OF(g->p.color) << 8;
	col.blue = BLUE_OF(g->p.color) << 8;
	XAllocColor(dis, cmap, &col);
	XSetForeground(dis, priv->gc, col.pixel);
	XDrawPoint(dis, priv->pix, priv->gc, (int)g->p.x, (int)g->p.y );
	XDrawPoint(dis, priv->win, priv->gc, (int)g->p.x, (int)g->p.y );
	XFlush(dis);
}