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

em.widget.background

Class EM_VERTICAL_GRADIENT_BACKGROUND


Direct ancestors

EM_BACKGROUND

Creation

Features

Invariants

indexing

description

A color background which interpolates the background color
between a top and a bottom colors.

date

$Date: 2005/10/23 11:10:45 $

revision

$Revision: 1.5 $

class

EM_VERTICAL_GRADIENT_BACKGROUND

inherit

EM_BACKGROUND

create

make_from_colors (a_top_color: like top_color; a_bottom_color: like bottom_color)

-- Initialise background with a_top_color and a_bottom_color.

require
a_top_color_not_void: a_top_color /= Void
a_bottom_color_not_void: a_bottom_color /= Void
ensure
top_color_set: top_color = a_top_color
bottom_color_set: bottom_color = a_bottom_color

feature -- Access

bottom_color: EM_COLOR

-- Bottom color

top_color: EM_COLOR

-- Top color

feature -- Element change

set_bottom_color (a_color: like bottom_color)

-- Set bottom_color to a_color.

require
a_color_not_void: a_color /= Void
ensure
bottom_color_set: bottom_color = a_color
set_top_color (a_color: like top_color)

-- Set top_color to a_color.

require
a_color_not_void: a_color /= Void
ensure
top_color_set: top_color = a_color

feature -- Drawing

draw_on (widget: EM_WIDGET)

-- Draw background on widget.

-- (From EM_BACKGROUND)

require
a_widget_not_void: a_widget /= Void

invariant

top_color_not_void: top_color /= Void
bottom_color_not_void: bottom_color /= Void

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

end