indexing
description: "Defines the style, width and color of a pen."
status: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
class interface
WEL_LOG_PEN
create
make (a_style, a_width: INTEGER; a_color: WEL_COLOR_REF)
a_stylea_width
a_color
WEL_PS_CONSTANTSa_style
require
valid_pen_style_constant: valid_pen_style_constant (a_style)
positive_width: a_width >= 0
color_not_void: a_color /= void
ensure
set_style: style = a_style
set_width: width = a_width
set_color: color.item = a_color.item
make_by_pen (pen: WEL_PEN)
pen
require
pen_not_void: pen /= void
pen_exists: pen.exists
feature
color: WEL_COLOR_REF
ensure
result_not_void: Result /= void
item: POINTER
WEL_ANY
style: INTEGER
ensure
valid_result: valid_pen_style_constant (Result)
width: INTEGER
ensure
positive_result: Result >= 0
feature
structure_size: INTEGER
ensure WEL_STRUCTURE
positive_result: Result > 0
feature
exists: BOOLEAN
item
WEL_ANY
ensure WEL_ANY
Result = (item /= default_pointer)
shared: BOOLEAN
item
item
destroy_item
item
WEL_ANY
feature
valid_pen_style_constant (c: INTEGER): BOOLEAN
c
WEL_PS_CONSTANTS
feature
set_shared
shared
WEL_ANY
ensure WEL_ANY
shared: shared
set_unshared
shared
WEL_ANY
ensure WEL_ANY
unshared: not shared
feature
set_color (a_color: WEL_COLOR_REF)
colora_color
require
a_color_not_void: a_color /= void
ensure
set_color: color.item = a_color.item
set_item (an_item: POINTER)
iteman_item
WEL_ANY
ensure WEL_ANY
item_set: item = an_item
set_style (a_style: INTEGER)
stylea_style
require
valid_pen_style_constant: valid_pen_style_constant (a_style)
ensure
set_style: style = a_style
set_width (a_width: INTEGER)
widtha_width
require
positive_width: a_width >= 0
ensure
set_width: width = a_width
feature
dispose
Current
Current
WEL_ANY
feature
to_integer: INTEGER
item
WEL_ANY
ensure WEL_ANY
Result = cwel_pointer_to_integer (item)
feature
initialize
WEL_STRUCTURE
require WEL_STRUCTURE
exists: exists
initialize_with_character (a_character: CHARACTER)
a_character
WEL_STRUCTURE
require WEL_STRUCTURE
exists: exists
memory_copy (source_pointer: POINTER; length: INTEGER)
lengthsource_pointeritem
WEL_STRUCTURE
require WEL_STRUCTURE
length_small_enough: length <= structure_size
length_large_enough: length > 0
exists: exists
invariant
color_not_void: color /= void
positive_width: width >= 0
ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)
end -- WEL_LOG_PEN