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

em.widget.background

Class EM_HORIZONTAL_GRADIENT_BACKGROUND


Direct ancestors

EM_BACKGROUND

Creation

Features

Invariants

indexing

description

A color background which interpolates the background color
between a left and a right colors.

date

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

revision

$Revision: 1.5 $

class

EM_HORIZONTAL_GRADIENT_BACKGROUND

inherit

EM_BACKGROUND

create

make_from_colors (a_left_color: like left_color; a_right_color: like right_color)

-- Initialise background with a_left_color and a_right_color.

require
a_left_color: a_left_color /= Void
a_right_color_not_void: a_right_color /= Void
ensure
left_color_set: left_color = a_left_color
right_color_set: right_color = a_right_color

feature -- Access

left_color: EM_COLOR

-- Left color

right_color: EM_COLOR

-- Right color

feature -- Element change

set_left_color (a_color: like left_color)

-- Set left_color to a_color.

require
a_color_not_void: a_color /= Void
ensure
left_color_set: left_color = a_color
set_right_color (a_color: like right_color)

-- Set right_color to a_color.

require
a_color_not_void: a_color /= Void
ensure
right_color_set: right_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

left_color_not_void: left_color /= Void
right_color_not_void: right_color /= Void

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

end