indexing
	description: "EiffelVision postscript drawing area implementation."
	legal: "See notice at end of class."
	status: "See notice at end of class."
	date: "$Date: 2006-08-26 15:51:07 -0700 (Sat, 26 Aug 2006) $"
	revision: "$Revision: 63005 $"

class interface
	EV_POSTSCRIPT_DRAWABLE_IMP

create 
	make (an_interface: EV_POSTSCRIPT_DRAWABLE)
			-- Create a EV_POSTSCRIPT_DRAWBALE_IMP with front end `an_interface'.
		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 displayed behind foregournd features.

	bottom_margin: INTEGER_32
			-- size of bottom margin.

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

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

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

	dashed_line_style: BOOLEAN
			-- Are lines drawn dashed?

	drawing_mode: INTEGER_32
			-- Logical operation on pixels when drawing.

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

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

	font: EV_FONT
			-- Typeface appearance for `Current'.

	foreground_color: EV_COLOR
			-- Color of foreground features like text.

	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
			-- Vertical size in pixels.

	landscape: BOOLEAN
			-- Is page shown in landscape mode? (other is portrait)

	left_margin: INTEGER_32
			-- size of left margin.

	line_width: INTEGER_32
			-- Line thickness.

	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

	pi: REAL_64 is 3.14159265358979323846
			-- (from MATH_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)

	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.

	width: INTEGER_32
			-- Horizontal size in pixels.
	
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

	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

	default_bottom_margin: INTEGER_32 is 20
			-- Default size in pixels of the right side page margin.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	default_left_margin: INTEGER_32 is 20
			-- Default size in pixels of the left side page margin.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	page_height (a_size: INTEGER_32; landscape: BOOLEAN): INTEGER_32
			-- Return the page height in points (1 inch/72)
			-- for the specified page size and orientation.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)
		require -- from EV_POSTSCRIPT_PAGE_CONSTANTS
			valid_size: valid_page_size (a_size)

	page_width (a_size: INTEGER_32; landscape: BOOLEAN): INTEGER_32
			-- Return the page width in points (1 inch/72)
			-- for the specified page size and orientation.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)
		require -- from EV_POSTSCRIPT_PAGE_CONSTANTS
			valid_size: valid_page_size (a_size)

	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))
	
feature -- Element change

	disable_dashed_line_style
			-- Draw lines solid.
		ensure -- from EV_DRAWABLE_I
			dashed_line_style_disabled: is_usable implies not interface.dashed_line_style

	enable_dashed_line_style
			-- Draw lines dashed.
		ensure -- from EV_DRAWABLE_I
			dashed_line_style_enabled: is_usable implies interface.dashed_line_style

	remove_clip_area
			-- Do not apply any clipping.

	remove_clipping
			-- Do not apply any clipping.
		ensure -- from EV_DRAWABLE_I
			clip_area_void: is_usable implies interface.clip_area = Void

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

	set_background_color (a_color: like background_color)
			-- Assign `a_color' to foreground_color.
		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 area which will be refreshed.
		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)
			-- Assign a_region to the area which will be refreshed.
		require -- from EV_DRAWABLE_I
			a_region_not_void: a_region /= Void

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

	set_default_font
			-- Set the font to the default font.

	set_default_page_size
			-- Set page size to default values.

	set_drawing_mode (a_mode: INTEGER_32)
			-- Set drawing mode to `a_logical_mode'.
		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)
			-- Assign `a_font' to font.
		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: like foreground_color)
			-- Assign `a_color' to foreground_color.
		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.
		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_margins (a_left_margin, a_bottom_margin: INTEGER_32)
			-- Set `left' and `bottom' margins to `a_left_margin'
			-- and `a_bottom_margin'.
		require
			a_left_margin_not_negative: a_left_margin >= 0
			a_bottom_margin_not_negative: a_bottom_margin >= 0
		ensure
			left_set: left_margin = a_left_margin
			bottom_set: bottom_margin = a_bottom_margin

	set_page_size (a_size: INTEGER_32; a_landscape: BOOLEAN)
			-- Set horizontal and vertical dimensions of page.
			-- Values for `a_size' are defined in EV_POSTSCRIPT_PAGE_CONSTANTS.

	set_size (a_width, a_height: INTEGER_32)
			-- set width to `a_width' and height to `a_height'.
		require
			positive: a_width >= 0 and a_height >= 0
		ensure
			set: width = a_width and height = a_height

	set_tile (a_pixmap: EV_PIXMAP)
			-- Set tile used to fill figures.
			-- Set to Void to use background_color to fill.
		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)

	sub_pixmap (area: EV_RECTANGLE): EV_PIXMAP
			-- Pixmap region of `Current' represented by rectangle `area'
		require -- from EV_DRAWABLE_I
			area_not_void: area /= Void
		ensure -- from EV_DRAWABLE_I
			result_not_void: Result /= Void

	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 -- Clearing and drawing operations

	clear
			-- Erase `Current' with background_color.

	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.

	intersect (p, q: EV_RECTANGLE): EV_RECTANGLE
			-- Intersection of `q' and `p'.
		ensure
			result_exists: Result /= Void

	redraw
			-- Force `Current' to redraw itself.

	save_to_named_file (a_file_name: FILE_NAME)
			-- Save `Current' to the file with `a_file_name'.
		require
			a_file_name_not_void: a_file_name /= Void
	
feature -- Constants

	a0: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	a1: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	a2: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	a3: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	a4: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	a5: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	a6: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	a7: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	a8: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	a9: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A8, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	b0: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B1, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	b1: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	b10: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8 and B9.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	b2: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	b3: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	b4: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	b5: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	b6: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	b7: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	b8: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	b9: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	c5envelope: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	comm10envelope: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	dlenvelope: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Folio, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_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)

	executive: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	folio: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Executive, Letter, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	ledger: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	legal: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	letter: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Legal, Ledger, Tabloid, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)

	tabloid: INTEGER_32 is unique
			-- Valid page constants.
			-- Was declared in EV_POSTSCRIPT_PAGE_CONSTANTS with other unique constants Comm10envelope, C5envelope, Dlenvelope, Folio, Executive, Letter, Legal, Ledger, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9 and B10.
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)
	
feature -- Contract support

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

	valid_page_size (a_size: INTEGER_32): BOOLEAN
			-- Is `a_size' a valid page value?
			-- (from EV_POSTSCRIPT_PAGE_CONSTANTS)
	
feature -- Drawing operations

	draw_arc (x, y, a_bounding_width, a_bounding_height: INTEGER_32; a_start_angle, an_aperture: REAL_32)
			-- Draw a 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.
		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'.
		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.
		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.
		require -- from EV_DRAWABLE_I
			a_text_not_void: a_text /= Void
			clipping_width_positive: clipping_width >= 0

	draw_pie_slice (x, y, 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.
		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').
		require -- from EV_DRAWABLE_I
			a_pixmap_not_void: a_pixmap /= Void

	draw_point (x, y: INTEGER_32)
			-- Draw point at (`x', 'y').

	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'.
		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'.
		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; 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.
		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').

	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').
		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.
		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.
		require -- from EV_DRAWABLE_I
			a_text_not_void: a_text /= Void
	
feature -- Drawing operations (filled)

	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'.
		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, 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.
		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 with background_color.
		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 background_color.
		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)
	
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)

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_POSTSCRIPT_DRAWABLE_IMP