note
	description: "The way the pixels are store in memory."
	author: "Louis Marchand"
	date: "Thu, 02 Apr 2015 02:40:10 +0000"
	revision: "2.0"

class interface
	GAME_PIXEL_FORMAT

create 
	default_create
			-- Initialization of Current

	make_from_other (a_other: GAME_PIXEL_FORMAT_READABLE)
			-- Initialization for Current by copying a_others values.
			-- (from GAME_PIXEL_FORMAT_READABLE)

	make_from_bits_per_pixel_and_masks (a_bits_per_pixel: INTEGER_32; a_red_mask, a_green_mask, a_blue_mask, a_alpha_mask: NATURAL_32)
			-- Initialize Current usign a_bits_per_pixel value and pixel masks: a_red_mask, a_green_mask, a_blue_mask and a_alpha_mask.
			-- (from GAME_PIXEL_FORMAT_READABLE)


create {GAME_SDL_ANY}
	make_from_flags (a_enum: NATURAL_32)
			-- Initialization for Current usign the internal format index.
			-- (from GAME_PIXEL_FORMAT_READABLE)

	make_from_structure_pointer (a_structure: POINTER)
			-- Initialize usign the copy of a_structure format C pointer.
			-- a_structure is not freed by Current
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			pixel_format_info_structure_not_null: not a_structure.is_default_pointer

	share_from_structure_pointer (a_structure: POINTER)
			-- Initialize usign a_structure format C pointer.
			-- a_structure is not freed by Current
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			pixel_format_info_structure_not_null: not a_structure.is_default_pointer

	own_from_structure_pointer (a_structure: POINTER)
			-- Initialize usign a_structure format C pointer.
			-- a_structure will be freed by Current
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			pixel_format_info_structure_not_null: not a_structure.is_default_pointer

