indexing
description: "Windows Bitmap, which can be loaded from a resource or created from an existing DIB."
status: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
class interface
WEL_BITMAP
create
make_by_id (id: INTEGER)
id
require WEL_RESOURCE
valid_id: id > 0
ensure WEL_RESOURCE
not_shared: not shared
make_by_name (name: STRING)
name
require WEL_RESOURCE
name_not_void: name /= void
name_not_empty: not name.is_empty
ensure WEL_RESOURCE
not_shared: not shared
make_by_dib (a_dc: WEL_DC; dib: WEL_DIB; mode: INTEGER)
WEL_BITMAPdiba_dc
modeWEL_DIB_COLORS_CONSTANTS
mode
require
a_dc_not_void: a_dc /= void
a_dc_exists: a_dc.exists
dib_not_void: dib /= void
valid_mode: valid_dib_colors_constant (mode)
ensure
bitmap_created: item /= item.default
make_compatible (a_dc: WEL_DC; a_width, a_height: INTEGER)
a_dca_widthwidth
a_heightheight
require
a_dc_not_void: a_dc /= void
a_dc_exists: a_dc.exists
positive_width: a_width >= 0
positive_height: a_height >= 0
make_direct (a_width, a_height, a_planes, a_bits_per_pixel: INTEGER; a_data: STRING)
a_widtha_heighta_planes
a_bits_per_pixel
a_data
require
positive_width: a_width >= 0
positive_height: a_height >= 0
positive_planes: a_planes >= 0
positive_bits_per_pixel: a_bits_per_pixel >= 0
data_not_void: a_data /= void
data_count_big_enough: a_data.count >= 2 * (a_width * a_height * a_bits_per_pixel * a_planes) // 8
make_indirect (a_log_bitmap: WEL_LOG_BITMAP)
a_log_bitmap
require
a_log_bitmap_not_void: a_log_bitmap /= void
make_by_pointer (a_pointer: POINTER)
itema_pointer
item
a_pointer
WEL_GDI_ANY
ensure WEL_ANY
item_set: item = a_pointer
shared: shared
make_by_bitmap (a_bitmap: WEL_BITMAP)
WEL_BITMAPWEL_BITMAP
feature
gdi_objects_count: INTEGER
WEL_GDI_ANY
height: INTEGER
require
exists: exists
ensure
positive_result: Result >= 0
item: POINTER
WEL_ANY
log_bitmap: WEL_LOG_BITMAP
Current
require
exists: exists
ensure
result_not_void: Result /= void
width: INTEGER
require
exists: exists
ensure
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_dib_colors_constant (c: INTEGER): BOOLEAN
c
WEL_DIB_COLORS_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_item (an_item: POINTER)
iteman_item
WEL_ANY
ensure WEL_ANY
item_set: item = an_item
feature
delete
Current
WEL_REFERENCE_TRACKABLE
require WEL_REFERENCE_TRACKABLE
reference_not_tracked: not reference_tracked
ensure WEL_REFERENCE_TRACKABLE
destroyed: not shared implies not exists
dispose
Current
delete
WEL_REFERENCE_TRACKABLE
feature
to_integer: INTEGER
item
WEL_ANY
ensure WEL_ANY
Result = cwel_pointer_to_integer (item)
feature
set_di_bits (a_dc: WEL_DC; start_line, length: INTEGER; dib: WEL_DIB; mode: INTEGER)
dibstart_line
lengthmode
WEL_DIB_COLORS_CONSTANTSmode
require
exists: exists
a_dc_not_void: a_dc /= void
a_dc_exists: a_dc.exists
dib_not_void: dib /= void
valid_mode: valid_dib_colors_constant (mode)
feature
reference_tracked: BOOLEAN
Current
WEL_REFERENCE_TRACKABLE
references_count: INTEGER
WEL_REFERENCE_TRACKABLE
feature
decrement_reference
delete
WEL_REFERENCE_TRACKABLE
require WEL_REFERENCE_TRACKABLE
exists: exists
tracking_references_started: reference_tracked
enable_reference_tracking
references_tracked
WEL_REFERENCE_TRACKABLE
require WEL_REFERENCE_TRACKABLE
exists: exists
tracking_reference_not_started: not reference_tracked
increment_reference
WEL_REFERENCE_TRACKABLE
require WEL_REFERENCE_TRACKABLE
exists: exists
tracking_references_started: reference_tracked
object_id: INTEGER
Current
WEL_REFERENCE_TRACKABLE
invariant
ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)
end -- WEL_BITMAP