indexing
description: "Defines the style, color and pattern of a physical brush. Encapsulate the C struct LOGPEN (a WEL_LOG_BRUSH is NOT a BRUSH, this is a structure.)"
status: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
class interface
WEL_LOG_BRUSH
create
make (a_style: INTEGER; a_color: WEL_COLOR_REF; a_hatch: INTEGER)
a_stylea_color
a_hatch
WEL_BRUSH_STYLE_CONSTANTSa_style
WEL_HS_CONSTANTSa_hatch
require
color_not_void: a_color /= void
ensure
style_set: style = a_style
hatch_set: hatch = a_hatch
make_by_brush (brush: WEL_BRUSH)
brush
require
brush_not_void: brush /= void
brush_exists: brush.exists
ensure
style_set: style = brush.style
color_set: color.is_equal (brush.color)
hatch_set: hatch = brush.hatch
feature
color: WEL_COLOR_REF
ensure
result_not_void: Result /= void
hatch: INTEGER
item: POINTER
WEL_ANY
style: INTEGER
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
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
set_hatch (a_hatch: INTEGER)
hatcha_hatch
ensure
hatch_set: hatch = a_hatch
set_item (an_item: POINTER)
iteman_item
WEL_ANY
ensure WEL_ANY
item_set: item = an_item
set_style (a_style: INTEGER)
stylea_style
ensure
style_set: style = a_style
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
ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)
end -- WEL_LOG_BRUSH