feature -- Access

	bits_per_pixel: INTEGER_32
			-- The number of significant bits in a pixel value
			-- (from GAME_PIXEL_FORMAT_READABLE)

	bytes_per_pixel: INTEGER_32
			-- The number of bytes in a pixel value
			-- (from GAME_PIXEL_FORMAT_READABLE)

	color_palette: detachable GAME_COLOR_PALETTE assign set_color_palette
			-- The palette of color used in the indexed pixel format
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_indexed: is_indexed

	generating_type: TYPE [detachable GAME_PIXEL_FORMAT]
			-- Type of current object
			-- (type of which it is a direct instance)
			-- (from ANY)
		ensure -- from ANY
			generating_type_not_void: Result /= Void

	generator: STRING_8
			-- Name of current object's generating class
			-- (base class of the type of which it is a direct instance)
			-- (from ANY)
		ensure -- from ANY
			generator_not_void: Result /= Void
			generator_not_empty: not Result.is_empty

	has_alpha: BOOLEAN
			-- Current used a color system with alpha channel
			-- (from GAME_PIXEL_FORMAT_READABLE)

	has_error: BOOLEAN
			-- Is the library has generate an error
			-- (from GAME_ERROR_MANAGER)

	is_abgr1555: BOOLEAN
			-- the pixel format of Current is abgr1555
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_abgr4444: BOOLEAN
			-- the pixel format of Current is abgr4444
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_abgr8888: BOOLEAN
			-- the pixel format of Current is abgr8888
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_argb1555: BOOLEAN
			-- the pixel format of Current is argb1555
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_argb2101010: BOOLEAN
			-- the pixel format of Current is argb2101010
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_argb4444: BOOLEAN
			-- the pixel format of Current is argb4444
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_argb8888: BOOLEAN
			-- the pixel format of Current is argb8888
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_bgr24: BOOLEAN
			-- the pixel format of Current is bgr24
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_bgr555: BOOLEAN
			-- the pixel format of Current is bgr555
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_bgr565: BOOLEAN
			-- the pixel format of Current is bgr565
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_bgr888: BOOLEAN
			-- the pixel format of Current is bgr888
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_bgra4444: BOOLEAN
			-- the pixel format of Current is bgra4444
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_bgra5551: BOOLEAN
			-- the pixel format of Current is bgra5551
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_bgra8888: BOOLEAN
			-- the pixel format of Current is bgra8888
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_bgrx8888: BOOLEAN
			-- the pixel format of Current is bgrx8888
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_equal (a_other: GAME_PIXEL_FORMAT): BOOLEAN
			-- Is other attached to an object considered
			-- equal to current object?
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from ANY
			other_not_void: a_other /= Void
		ensure -- from ANY
			symmetric: Result implies a_other ~ Current
			consistent: standard_is_equal (a_other) implies Result

	is_four_cc: BOOLEAN
			-- Current used a color system that represent a FourCC format (Like YUV)
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_index1lsb: BOOLEAN
			-- the pixel format of Current is index1lsb
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_index1msb: BOOLEAN
			-- the pixel format of Current is index1msb
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_index4lsb: BOOLEAN
			-- the pixel format of Current is index4lsb
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_index4msb: BOOLEAN
			-- the pixel format of Current is index4msb
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_index8: BOOLEAN
			-- the pixel format of Current is index8
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_indexed: BOOLEAN
			-- Current used an indexed color system
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_iyuv: BOOLEAN
			-- the pixel format of Current is iyuv
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_order_array_abgr: BOOLEAN
			-- The arrayed component order (low byte -> high byte) or Current is ABGR
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_arrayed: is_type_array_natural_8 or is_type_array_natural_16 or is_type_array_natural_32

	is_order_array_argb: BOOLEAN
			-- The arrayed component order (low byte -> high byte) or Current is ARGB
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_arrayed: is_type_array_natural_8 or is_type_array_natural_16 or is_type_array_natural_32

	is_order_array_bgr: BOOLEAN
			-- The arrayed component order (low byte -> high byte) or Current is BGR
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_arrayed: is_type_array_natural_8 or is_type_array_natural_16 or is_type_array_natural_32

	is_order_array_bgra: BOOLEAN
			-- The arrayed component order (low byte -> high byte) or Current is BGRA
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_arrayed: is_type_array_natural_8 or is_type_array_natural_16 or is_type_array_natural_32

	is_order_array_rgb: BOOLEAN
			-- The arrayed component order (low byte -> high byte) or Current is RGB
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_arrayed: is_type_array_natural_8 or is_type_array_natural_16 or is_type_array_natural_32

	is_order_array_rgba: BOOLEAN
			-- The arrayed component order (low byte -> high byte) or Current is RGBA
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_arrayed: is_type_array_natural_8 or is_type_array_natural_16 or is_type_array_natural_32

	is_order_array_unknown: BOOLEAN
			-- The arrayed component order (low byte -> high byte) or Current is not known
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_arrayed: is_type_array_natural_8 or is_type_array_natural_16 or is_type_array_natural_32

	is_order_bitmap_1234: BOOLEAN
			-- The bitmap pixel order (high bit -> low bit) or Current is 1234
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_bitmaped: is_type_index_1 or is_type_index_4

	is_order_bitmap_4321: BOOLEAN
			-- The bitmap pixel order (high bit -> low bit) or Current is 4321
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_bitmaped: is_type_index_1 or is_type_index_4

	is_order_bitmap_unknow: BOOLEAN
			-- The bitmap pixel order (high bit -> low bit) or Current is unknown
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_bitmaped: is_type_index_1 or is_type_index_4

	is_order_packed_abgr: BOOLEAN
			-- The packed component order (high bit -> low bit) or Current is ABGR
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_packed: is_type_packed_8 or is_type_packed_16 or is_type_packed_32

	is_order_packed_argb: BOOLEAN
			-- The packed component order (high bit -> low bit) or Current is ARGB
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_packed: is_type_packed_8 or is_type_packed_16 or is_type_packed_32

	is_order_packed_bgra: BOOLEAN
			-- The packed component order (high bit -> low bit) or Current is BGRA
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_packed: is_type_packed_8 or is_type_packed_16 or is_type_packed_32

	is_order_packed_bgrx: BOOLEAN
			-- The packed component order (high bit -> low bit) or Current is BGRX
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_packed: is_type_packed_8 or is_type_packed_16 or is_type_packed_32

	is_order_packed_rgba: BOOLEAN
			-- The packed component order (high bit -> low bit) or Current is RGBA
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_packed: is_type_packed_8 or is_type_packed_16 or is_type_packed_32

	is_order_packed_rgbx: BOOLEAN
			-- The packed component order (high bit -> low bit) or Current is RGBX
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_packed: is_type_packed_8 or is_type_packed_16 or is_type_packed_32

	is_order_packed_unknown: BOOLEAN
			-- The packed component order (high bit -> low bit) or Current is not known
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_packed: is_type_packed_8 or is_type_packed_16 or is_type_packed_32

	is_order_packed_xbgr: BOOLEAN
			-- The packed component order (high bit -> low bit) or Current is XBGR
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_packed: is_type_packed_8 or is_type_packed_16 or is_type_packed_32

	is_order_packed_xrgb: BOOLEAN
			-- The packed component order (high bit -> low bit) or Current is XRGB
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_packed: is_type_packed_8 or is_type_packed_16 or is_type_packed_32

	is_packed_layout_1010102: BOOLEAN
			-- Current have the channel layouts 1010102
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_packed: is_type_packed_32

	is_packed_layout_1555: BOOLEAN
			-- Current have the channel layouts 1555
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_packed: is_type_packed_16

	is_packed_layout_2101010: BOOLEAN
			-- Current have the channel layouts 2101010
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_packed: is_type_packed_32

	is_packed_layout_332: BOOLEAN
			-- Current have the channel layouts 332
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_packed: is_type_packed_8

	is_packed_layout_4444: BOOLEAN
			-- Current have the channel layouts 4444
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_packed: is_type_packed_16

	is_packed_layout_5551: BOOLEAN
			-- Current have the channel layouts 5551
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_packed: is_type_packed_16

	is_packed_layout_565: BOOLEAN
			-- Current have the channel layouts 565
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_packed: is_type_packed_16

	is_packed_layout_8888: BOOLEAN
			-- Current have the channel layouts 8888
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_packed: is_type_packed_32

	is_rgb24: BOOLEAN
			-- the pixel format of Current is rgb24
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_rgb332: BOOLEAN
			-- the pixel format of Current is rgb332
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_rgb444: BOOLEAN
			-- the pixel format of Current is rgb444
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_rgb555: BOOLEAN
			-- the pixel format of Current is rgb555
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_rgb565: BOOLEAN
			-- the pixel format of Current is rgb565
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_rgb888: BOOLEAN
			-- the pixel format of Current is rgb888
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_rgba4444: BOOLEAN
			-- the pixel format of Current is rgba4444
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_rgba5551: BOOLEAN
			-- the pixel format of Current is rgba5551
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_rgba8888: BOOLEAN
			-- the pixel format of Current is rgba8888
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_rgbx8888: BOOLEAN
			-- the pixel format of Current is rgbx8888
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_type_array_natural_16: BOOLEAN
			-- the pixel format of Current is of type array of 16 bits natural number (ARRAYU16)
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_type_array_natural_32: BOOLEAN
			-- the pixel format of Current is of type array of 32 bits natural number (ARRAYU16)
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_type_array_natural_8: BOOLEAN
			-- the pixel format of Current is of type array of 8 bits natural number (ARRAYU8)
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_type_index_1: BOOLEAN
			-- the pixel format of Current is of type index 1 bit
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_type_index_4: BOOLEAN
			-- the pixel format of Current is of type index 4 bits
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_type_index_8: BOOLEAN
			-- the pixel format of Current is of type index 8 bits
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_type_packed_16: BOOLEAN
			-- the pixel format of Current is of type packed 16 bits
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_type_packed_32: BOOLEAN
			-- the pixel format of Current is of type packed 32 bits
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_type_packed_8: BOOLEAN
			-- the pixel format of Current is of type packed 8 bits
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_type_unknown: BOOLEAN
			-- the pixel format of Current is not of a known type
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_unknown: BOOLEAN
			-- the pixel format of Current is unknown
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_unsuported: BOOLEAN
			-- the pixel format of Current is not currently supported
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_uyvy: BOOLEAN
			-- the pixel format of Current is uyvy
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_yuy2: BOOLEAN
			-- the pixel format of Current is yuy2
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_yv12: BOOLEAN
			-- the pixel format of Current is yv12
			-- (from GAME_PIXEL_FORMAT_READABLE)

	is_yvyu: BOOLEAN
			-- the pixel format of Current is yvyu
			-- (from GAME_PIXEL_FORMAT_READABLE)

	last_error: READABLE_STRING_GENERAL
			-- The last error generate by the library
			-- (from GAME_SDL_ANY)

	masks: TUPLE [red_mask: NATURAL_32; green_mask: NATURAL_32; blue_mask: NATURAL_32; alpha_mask: NATURAL_32]
			-- Masks representing the location of the red, green, blue and alpha components of the pixel
			-- (from GAME_PIXEL_FORMAT_READABLE)

	out: STRING_8
			-- A text representation of the pixel format of Current.
			-- (from GAME_PIXEL_FORMAT_READABLE)
		ensure -- from ANY
			out_not_void: Result /= Void

	set_abgr1555
			-- Set the pixel format of Current to abgr1555
		ensure
			pixel_format_changed: is_abgr1555

	set_abgr4444
			-- Set the pixel format of Current to abgr4444
		ensure
			pixel_format_changed: is_abgr4444

	set_abgr8888
			-- Set the pixel format of Current to abgr8888
		ensure
			pixel_format_changed: is_abgr8888

	set_argb1555
			-- Set the pixel format of Current to argb1555
		ensure
			pixel_format_changed: is_argb1555

	set_argb2101010
			-- Set the pixel format of Current to argb2101010
		ensure
			pixel_format_changed: is_argb2101010

	set_argb4444
			-- Set the pixel format of Current to argb4444
		ensure
			pixel_format_changed: is_argb4444

	set_argb8888
			-- Set the pixel format of Current to argb8888
		ensure
			pixel_format_changed: is_argb8888

	set_bgr24
			-- Set the pixel format of Current to bgr24
		ensure
			pixel_format_changed: is_bgr24

	set_bgr555
			-- Set the pixel format of Current to bgr555
		ensure
			pixel_format_changed: is_bgr555

	set_bgr565
			-- Set the pixel format of Current to bgr565
		ensure
			pixel_format_changed: is_bgr565

	set_bgr888
			-- Set the pixel format of Current to bgr888
		ensure
			pixel_format_changed: is_bgr888

	set_bgra4444
			-- Set the pixel format of Current to bgra4444
		ensure
			pixel_format_changed: is_bgra4444

	set_bgra5551
			-- Set the pixel format of Current to bgra5551
		ensure
			pixel_format_changed: is_bgra5551

	set_bgra8888
			-- Set the pixel format of Current to bgra8888
		ensure
			pixel_format_changed: is_bgra8888

	set_bgrx8888
			-- Set the pixel format of Current to bgrx8888
		ensure
			pixel_format_changed: is_bgrx8888

	set_index1lsb
			-- Set the pixel format of Current to index1lsb
		ensure
			pixel_format_changed: is_index1lsb

	set_index1msb
			-- Set the pixel format of Current to index1msb
		ensure
			pixel_format_changed: is_index1msb

	set_index4lsb
			-- Set the pixel format of Current to index4lsb
		ensure
			pixel_format_changed: is_index4lsb

	set_index4msb
			-- Set the pixel format of Current to index4msb
		ensure
			pixel_format_changed: is_index4msb

	set_index8
			-- Set the pixel format of Current to index8
		ensure
			pixel_format_changed: is_index8

	set_iyuv
			-- Set the pixel format of Current to iyuv
		ensure
			pixel_format_changed: is_iyuv

	set_rgb24
			-- Set the pixel format of Current to rgb24
		ensure
			pixel_format_changed: is_rgb24

	set_rgb332
			-- Set the pixel format of Current to rgb332
		ensure
			pixel_format_changed: is_rgb332

	set_rgb444
			-- Set the pixel format of Current to rgb444
		ensure
			pixel_format_changed: is_rgb444

	set_rgb555
			-- Set the pixel format of Current to rgb555
		ensure
			pixel_format_changed: is_rgb555

	set_rgb565
			-- Set the pixel format of Current to rgb565
		ensure
			pixel_format_changed: is_rgb565

	set_rgb888
			-- Set the pixel format of Current to rgb888
		ensure
			pixel_format_changed: is_rgb888

	set_rgba4444
			-- Set the pixel format of Current to rgba4444
		ensure
			pixel_format_changed: is_rgba4444

	set_rgba5551
			-- Set the pixel format of Current to rgba5551
		ensure
			pixel_format_changed: is_rgba5551

	set_rgba8888
			-- Set the pixel format of Current to rgba8888
		ensure
			pixel_format_changed: is_rgba8888

	set_rgbx8888
			-- Set the pixel format of Current to rgbx8888
		ensure
			pixel_format_changed: is_rgbx8888

	set_unknown
			-- Set the pixel format of Current to unknown
		ensure
			pixel_format_changed: is_unknown

	set_uyvy
			-- Set the pixel format of Current to uyvy
		ensure
			pixel_format_changed: is_uyvy

	set_yuy2
			-- Set the pixel format of Current to yuy2
		ensure
			pixel_format_changed: is_yuy2

	set_yv12
			-- Set the pixel format of Current to yv12
		ensure
			pixel_format_changed: is_yv12

	set_yvyu
			-- Set the pixel format of Current to yvyu
		ensure
			pixel_format_changed: is_yvyu
	
