indexing
	description: "Windows implementation for EB_BITMAP_I."
	legal: "See notice at end of class."
	status: "See notice at end of class."
	keywords: "pixmap, mask, bitmap"
	date: "$Date: 2006-07-10 10:43:17 -0700 (Mon, 10 Jul 2006) $"
	revision: "$Revision: 61132 $"

class interface
	EV_BITMAP_IMP

create 
	make (an_interface: like interface)
			-- Create an empty drawing area.
		require -- from EV_ANY_I
			an_interface_not_void: an_interface /= Void
		ensure -- from EV_ANY_I
			interface_assigned: interface = an_interface
			base_make_called: base_make_called

feature -- Initialization

	initialize
			-- Set up action sequence connections and create graphics context.
		require -- from  EV_ANY_I
			True
		ensure -- from EV_ANY_I
			is_initialized: is_initialized

	make (an_interface: like interface)
			-- Create an empty drawing area.
		require -- from EV_ANY_I
			an_interface_not_void: an_interface /= Void
		ensure -- from EV_ANY_I
			interface_assigned: interface = an_interface
			base_make_called: base_make_called
	
feature -- Access

	arc_cosine (v: REAL_32): REAL_32
			-- Trigonometric arccosine of `v'
			-- (from SINGLE_MATH)

	arc_sine (v: REAL_32): REAL_32
			-- Trigonometric arcsine of `v'
			-- (from SINGLE_MATH)

	arc_tangent (v: REAL_32): REAL_32
			-- Trigonometric arctangent of `v'
			-- (from SINGLE_MATH)

	background_color: EV_COLOR
			-- Color used to fill figures.
			-- (from EV_DRAWABLE_IMP)

	ceiling (v: REAL_32): REAL_32
			-- Least integral value greater than or equal to `v'
			-- (from SINGLE_MATH)

	check_instruction: INTEGER_32 is 7
			-- Exception code for violated check
			-- (from EXCEP_CONST)

	class_invariant: INTEGER_32 is 6
			-- Exception code for violated class invariant
			-- (from EXCEP_CONST)

	clip_area: EV_RECTANGLE
			-- Clip area used to clip drawing.
			-- If set to Void, no clipping is applied.
			-- (from EV_DRAWABLE_IMP)

	com_exception: INTEGER_32 is 28
			-- Exception code for a COM error.
			-- (from EXCEP_CONST)

	cosine (v: REAL_32): REAL_32
			-- Trigonometric cosine of radian `v' approximated
			-- in the range [-pi/4, +pi/4]
			-- (from SINGLE_MATH)

	create_on_deferred: INTEGER_32 is 17
			-- Create on deferred
			-- (from EXCEP_CONST)

	dashed_line_style: BOOLEAN
			-- Are lines drawn dashed?
			-- (from EV_DRAWABLE_IMP)

	developer_exception: INTEGER_32 is 24
			-- Exception code for developer exception
			-- (from EXCEP_CONST)

	dollar_applied_to_melted_feature: INTEGER_32 is 26
			-- $ applied to melted feature
			-- (from EXCEP_CONST)

	drawing_mode: INTEGER_32
			-- Logical operation on pixels when drawing.
			-- (from EV_DRAWABLE_IMP)
		require -- from  EV_DRAWABLE_I
			True

	eiffel_runtime_fatal_error: INTEGER_32 is 25
			-- Eiffel run-time fatal error
			-- (from EXCEP_CONST)

	eiffel_runtime_panic: INTEGER_32 is 13
			-- Eiffel run-time panic
			-- (from EXCEP_CONST)

	euler: REAL_64 is 2.7182818284590452354
			-- Logarithm base
			-- (from MATH_CONST)

	exception_in_signal_handler: INTEGER_32 is 20
			-- Exception in signal handler
			-- (from EXCEP_CONST)

	external_exception: INTEGER_32 is 18
			-- Exception code for operating system error
			-- which does not set the `errno' variable
			-- (Unix-specific)
			-- (from EXCEP_CONST)

	floating_point_exception: INTEGER_32 is 5
			-- Exception code for floating point exception
			-- (from EXCEP_CONST)

	floor (v: REAL_32): REAL_32
			-- Greatest integral value less than or equal to `v'
			-- (from SINGLE_MATH)

	font: EV_FONT
			-- Font of `Current'.
			-- (from EV_FONTABLE_IMP)
		require -- from  EV_FONTABLE_I
			True
		ensure -- from EV_FONTABLE_I
			not_void: Result /= Void

	foreground_color: EV_COLOR
			-- Color used for lines and text.
			-- (from EV_DRAWABLE_IMP)

	generating_type: STRING_8
			-- Name of current object's generating type
			-- (type of which it is a direct instance)
			-- (from ANY)

	generator: STRING_8
			-- Name of current object's generating class
			-- (base class of the type of which it is a direct instance)
			-- (from ANY)

	height: INTEGER_32
			-- Height

	incorrect_inspect_value: INTEGER_32 is 9
			-- Exception code for inspect value which is not one
			-- of the inspect constants, if there is no Else_part
			-- (from EXCEP_CONST)

	internal_font: EV_FONT
			-- Font of `Current' for internal queries.
			-- Faster than calling font as we do not need to
			-- create a new EV_FONT every time.
			-- (from EV_FONTABLE_IMP)

	internal_font_height: INTEGER_32
			-- Height required to correctly display font of `Current' in pixels.
			-- (from EV_FONTABLE_IMP)
		ensure -- from EV_FONTABLE_IMP
			result_non_negative: Result >= 0

	io_exception: INTEGER_32 is 21
			-- Exception code for I/O error
			-- (from EXCEP_CONST)

	line_width: INTEGER_32
			-- Line thickness.
			-- (from EV_DRAWABLE_IMP)

	log (v: REAL_32): REAL_32
			-- Natural logarithm of `v'
			-- (from SINGLE_MATH)
		require -- from SINGLE_MATH
			v > 0.0

	log10 (v: REAL_32): REAL_32
			-- Base 10 logarithm of `v'
			-- (from SINGLE_MATH)
		require -- from SINGLE_MATH
			v > 0.0

	log_2 (v: REAL_32): REAL_32
			-- Base 2 logarithm of `v'
			-- (from SINGLE_MATH)
		require -- from SINGLE_MATH
			v > 0.0

	loop_invariant: INTEGER_32 is 11
			-- Exception code for violated loop invariant
			-- (from EXCEP_CONST)

	loop_variant: INTEGER_32 is 10
			-- Exception code for non-decreased loop variant
			-- (from EXCEP_CONST)

	no_more_memory: INTEGER_32 is 2
			-- Exception code for failed memory allocation
			-- (from EXCEP_CONST)

	number_of_codes: INTEGER_32 is 29
			-- How many codes are there to represent exceptions?
			-- (from EXCEP_CONST)

	operating_system_exception: INTEGER_32 is 22
			-- Exception code for operating system error
			-- which sets the `errno' variable
			-- (Unix-specific)
			-- (from EXCEP_CONST)

	out_of_memory: INTEGER_32 is 15
			-- Out of memory (cannot be ignored)
			-- (from EXCEP_CONST)

	pi: REAL_64 is 3.14159265358979323846
			-- (from MATH_CONST)

	postcondition: INTEGER_32 is 4
			-- Exception code for violated postcondition
			-- (from EXCEP_CONST)

	precondition: INTEGER_32 is 3
			-- Exception code for violated precondition
			-- (from EXCEP_CONST)

	rescue_exception: INTEGER_32 is 14
			-- Exception code for exception in rescue clause
			-- (from EXCEP_CONST)

	resumption_failed: INTEGER_32 is 16
			-- Resumption failed (retry did not succeed)
			-- (from EXCEP_CONST)

	retrieve_exception: INTEGER_32 is 23
			-- Exception code for retrieval error
			-- may be raised by `retrieved' in `IO_MEDIUM'.
			-- (from EXCEP_CONST)

	routine_failure: INTEGER_32 is 8
			-- Exception code for failed routine
			-- (from EXCEP_CONST)

	runtime_check_exception: INTEGER_32 is 29
			-- Exception code for runtime check being violated.
			-- (from EXCEP_CONST)

	runtime_io_exception: INTEGER_32 is 27
			-- Exception code for I/O error raised by runtime functions
			-- such as store/retrieve, file access...
			-- (from EXCEP_CONST)

	signal_exception: INTEGER_32 is 12
			-- Exception code for operating system signal
			-- (from EXCEP_CONST)

	sine (v: REAL_32): REAL_32
			-- Trigonometric sine of radian `v' approximated
			-- in range [-pi/4, +pi/4]
			-- (from SINGLE_MATH)

	sqrt (v: REAL_32): REAL_32
			-- Square root of `v'
			-- (from SINGLE_MATH)
		require -- from SINGLE_MATH
			v >= 0.0

	sqrt2: REAL_64 is 1.41421356237309504880
			-- Square root of 2
			-- (from MATH_CONST)

	sub_pixmap (area: EV_RECTANGLE): EV_PIXMAP
			-- Return the subpixmap of `Current' described by rectangle `area'.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			area_not_void: area /= Void
		ensure -- from EV_DRAWABLE_I
			result_not_void: Result /= Void

	tangent (v: REAL_32): REAL_32
			-- Trigonometric tangent of radian `v' approximated
			-- in range [-pi/4, +pi/4]
			-- (from SINGLE_MATH)

	tile: EV_PIXMAP
			-- Pixmap that is used to instead of background_color.
			-- If set to Void, background_color is used to fill.
			-- (from EV_DRAWABLE_IMP)

	valid_code (c: INTEGER_32): BOOLEAN
			-- Is `c' a valid code to represent some kind of exceptions?
			-- (from EXCEP_CONST)

	void_assigned_to_expanded: INTEGER_32 is 19
			-- Exception code for assignment of void value
			-- to expanded entity
			-- (from EXCEP_CONST)

	void_call_target: INTEGER_32 is 1
			-- Exception code for feature applied to void reference
			-- (from EXCEP_CONST)

	width: INTEGER_32
			-- Width
	
