Eiffel Media API
Overview Cluster Class Classes Index      Previous Next      Top Features

em.video

Class EM_PALETTE



Creation

Features

Invariants

indexing

description

Color palette for the EiffelMedia library.

date

$Date: 2005/10/23 16:43:26 $

revision

$Revision: 1.10 $

class

EM_PALETTE

create {EM_PIXELFORMAT}

make_from_pointer (a_pointer: POINTER)

-- Create a color palette.

feature -- Access

color (index: INTEGER): EM_COLOR

-- Color at index in palette

require
index_valid: 0 <= index and index < number_of_colors
ensure
color_not_void: Result /= Void
number_of_colors: INTEGER

-- Number of colors in palette

feature -- Element change

set_color (a_color: EM_COLOR; index: INTEGER)

-- Set color at an_index to a_color.

require
index_valid: 0 <= index and index < number_of_colors
ensure
color_set: True

feature {EM_PIXELFORMAT} -- Implementation

sdl_color_struct_size: INTEGER

-- Size of SDL Color struct

sdl_palette_struct: SDL_PALETTE_STRUCT

-- SDL struct of palette

invariant

sdl_palette_strucht_not_void: sdl_palette_struct /= Void

-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)

end