feature -- Comparison

	frozen deep_equal (a: detachable ANY; b: like arg #1): BOOLEAN
			-- Are a and b either both void
			-- or attached to isomorphic object structures?
			-- (from ANY)
		ensure -- from ANY
			instance_free: class
			shallow_implies_deep: standard_equal (a, b) implies Result
			both_or_none_void: (a = Void) implies (Result = (b = Void))
			same_type: (Result and (a /= Void)) implies (b /= Void and then a.same_type (b))
			symmetric: Result implies deep_equal (b, a)

	frozen equal (a: detachable ANY; b: like arg #1): BOOLEAN
			-- Are a and b either both void or attached
			-- to objects considered equal?
			-- (from ANY)
		ensure -- from ANY
			instance_free: class
			definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.is_equal (b))

	frozen is_deep_equal alias "≡≡≡" (other: GAME_PIXEL_FORMAT): BOOLEAN
			-- Are Current and other attached to isomorphic object structures?
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
		ensure -- from ANY
			shallow_implies_deep: standard_is_equal (other) implies Result
			same_type: Result implies same_type (other)
			symmetric: Result implies other.is_deep_equal (Current)

	frozen standard_equal (a: detachable ANY; b: like arg #1): BOOLEAN
			-- Are a and b either both void or attached to
			-- field-by-field identical objects of the same type?
			-- Always uses default object comparison criterion.
			-- (from ANY)
		ensure -- from ANY
			instance_free: class
			definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.standard_is_equal (b))

	frozen standard_is_equal alias "" (other: GAME_PIXEL_FORMAT): BOOLEAN
			-- Is other attached to an object of the same type
			-- as current object, and field-by-field identical to it?
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
		ensure -- from ANY
			same_type: Result implies same_type (other)
			symmetric: Result implies other.standard_is_equal (Current)
	
feature -- Status report

	conforms_to (other: ANY): BOOLEAN
			-- Does type of current object conform to type
			-- of other (as per Eiffel: The Language, chapter 13)?
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void

	same_type (other: ANY): BOOLEAN
			-- Is type of current object identical to type of other?
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
		ensure -- from ANY
			definition: Result = (conforms_to (other) and other.conforms_to (Current))
	
feature -- Duplication

	copy (other: GAME_PIXEL_FORMAT)
			-- Update current object using fields of object attached
			-- to other, so as to yield equal objects.
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
			type_identity: same_type (other)
		ensure -- from ANY
			is_equal: Current ~ other

	frozen deep_copy (other: GAME_PIXEL_FORMAT)
			-- Effect equivalent to that of:
			--		copy (other . deep_twin)
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
		ensure -- from ANY
			deep_equal: deep_equal (Current, other)

	frozen deep_twin: GAME_PIXEL_FORMAT
			-- New object structure recursively duplicated from Current.
			-- (from ANY)
		ensure -- from ANY
			deep_twin_not_void: Result /= Void
			deep_equal: deep_equal (Current, Result)

	frozen standard_copy (other: GAME_PIXEL_FORMAT)
			-- Copy every field of other onto corresponding field
			-- of current object.
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
			type_identity: same_type (other)
		ensure -- from ANY
			is_standard_equal: standard_is_equal (other)

	frozen standard_twin: GAME_PIXEL_FORMAT
			-- New object field-by-field identical to other.
			-- Always uses default copying semantics.
			-- (from ANY)
		ensure -- from ANY
			standard_twin_not_void: Result /= Void
			equal: standard_equal (Result, Current)

	frozen twin: GAME_PIXEL_FORMAT
			-- New object equal to Current
			-- twin calls copy; to change copying/twinning semantics, redefine copy.
			-- (from ANY)
		ensure -- from ANY
			twin_not_void: Result /= Void
			is_equal: Result ~ Current
	
feature -- Basic operations

	frozen default: detachable GAME_PIXEL_FORMAT
			-- Default value of object's type
			-- (from ANY)

	frozen default_pointer: POINTER
			-- Default value of type POINTER
			-- (Avoid the need to write p.default for
			-- some p of type POINTER.)
			-- (from ANY)
		ensure -- from ANY
			instance_free: class

	default_rescue
			-- Process exception for routines with no Rescue clause.
			-- (Default: do nothing.)
			-- (from ANY)

	frozen do_nothing
			-- Execute a null action.
			-- (from ANY)
		ensure -- from ANY
			instance_free: class
	
feature -- Implementation

	dispose
			-- Action to be executed just before garbage collection
			-- reclaims an object.
			-- Effect it in descendants to perform specific dispose
			-- actions. Those actions should only take care of freeing
			-- external resources; they should not perform remote calls
			-- on other objects since these may also be dead and reclaimed.
			-- (from GAME_PIXEL_FORMAT_READABLE)

	set_color_palette (a_color_palette: detachable GAME_COLOR_PALETTE)
			-- Assign the color_palette with the value of a_color_palette
			-- (from GAME_PIXEL_FORMAT_READABLE)
		require -- from GAME_PIXEL_FORMAT_READABLE
			is_indexed: is_indexed
			has_valid_color_number: attached a_color_palette implies a_color_palette.count = (1).bit_shift_left (bits_per_pixel)
		ensure -- from GAME_PIXEL_FORMAT_READABLE
			is_set: not has_error implies color_palette ~ a_color_palette
	
feature -- Output

	Io: STD_FILES
			-- Handle to standard file setup
			-- (from ANY)
		ensure -- from ANY
			instance_free: class
			io_not_void: Result /= Void

	print (o: detachable ANY)
			-- Write terse external representation of o
			-- on standard output.
			-- (from ANY)
		ensure -- from ANY
			instance_free: class

	frozen tagged_out: STRING_8
			-- New string containing terse printable representation
			-- of current object
			-- (from ANY)
		ensure -- from ANY
			tagged_out_not_void: Result /= Void
	
feature -- Platform

	Operating_environment: OPERATING_ENVIRONMENT
			-- Objects available from the operating system
			-- (from ANY)
		ensure -- from ANY
			instance_free: class
			operating_environment_not_void: Result /= Void
	
invariant
		-- from ANY
	reflexive_equality: standard_is_equal (Current)
	reflexive_conformance: conforms_to (Current)

end -- class GAME_PIXEL_FORMAT

Generated by ISE EiffelStudio