feature -- Comparison

	frozen deep_equal (some: ANY; other: like arg #1): BOOLEAN
			-- Are `some' and `other' either both void
			-- or attached to isomorphic object structures?
			-- (from ANY)
		ensure -- from ANY
			shallow_implies_deep: standard_equal (some, other) implies Result
			both_or_none_void: (some = Void) implies (Result = (other = Void))
			same_type: (Result and (some /= Void)) implies some.same_type (other)
			symmetric: Result implies deep_equal (other, some)

	frozen equal (some: ANY; other: like arg #1): BOOLEAN
			-- Are `some' and `other' either both void or attached
			-- to objects considered equal?
			-- (from ANY)
		ensure -- from ANY
			definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.is_equal (other))

	is_equal (other: like Current): BOOLEAN
			-- Is `other' attached to an object considered
			-- equal to current object?
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
		ensure -- from ANY
			symmetric: Result implies other.is_equal (Current)
			consistent: standard_is_equal (other) implies Result

	frozen standard_equal (some: ANY; other: like arg #1): BOOLEAN
			-- Are `some' and `other' either both void or attached to
			-- field-by-field identical objects of the same type?
			-- Always uses default object comparison criterion.
			-- (from ANY)
		ensure -- from ANY
			definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.standard_is_equal (other))

	frozen standard_is_equal (other: like Current): BOOLEAN
			-- Is `other' attached to an object of the same type
			-- as current object, and field-by-field identical to it?
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
		ensure -- from ANY
			same_type: Result implies same_type (other)
			symmetric: Result implies other.standard_is_equal (Current)
	
feature -- Status report

	assertion_violation: BOOLEAN
			-- Is last exception originally due to a violated
			-- assertion or non-decreasing variant?
			-- (from EXCEPTIONS)

	exception_class_name: STRING_8
			-- Name of the class that includes the recipient
			-- of original form of last exception
			-- (from EXCEPTIONS)

	conforms_to (other: ANY): BOOLEAN
			-- Does type of current object conform to type
			-- of `other' (as per Eiffel: The Language, chapter 13)?
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void

	developer_exception_name: STRING_8
			-- Name of last developer-raised exception
			-- (from EXCEPTIONS)
		require -- from EXCEPTIONS
			applicable: is_developer_exception

	exception: INTEGER_32
			-- Code of last exception that occurred
			-- (from EXCEPTIONS)

	exception_trace: STRING_8
			-- String representation of the exception trace
			-- (from EXCEPTIONS)

	is_developer_exception: BOOLEAN
			-- Is the last exception originally due to
			-- a developer exception?
			-- (from EXCEPTIONS)

	is_developer_exception_of_name (name: STRING_8): BOOLEAN
			-- Is the last exception originally due to a developer
			-- exception of name `name'?
			-- (from EXCEPTIONS)

	is_signal: BOOLEAN
			-- Is last exception originally due to an external
			-- event (operating system signal)?
			-- (from EXCEPTIONS)

	is_system_exception: BOOLEAN
			-- Is last exception originally due to an
			-- external event (operating system error)?
			-- (from EXCEPTIONS)

	meaning (except: INTEGER_32): STRING_8
			-- A message in English describing what `except' is
			-- (from EXCEPTIONS)

	original_class_name: STRING_8
			-- Name of the class that includes the recipient
			-- of original form of last exception
			-- (from EXCEPTIONS)

	original_exception: INTEGER_32
			-- Original code of last exception that triggered
			-- current exception
			-- (from EXCEPTIONS)

	original_recipient_name: STRING_8
			-- Name of the routine whose execution was
			-- interrupted by original form of last exception
			-- (from EXCEPTIONS)

	original_tag_name: STRING_8
			-- Assertion tag for original form of last
			-- assertion violation.
			-- (from EXCEPTIONS)

	recipient_name: STRING_8
			-- Name of the routine whose execution was
			-- interrupted by last exception
			-- (from EXCEPTIONS)

	same_type (other: ANY): BOOLEAN
			-- Is type of current object identical to type of `other'?
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
		ensure -- from ANY
			definition: Result = (conforms_to (other) and other.conforms_to (Current))

	tag_name: STRING_8
			-- Tag of last violated assertion clause
			-- (from EXCEPTIONS)
	
feature -- Status setting

	catch (code: INTEGER_32)
			-- Make sure that any exception of code `code' will be
			-- caught. This is the default.
			-- (from EXCEPTIONS)

	die (code: INTEGER_32)
			-- Terminate execution with exit status `code',
			-- without triggering an exception.
			-- (from EXCEPTIONS)

	ignore (code: INTEGER_32)
			-- Make sure that any exception of code `code' will be
			-- ignored. This is not the default.
			-- (from EXCEPTIONS)

	message_on_failure
			-- Print an exception history table
			-- in case of failure.
			-- This is the default.
			-- (from EXCEPTIONS)

	no_message_on_failure
			-- Do not print an exception history table
			-- in case of failure.
			-- (from EXCEPTIONS)

	exception_raise (name: STRING_8)
			-- Raise a developer exception of name `name'.
			-- (from EXCEPTIONS)

	raise_retrieval_exception (name: STRING_8)
			-- Raise a retrieval exception of name `name'.
			-- (from EXCEPTIONS)

	set_default_font
			-- Make system to use default font.
			-- (from EV_FONTABLE_IMP)

	set_size (a_width, a_height: INTEGER_32)
			-- Set size with `a_width' and `a_height'.
		require -- from EV_BITMAP_I
			x_coordinate_valid: a_width > 0
			y_coordinate_valid: a_height > 0
	
