class interface BITMAPINFO creation make (a_block: F_MEMORY) -- Initialise from memory block. require not_void: a_block /= Void make_rgb -- Make blank header for 24bit RGB bitmap. ensure is_valid: is_valid make_mono -- Blank header for uncompressed 256 color bitmap. ensure is_valid make_16_colors -- Blank header for uncompressed 16 color bitmap. ensure is_valid: is_valid; colors: has_colors make_256_colors -- Blank header for uncompressed 256 color bitmap. ensure is_valid: is_valid; colors: has_colors feature(s) from BITMAPINFO -- Creation make (a_block: F_MEMORY) -- Initialise from memory block. require not_void: a_block /= Void feature(s) from BITMAPINFO -- Creation set (a_block: F_MEMORY) -- Initialise from memory block. require not_void: a_block /= Void make_rgb -- Make blank header for 24bit RGB bitmap. ensure is_valid: is_valid make_16_colors -- Blank header for uncompressed 16 color bitmap. ensure is_valid: is_valid; colors: has_colors make_256_colors -- Blank header for uncompressed 256 color bitmap. ensure is_valid: is_valid; colors: has_colors make_mono -- Blank header for uncompressed 256 color bitmap. ensure is_valid reset_header -- Reset header. feature(s) from BITMAPINFO -- Access is_valid: BOOLEAN -- Is layout OK? has_colors: BOOLEAN -- Colors layout OK? require valid: is_valid width: INTEGER -- Width. require valid: is_valid set_width (an_int: INTEGER) -- Set width. require valid: is_valid ensure valid: is_valid height: INTEGER -- Height. require valid: is_valid set_height (an_int: INTEGER) -- Set width. require valid: is_valid ensure valid: is_valid bit_count: INTEGER -- Bit count. require valid: is_valid number_of_colors: INTEGER -- Number of colors. require valid: is_valid color (n: INTEGER): RGB_COLOR -- Color. require valid: is_valid; min: n >= 1; max: n <= number_of_colors; layout: has_colors set_color (a_color: RGB_COLOR; n: INTEGER) -- Set color. require valid: is_valid; has_colors: has_colors; min: n >= 1; max: n <= number_of_colors; color_not_void: a_color /= Void ensure done: color(n).is_equal(a_color) invariant valid_memory: memory /= Void; end of BITMAPINFO