// Este es el archivo Imagen.h que contiene la declaracion de la clase Imagen // esta clase permite la instancia del stack. #ifndef IMAGEN_H #define IMAGEN_H #include "General.h" #include "DatoDeColeccion.h" class C_Imagen: public C_DatoDeColeccion { protected: void *Datos; // Tipo de datos void pues puede se variable int Numero; // Numero de la imagen int Ancho; int Alto; byte BytesPorDato; // Cuantos Bytes por dato (1/2) bool HayDatos; bool ValorDentroDelRango(int,int); // Verifica si un valor esta en el rango permitido public: C_Imagen(); C_Imagen(int,int,int=1,int=0); // (Ancho,Alto,BytesPorDato,Numero) ~C_Imagen(); // --- HEREDADAS --- bool ReservaMemoria(); bool LiberaMemoria(); // Archivo: bool CargaDatos(FILE *); bool GuardaDatos(FILE *); // Varias: bool Copia(C_Imagen &); // Fuente bool Copia(C_Imagen *); // --- LOCALES --- // Cambios: bool CambiaDato(int,int,int); // Ancho,Alto,NuevoDato bool CambiaTamano(int,int); // NuevoAncho,NuevoAlto void CambiaBytesPorDato(int NumBytes) {BytesPorDato=NumBytes;}// <- OJO! Actualizar memoria! // Consultas: int LeeDato(int,int); // Ancho,Alto (1 o 2 bytes...) byte *LeeDatoComoArreglo(int,int); int LeeAlto() {return Alto;} int LeeAncho() {return Ancho;} byte LeeBytesPorDato() {return BytesPorDato;} bool LeeHayDatos() {return HayDatos;} }; #endif /* FALTA LA PARTE DEL HISTOGRAMA! */