feature -- Element change

	disable_dashed_line_style
			-- Draw lines solid.
			-- (from EV_DRAWABLE_IMP)
		require -- from  EV_DRAWABLE_I
			True
		ensure -- from EV_DRAWABLE_I
			dashed_line_style_disabled: is_usable implies not interface.dashed_line_style

	enable_dashed_line_style
			-- Draw lines dashed.
			-- (from EV_DRAWABLE_IMP)
		require -- from  EV_DRAWABLE_I
			True
		ensure -- from EV_DRAWABLE_I
			dashed_line_style_enabled: is_usable implies interface.dashed_line_style

	remove_clipping
			-- Do not apply any clipping.
			-- (from EV_DRAWABLE_IMP)
		require -- from  EV_DRAWABLE_I
			True
		ensure -- from EV_DRAWABLE_I
			clip_area_void: is_usable implies interface.clip_area = Void

	remove_tile
			-- Do not apply a tile when filling.
			-- (from EV_DRAWABLE_IMP)
		require -- from  EV_DRAWABLE_I
			True
		ensure -- from EV_DRAWABLE_I
			tile_void: is_usable implies interface.tile = Void

	set_background_color (a_color: EV_COLOR)
			-- Assign `a_color' to background_color.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_COLORIZABLE_I
			a_color_not_void: a_color /= Void
		ensure -- from EV_COLORIZABLE_I
			background_color_assigned: is_initialized implies interface.implementation.background_color.is_equal (a_color)

	set_clip_area (an_area: EV_RECTANGLE)
			-- Set an area to clip to.
			-- Set to Void when no clipping should be applied.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			an_area_not_void: an_area /= Void
		ensure -- from EV_DRAWABLE_I
			clip_area_assigned: is_usable implies interface.clip_area.is_equal (an_area)

	set_clip_region (a_region: EV_REGION)
			-- Set an area to clip to.
			-- Set to Void when no clipping should be applied.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			a_region_not_void: a_region /= Void

	set_drawing_mode (a_mode: INTEGER_32)
			-- Set drawing mode to `a_mode'.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			a_mode_valid: valid_drawing_mode (a_mode)
		ensure -- from EV_DRAWABLE_I
			drawing_mode_assigned: is_usable implies interface.drawing_mode = a_mode

	set_font (a_font: EV_FONT)
			-- Set font to `a_font'.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_FONTABLE_I
			a_font_not_void: a_font /= Void
		ensure -- from EV_FONTABLE_I
			assigned: is_usable implies font.is_equal (a_font)

	set_foreground_color (a_color: EV_COLOR)
			-- Assign `a_color' to foreground_color
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_COLORIZABLE_I
			a_color_not_void: a_color /= Void
		ensure -- from EV_COLORIZABLE_I
			foreground_color_assigned: is_initialized implies interface.implementation.foreground_color.is_equal (a_color)

	set_line_width (a_width: INTEGER_32)
			-- Assign `a_width' to line_width.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			a_width_positive_or_zero: a_width >= 0
		ensure -- from EV_DRAWABLE_I
			line_width_assigned: is_usable implies interface.line_width = a_width

	set_tile (a_pixmap: EV_PIXMAP)
			-- Set tile used to fill figures.
			-- Set to Void to use background_color to fill.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			a_pixmap_not_void: a_pixmap /= Void
		ensure -- from EV_DRAWABLE_I
			tile_assigned: is_usable implies interface.tile /= Void
	
feature -- Duplication

	copy (other: like Current)
			-- Update current object using fields of object attached
			-- to `other', so as to yield equal objects.
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
			type_identity: same_type (other)
		ensure -- from ANY
			is_equal: is_equal (other)

	frozen deep_copy (other: like Current)
			-- Effect equivalent to that of:
			--		copy (`other' . deep_twin)
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
		ensure -- from ANY
			deep_equal: deep_equal (Current, other)

	frozen deep_twin: like Current
			-- New object structure recursively duplicated from Current.
			-- (from ANY)
		ensure -- from ANY
			deep_equal: deep_equal (Current, Result)

	frozen standard_copy (other: like Current)
			-- Copy every field of `other' onto corresponding field
			-- of current object.
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
			type_identity: same_type (other)
		ensure -- from ANY
			is_standard_equal: standard_is_equal (other)

	frozen standard_twin: like Current
			-- New object field-by-field identical to `other'.
			-- Always uses default copying semantics.
			-- (from ANY)
		ensure -- from ANY
			standard_twin_not_void: Result /= Void
			equal: standard_equal (Result, Current)

	frozen twin: like Current
			-- New object equal to `Current'
			-- twin calls copy; to change copying/twining semantics, redefine copy.
			-- (from ANY)
		ensure -- from ANY
			twin_not_void: Result /= Void
			is_equal: Result.is_equal (Current)
	
feature -- Basic operations

	frozen default: like Current
			-- Default value of object's type
			-- (from ANY)

	frozen default_pointer: POINTER
			-- Default value of type `POINTER'
			-- (Avoid the need to write `p'.default for
			-- some `p' of type `POINTER'.)
			-- (from ANY)

	default_rescue
			-- Process exception for routines with no Rescue clause.
			-- (Default: do nothing.)
			-- (from ANY)

	frozen do_nothing
			-- Execute a null action.
			-- (from ANY)
	
feature -- Implementation

	dc: WEL_MEMORY_DC
			-- Device Context used for performing drawing operations on drawable.

	destroy
			-- Destroy
		require -- from  EV_ANY_I
			True
		ensure -- from EV_ANY_I
			is_in_destroy_set: is_in_destroy
			is_destroyed_set: is_destroyed

	dispose
			-- Cleanup

	drawable: WEL_BITMAP
			-- Bitmap used for masking.

	flush
			-- Force all queued draw to be called.

	interface: EV_BITMAP
			-- Interface

	redraw
			-- Redraw the entire area.

	set_default_colors
			-- Set foreground and background color to their default values.

	update_if_needed
			-- Update `Current' if needed.
	
feature -- Clearing and drawing operations

	clear
			-- Erase `Current' with background_color.
			-- (from EV_DRAWABLE_IMP)
		require -- from  EV_DRAWABLE_I
			True

	clear_rectangle (x1, y1, a_width, a_height: INTEGER_32)
			-- Draw rectangle with upper-left corner on (`x', `y')
			-- with size `a_width' and `a_height' in background_color.
			-- (from EV_DRAWABLE_IMP)
		require -- from  EV_DRAWABLE_I
			True
	
feature -- Constants

	drawing_mode_and: INTEGER_32 is 3
			-- Drawing mode where bitwise AND is performed when a
			-- pixel is drawn.
			--
			-- T\S | 0 | 1 |
			-- -------------
			--   0 | 0 | 0 |
			-- -------------
			--   1 | 0 | 1 |
			-- (from EV_DRAWABLE_CONSTANTS)

	drawing_mode_copy: INTEGER_32 is 0
			-- Normal drawing mode.
			--
			-- T\S | 0 | 1 |
			-- -------------
			--   0 | 0 | 1 |
			-- -------------
			--   1 | 0 | 1 |
			-- (from EV_DRAWABLE_CONSTANTS)

	drawing_mode_invert: INTEGER_32 is 2
			-- Drawing mode where bits are inverted before drawn.
			--
			-- T\S | 0 | 1 |
			-- -------------
			--   0 | 1 | 0 |
			-- -------------
			--   1 | 1 | 0 |
			-- (from EV_DRAWABLE_CONSTANTS)

	drawing_mode_or: INTEGER_32 is 4
			-- Drawing mode where bitwise OR is performed when a
			-- pixel is drawn.
			--
			-- T\S | 0 | 1 |
			-- -------------
			--   0 | 0 | 1 |
			-- -------------
			--   1 | 1 | 1 |
			-- (from EV_DRAWABLE_CONSTANTS)

	drawing_mode_xor: INTEGER_32 is 1
			-- Drawing mode where bitwise XOR is performed when a
			-- pixel is drawn.
			--
			-- T\S | 0 | 1 |
			-- -------------
			--   0 | 0 | 1 |
			-- -------------
			--   1 | 1 | 0 |
			-- (from EV_DRAWABLE_CONSTANTS)
	
feature -- Contract support

	valid_drawing_mode (a_mode: INTEGER_32): BOOLEAN
			-- Is `a_mode' a valid drawing mode?
			-- (from EV_DRAWABLE_CONSTANTS)
	
feature -- Drawing operations

	bounding_area: EV_RECTANGLE
			-- Temporary rectangle used internally.
			-- (from EV_DRAWABLE_IMP)

	draw_arc (x, y: INTEGER_32; a_bounding_width, a_bounding_height: INTEGER_32; a_start_angle, an_aperture: REAL_32)
			-- Draw part of an ellipse defined by a rectangular area with an
			-- upper left corner at `x',`y', width `a_bounding_width' and height
			-- `a_bounding_height'.
			-- Start at `a_start_angle' and stop at `a_start_angle' + `an_aperture'.
			-- Angles are measured in radians, and go
			-- counterclockwise from the 3 o'clock angle.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			a_bounding_width_positive_or_zero: a_bounding_width >= 0
			a_bounding_width_positive_or_zero: a_bounding_height >= 0

	draw_ellipse (x, y, a_bounding_width, a_bounding_height: INTEGER_32)
			-- Draw an ellipse defined by a rectangular area with an
			-- upper left corner at `x',`y', width `a_bounding_width' and height
			-- `a_bounding_height'.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			a_bounding_width_positive_or_zero: a_bounding_width >= 0
			a_bounding_height_positive_or_zero: a_bounding_height >= 0

	draw_ellipsed_text (x, y: INTEGER_32; a_text: STRING_GENERAL; clipping_width: INTEGER_32)
			-- Draw `a_text' with left of baseline at (`x', `y') using font.
			-- Text is clipped to `clipping_width' in pixels and ellipses are displayed
			-- to show truncated characters if any.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			a_text_not_void: a_text /= Void
			clipping_width_positive: clipping_width >= 0

	draw_ellipsed_text_top_left (x, y: INTEGER_32; a_text: STRING_GENERAL; clipping_width: INTEGER_32)
			-- Draw `a_text' with top left corner at (`x', `y') using font.
			-- Text is clipped to `clipping_width' in pixels and ellipses are displayed
			-- to show truncated characters if any.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			a_text_not_void: a_text /= Void
			clipping_width_positive: clipping_width >= 0

	draw_pie_slice (x, y: INTEGER_32; a_bounding_width, a_bounding_height: INTEGER_32; a_start_angle, an_aperture: REAL_32)
			-- Draw part of an ellipse defined by a rectangular area with an
			-- upper left corner at `x',`y', width `a_bounding_width' and height
			-- `a_bounding_height'.
			-- Start at `a_start_angle' and stop at `a_start_angle' + `an_aperture'.
			-- The arc is then closed by two segments through (`x', 'y').
			-- Angles are measured in radians, start at the
			-- 3 o'clock angle and grow counterclockwise.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			a_bounding_width_positive_or_zero: a_bounding_width >= 0
			a_bounding_height_positive_or_zero: a_bounding_height >= 0

	draw_pixmap (x, y: INTEGER_32; a_pixmap: EV_PIXMAP)
			-- Draw `a_pixmap' with upper-left corner on (`x', `y').
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			a_pixmap_not_void: a_pixmap /= Void

	draw_point (x, y: INTEGER_32)
			-- Draw point at (`x', `y').
			-- (from EV_DRAWABLE_IMP)
		require -- from  EV_DRAWABLE_I
			True

	draw_polyline (points: ARRAY [EV_COORDINATE]; is_closed: BOOLEAN)
			-- Draw line segments between subsequent points in
			-- `points'. If `is_closed' draw line segment between first
			-- and last point in `points'.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			points_not_void: points /= Void

	draw_rectangle (x, y, a_width, a_height: INTEGER_32)
			-- Draw rectangle with upper-left corner on (`x', `y')
			-- with size `a_width' and `a_height'.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			a_width_positive_or_zero: a_width >= 0
			a_height_positive_or_zero: a_height >= 0

	draw_rotated_text (x, y: INTEGER_32; a_angle: REAL_32; a_text: STRING_GENERAL)
			-- Draw rotated text `a_text' with left of baseline at (`x', `y') using font.
			-- Rotation is number of radians counter-clockwise from horizontal plane.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			a_text_not_void: a_text /= Void

	draw_segment (x1, y1, x2, y2: INTEGER_32)
			-- Draw line segment from (`x1', 'y1') to (`x2', 'y2').
			-- (from EV_DRAWABLE_IMP)
		require -- from  EV_DRAWABLE_I
			True

	draw_straight_line (x1, y1, x2, y2: INTEGER_32)
			-- Draw infinite straight line through (`x1','y1') and (`x2','y2').
			-- (from EV_DRAWABLE_I)

	draw_sub_pixmap (x, y: INTEGER_32; a_pixmap: EV_PIXMAP; area: EV_RECTANGLE)
			-- Draw `area' of `a_pixmap' with upper-left corner on (`x', `y').
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			a_pixmap_not_void: a_pixmap /= Void
			area_not_void: area /= Void

	draw_text (x, y: INTEGER_32; a_text: STRING_GENERAL)
			-- Draw `a_text' with left of baseline at (`x', `y') using font.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			a_text_not_void: a_text /= Void

	draw_text_top_left (x, y: INTEGER_32; a_text: STRING_GENERAL)
			-- Draw `a_text' with top left corner at (`x', `y') using font.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			a_text_not_void: a_text /= Void

	internal_draw_text (x, y: INTEGER_32; angle: REAL_32; clipping_width: INTEGER_32; from_baseline: BOOLEAN; a_text: STRING_GENERAL)
			-- Draw `a_text' with top left corner at (`x', `y') using font.
			-- Text is clipped to `clipping_width' in pixels and ellipses are displayed
			-- to show truncated characters if any.
			-- Text is rotated counter-clockwise from the horizontal axis `degrees' degrees.
			-- (from EV_DRAWABLE_IMP)
	
feature -- Filling operations

	fill_ellipse (x, y, a_bounding_width, a_bounding_height: INTEGER_32)
			-- Fill an ellipse defined by a rectangular area with an
			-- upper left corner at `x',`y', width `a_bounding_width' and height
			-- `a_bounding_height'.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			a_bounding_width_positive_or_zero: a_bounding_width >= 0
			a_bounding_height_positive_or_zero: a_bounding_height >= 0

	fill_pie_slice (x, y: INTEGER_32; a_bounding_width, a_bounding_height: INTEGER_32; a_start_angle, an_aperture: REAL_32)
			-- Fill part of an ellipse defined by a rectangular area with an
			-- upper left corner at `x',`y', width `a_bounding_width' and height
			-- `a_bounding_height'.
			-- Start at `a_start_angle' and stop at `a_start_angle' + `an_aperture'.
			-- The arc is then closed by two segments through (`x', 'y').
			-- Angles are measured in radians, start at the 3
			-- o'clock angle and grow counterclockwise.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			a_bounding_width_positive_or_zero: a_bounding_width >= 0
			a_bounding_height_positive_or_zero: a_bounding_height >= 0

	fill_polygon (points: ARRAY [EV_COORDINATE])
			-- Draw line segments between subsequent points in `points'.
			-- Fill all enclosed area's with foreground_color.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			points_not_void: points /= Void

	fill_rectangle (x, y, a_width, a_height: INTEGER_32)
			-- Draw rectangle with upper-left corner on (`x', `y')
			-- with size `a_width' and `a_height'. Fill with foreground_color.
			-- (from EV_DRAWABLE_IMP)
		require -- from EV_DRAWABLE_I
			a_width_positive_or_zero: a_width >= 0
			a_height_positive_or_zero: a_height >= 0
	
feature -- Output

	io: STD_FILES
			-- Handle to standard file setup
			-- (from ANY)

	out: STRING_8
			-- New string containing terse printable representation
			-- of current object
			-- Was declared in ANY as synonym of tagged_out.
			-- (from ANY)

	print (some: ANY)
			-- Write terse external representation of `some'
			-- on standard output.
			-- (from ANY)

	frozen tagged_out: STRING_8
			-- New string containing terse printable representation
			-- of current object
			-- Was declared in ANY as synonym of out.
			-- (from ANY)
	
feature -- Platform

	operating_environment: OPERATING_ENVIRONMENT
			-- Objects available from the operating system
			-- (from ANY)
	
feature --EV_ANY_I -- Implementation

	get_dc
			-- Get dc.
			-- By default does nothing, but is
			-- redefined by primitives that do not keep a consistent
			-- dc. Example : EV_DRAWING_AREA_IMP
			-- (from EV_DRAWABLE_IMP)

	release_dc
			-- Release dc.
			-- By default does nothing, but is
			-- redefined by primitives that do not keep a consistent
			-- dc. Example : EV_DRAWING_AREA_IMP
			-- (from EV_DRAWABLE_IMP)
	
invariant
		-- from EV_ANY_I
	interface_coupled: is_usable implies interface /= Void and then interface.implementation = Current
	base_make_called: base_make_called

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

		-- from EV_DRAWABLE_IMP
	reference_tracked_on_brush: internal_brush /= Void implies internal_brush.reference_tracked
	brush_exists: internal_brush /= Void implies internal_brush.exists
	reference_tracked_on_pen: internal_pen /= Void implies internal_pen.reference_tracked

indexing
	copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
	license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
	source: "[
		Eiffel Software
		356 Storke Road, Goleta, CA 93117 USA
		Telephone 805-685-1006, Fax 805-685-6869
		Website http://www.eiffel.com
		Customer support http://support.eiffel.com
	]"

end -- class EV_BITMAP_IMP