Exemple #1
0
int
GGI_t16_getpixel_nc(struct ggi_visual *vis, int x, int y, ggi_pixel *pixel)
{ 
	*pixel = *PIXEL_RADDR(vis, x, y);

	return 0;
}
Exemple #2
0
int
GGI_lin1r_getpixel_nc(struct ggi_visual *vis, int x, int y, ggi_pixel *pixel)
{
    *pixel = !! (*PIXEL_RADDR(vis,x,y) & (0x01 << (x & 7)));

    return 0;
}
Exemple #3
0
int GGI_t32_getpixela(ggi_visual *vis, int x, int y, ggi_pixel *pixel)
{ 
	PREPARE_FB(vis);

	*pixel = *PIXEL_RADDR(vis, x, y);

	return 0;
}
Exemple #4
0
int
GGI_t16_getpixel_nca(struct ggi_visual *vis, int x, int y, ggi_pixel *pixel)
{ 
	PREPARE_FB(vis);

	*pixel = *PIXEL_RADDR(vis, x, y);

	return 0;
}
Exemple #5
0
int
GGI_ipl2_getpixel_nc(struct ggi_visual *vis, int x, int y, ggi_pixel *pixel)
{
	ggi_pixel col = 0;

	uint16_t *dest = PIXEL_RADDR(vis, x, y);
	uint16_t shift = 15 - (x & 15);

	int i, depth = GT_DEPTH(LIBGGI_GT(vis));

	for (i=0; i < depth; i++) {

		col |= ((*dest++ >> shift) & 1) << i;
	}

	*pixel = col;

	return 0;
}
Exemple #6
0
int GGI_ilbm_getpixel(ggi_visual *vis, int x, int y, ggi_pixel *pixel)
{
	ggi_pixel col = 0;

	uint16_t *dest = PIXEL_RADDR(vis, x, y);
	uint16_t shift = 15 - (x & 15);

	int plane_add = LIBGGI_R_PLAN(vis).next_plane / 2;
	int i, depth  = GT_DEPTH(LIBGGI_GT(vis));

	for (i=0; i < depth; i++) {

		col |= ((*dest >> shift) & 1) << i;

		dest += plane_add;
	}

	*pixel = col;

	return 0;
}