Exemplo n.º 1
0
void ClosePointGenerator::output(int x,int y,ColorRaw**bitmap){
    printf("\033[0;0H");
    for(int j=0;j<y;j++)
    for(int i=0;i<x;i++)
        putColor(bitmap[i][j].r/255.0,
                 bitmap[i][j].g/255.0,
                 bitmap[i][j].b/255.0);
}
Exemplo n.º 2
0
// class constructor
TImagen::TImagen(SDL_Surface *screen) : TPantalla(screen)
{
	// insert your code here
    this->setFondo(clNegro);
    this->setColor(clBlanco);
    this->justificar = false;
    this->tamFuente = 10;
	bitmap = NULL;
	RAWbitmap = NULL;
	this->screen = screen;
	this->thumbVisible = false;
	top = 0;
	left = 0;
	autosize = true;
	zoomFactor = 0;
	rectPantalla = new SDL_Rect();
	rectPantalla->x=0;
	rectPantalla->y=0;
	rectPantalla->w=screen->w;
	rectPantalla->h=screen->h;
	moveIncFactor = 20;
	retrasoPresentacion = 2000;

    //Datos para el thumb de imagenes
    this->posicionImgThumb = 0;
    this->thumb_w = 150;
    this->thumb_h = 150;
    this->separacion = 1;

    //Creamos un array con los valores enteros de todos los colores
    SDL_Color *s_color = new SDL_Color();
    SDL_PixelFormat *fmt;
    fmt=screen->format;
    for (int i = 0;i<10;i++)
    {
        putColor(i,s_color);
        arrayColores[i] = SDL_MapRGB(fmt,s_color->r,s_color->g,s_color->b);
    }
	//objTraza->print("TImagen::TImagen() antes de cargar iconos");

//    this->cargarIconos();
    //objTraza->print("TImagen::TImagen() iconos cargados");
}