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

em.video.font

Class EM_FONT


Known direct descendants

EM_BMP_FONT, EM_TTF_FONT

Features

Invariants

indexing

description

Any font class should implement EM_FONT. EM_FONT gives the possibility
to draw a CHARACTER to an EM_SURFACE.

date

$Date: 2005/10/23 10:59:04 $

revision

$Revision: 1.8 $

deferred class

EM_FONT

feature -- Measurement

height (a_character: CHARACTER): INTEGER

-- Height of a_character

string_height (a_string: STRING): INTEGER

-- Height of a_string

string_width (a_string: STRING): INTEGER

-- Width of a_string

width (a_character: CHARACTER): INTEGER

-- Width of a_character

feature -- Drawing

draw ( a_character: CHARACTER; a_surface: EM_SURFACE; x: INTEGER; y:INTEGER)

-- Draws a_character on a_surface to position x y.

require
a_surface /= void
draw_part ( rect: EM_RECT; a_character: CHARACTER; a_surface: EM_SURFACE; x: INTEGER; y: INTEGER)

-- Draws rect part of a_character on a_surface to position x y.

require
a_surface /= voidrect /= void
draw_string (a_string: STRING; a_surface: EM_SURFACE; x: INTEGER; y: INTEGER)

-- Draws a_string on a_surface to position x y.

require
a_string_not_void: a_string /= void and then a_string.count > 0
a_surface_not_void: a_surface /= void

invariant

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

end