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

em.widget.background

Class EM_BITMAP_BACKGROUND


Direct ancestors

EM_BACKGROUND, EM_SHARED_BITMAP_FACTORY, EM_SHARED_ERROR_HANDLER

Known direct descendants

EM_ALPHA_COLOR_BACKGROUND, EM_SHIFTED_BITMAP_BACKGROUND, EM_STRETCHED_BITMAP_BACKGROUND

Creation

Features

Invariants

indexing

description

A background consisting of a bitmap.
The bitmap is repeated in x and y direction if necessary.

date

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

revision

$Revision: 1.12 $

class

EM_BITMAP_BACKGROUND

inherit

EM_BACKGROUND

create

make_from_bitmap (a_bitmap: like bitmap)

-- Initialise background with image a_bitmap.

require
a_bitmap_not_void: a_bitmap /= Void
ensure
bitmap_set: bitmap = a_bitmap
make_from_file (a_filename: STRING)

-- Initialise background with image denoted by a_filename.

require
a_filename_not_void: a_filename /= Void
ensure
bitmap_created: bitmap /= Void

feature -- Access

bitmap: EM_BITMAP

-- Bitmap that is drawn as background

feature -- Element change

set_bitmap (a_bitmap: like bitmap)

-- Set bitmap to a_bitmap.

require
a_bitmap_not_void: a_bitmap /= Void
ensure
bitmap_set: bitmap = a_bitmap

feature -- Drawing

draw_on (a_widget: EM_WIDGET)

-- Draw background on a_widget.

-- (From EM_BACKGROUND)

require
a_widget_not_void: a_widget /= Void

invariant

bitmap_not_void: bitmap /= Void

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

end