indexing
description: "Facilities for direct drawing to a printer."
legal: "See notice at end of class."
status: "See notice at end of class."
keywords: "printer"
date: "$Date: 2006-01-22 18:25:44 -0800 (Sun, 22 Jan 2006) $"
revision: "$Revision: 56675 $"
class interface
EV_PRINTER
create {EV_PRINT_PROJECTOR_IMP, EV_MODEL_PRINT_PROJECTOR_IMP}
make_with_context (a_dc: WEL_PRINTER_DC)
`printer_dc'`a_dc'
require
a_dc_not_void: a_dc /= Void
feature
background_color: EV_COLOR
EV_COLORIZABLE
require EV_COLORIZABLE
not_destroyed: not is_destroyed
ensure EV_COLORIZABLE
bridge_ok: Result.is_equal (implementation.background_color)
clip_area: EV_RECTANGLE
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
ensure EV_DRAWABLE
bridge_ok: (Result = Void) = (implementation.clip_area = Void)
dashed_line_style: BOOLEAN
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
ensure EV_DRAWABLE
bridge_ok: Result = implementation.dashed_line_style
data: ANY
EV_ANY
drawing_mode: INTEGER_32
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
ensure EV_DRAWABLE
bridge_ok: Result = implementation.drawing_mode
font: EV_FONT
`Current'
EV_FONTABLE
require EV_FONTABLE
not_destroyed: not is_destroyed
ensure EV_FONTABLE
not_void: Result /= Void
bridge_ok: Result.is_equal (implementation.font)
foreground_color: EV_COLOR
EV_COLORIZABLE
require EV_COLORIZABLE
not_destroyed: not is_destroyed
ensure EV_COLORIZABLE
bridge_ok: Result.is_equal (implementation.foreground_color)
generating_type: STRING_8
ANY
generator: STRING_8
ANY
line_width: INTEGER_32
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
ensure EV_DRAWABLE
bridge_ok: Result = implementation.line_width
tile: EV_PIXMAP
foreground_color
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
ensure EV_DRAWABLE
bridge_ok: (Result = Void) = (implementation.tile = Void)
feature
height: INTEGER_32
require EV_DRAWABLE
not_destroyed: not is_destroyed
ensure then
bridge_ok: Result = implementation.height
positive: Result > 0
width: INTEGER_32
require EV_DRAWABLE
not_destroyed: not is_destroyed
ensure then
bridge_ok: Result = implementation.width
positive: Result > 0
feature
frozen deep_equal (some: ANY; other: like arg #1): BOOLEAN
`some'`other'
ANY
ensure 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
`some'`other'
ANY
ensure 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
`other'
ANY
require ANY
other_not_void: other /= Void
ensure 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
`some'`other'
ANY
ensure 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
`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
same_type: Result implies same_type (other)
symmetric: Result implies other.standard_is_equal (Current)
feature
conforms_to (other: ANY): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
same_type (other: ANY): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
definition: Result = (conforms_to (other) and other.conforms_to (Current))
feature
end_document
set_default_colors
EV_COLORIZABLE
require EV_COLORIZABLE
not_destroyed: not is_destroyed
start_document
feature
disable_dashed_line_style
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
ensure EV_DRAWABLE
dashed_line_style_disabled: not dashed_line_style
enable_dashed_line_style
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
ensure EV_DRAWABLE
dashed_line_style_enabled: dashed_line_style
remove_clip_area
EV_DRAWABLEremove_clipping
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
ensure EV_DRAWABLE
clip_area_void: clip_area = Void
remove_clipping
EV_DRAWABLEremove_clip_area
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
ensure EV_DRAWABLE
clip_area_void: clip_area = Void
remove_tile
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
ensure EV_DRAWABLE
tile_void: tile = Void
set_background_color (a_color: like background_color)
`a_color'background_color
EV_COLORIZABLE
require EV_COLORIZABLE
not_destroyed: not is_destroyed
a_color_not_void: a_color /= Void
ensure EV_COLORIZABLE
background_color_assigned: background_color.is_equal (a_color)
set_clip_area (an_area: EV_RECTANGLE)
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
an_area_not_void: an_area /= Void
ensure EV_DRAWABLE
clip_area_assigned: clip_area.is_equal (an_area)
set_clip_region (a_region: EV_REGION)
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
a_region_not_void: a_region /= Void
set_data (some_data: like data)
`some_data'data
EV_ANY
require EV_ANY
not_destroyed: not is_destroyed
ensure EV_ANY
data_assigned: data = some_data
set_drawing_mode (a_mode: INTEGER_32)
`a_logical_mode'
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
a_mode_valid: valid_drawing_mode (a_mode)
ensure EV_DRAWABLE
drawing_mode_assigned: drawing_mode = a_mode
set_font (a_font: EV_FONT)
`a_font'font
EV_FONTABLE
require EV_FONTABLE
not_destroyed: not is_destroyed
a_font_not_void: a_font /= Void
ensure EV_FONTABLE
font_assigned: font.is_equal (a_font) and font /= a_font
set_foreground_color (a_color: like foreground_color)
`a_color'foreground_color
EV_COLORIZABLE
require EV_COLORIZABLE
not_destroyed: not is_destroyed
a_color_not_void: a_color /= Void
ensure EV_COLORIZABLE
foreground_color_assigned: foreground_color.is_equal (a_color)
set_line_width (a_width: INTEGER_32)
`a_width'line_width
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
a_width_positive_or_zero: a_width >= 0
ensure EV_DRAWABLE
line_width_assigned: line_width = a_width
set_tile (a_pixmap: EV_PIXMAP)
background_color
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
a_pixmap_not_void: a_pixmap /= Void
ensure EV_DRAWABLE
tile_assigned: tile /= Void
feature
copy (other: like Current)
`other'
EV_ANY
require ANY
other_not_void: other /= Void
type_identity: same_type (other)
ensure ANY
is_equal: is_equal (other)
frozen deep_copy (other: like Current)
copy`other'deep_twin
ANY
require ANY
other_not_void: other /= Void
ensure ANY
deep_equal: deep_equal (Current, other)
frozen deep_twin: like Current
ANY
ensure ANY
deep_equal: deep_equal (Current, Result)
frozen standard_copy (other: like Current)
`other'
ANY
require ANY
other_not_void: other /= Void
type_identity: same_type (other)
ensure ANY
is_standard_equal: standard_is_equal (other)
frozen standard_twin: like Current
`other'
ANY
ensure ANY
standard_twin_not_void: Result /= Void
equal: standard_equal (Result, Current)
sub_pixmap (area: EV_RECTANGLE): EV_PIXMAP
`Current'`area'
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
area_not_void: area /= Void
ensure EV_DRAWABLE
result_not_void: Result /= Void
frozen twin: like Current
`Current'
twincopycopy
ANY
ensure ANY
twin_not_void: Result /= Void
is_equal: Result.is_equal (Current)
feature
frozen default: like Current
ANY
frozen default_pointer: POINTER
`POINTER'
`p'default
`p'`POINTER'
ANY
default_rescue
ANY
frozen do_nothing
ANY
feature
clear
`Current'background_color
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
clear_rectangle (x, y, a_width, a_height: INTEGER_32)
`x'`y'
`a_width'`a_height'background_color
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
a_width_positive_or_zero: a_width >= 0
a_height_positive_or_zero: a_height >= 0
feature
destroy
`Current'
EV_ANY
ensure EV_ANY
is_destroyed: is_destroyed
feature {ANY}
valid_drawing_mode (a_mode: INTEGER_32): BOOLEAN
`a_mode'
EV_DRAWABLE_CONSTANTS
feature
set_and_mode
drawing_mode
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
ensure EV_DRAWABLE
drawing_mode_assigned: drawing_mode = drawing_mode_and
set_copy_mode
drawing_mode
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
ensure EV_DRAWABLE
drawing_mode_assigned: drawing_mode = drawing_mode_copy
set_invert_mode
drawing_mode
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
ensure EV_DRAWABLE
drawing_mode_assigned: drawing_mode = drawing_mode_invert
set_or_mode
drawing_mode
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
ensure EV_DRAWABLE
drawing_mode_assigned: drawing_mode = drawing_mode_or
set_xor_mode
drawing_mode
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
ensure EV_DRAWABLE
drawing_mode_assigned: drawing_mode = drawing_mode_xor
feature
draw_arc (x, y, a_bounding_width, a_bounding_height: INTEGER_32; a_start_angle, an_aperture: REAL_32)
`x'`y'`a_bounding_width'
`a_bounding_height'
`a_start_angle'`a_start_angle'`an_aperture'
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
a_bounding_width_positive_or_zero: a_bounding_width >= 0
a_bounding_height_positive_or_zero: a_bounding_width >= 0
draw_ellipse (x, y, a_bounding_width, a_bounding_height: INTEGER_32)
`x'`y'`a_bounding_width'
`a_bounding_height'
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
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)
`a_text'`x'`y'font
`clipping_width'
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
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)
`a_text'`x'`y'font
`clipping_width'
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
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)
`x'`y'`a_bounding_width'
`a_bounding_height'
`a_start_angle'`a_start_angle'`an_aperture'
`x'
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
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)
`a_pixmap'`x'`y'
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
a_pixmap_not_void: a_pixmap /= Void
draw_point (x, y: INTEGER_32)
`x'`y'
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
draw_polyline (points: ARRAY [EV_COORDINATE]; is_closed: BOOLEAN)
`points'`is_closed'
`points'
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
points_not_void: points /= Void
draw_rectangle (x, y, a_width, a_height: INTEGER_32)
`x'`y'
`a_width'`a_height'
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
a_width_positive_or_zero: a_width >= 0
a_height_positive_or_zero: a_height >= 0
draw_segment (x1, y1, x2, y2: INTEGER_32)
`x1'`y1'`x2'`y2'
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
draw_straight_line (x1, y1, x2, y2: INTEGER_32)
`x1'`y1'
`x2'`y2'
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
points_not_equal: x1 /= x2 or y1 /= y2
draw_sub_pixmap (x, y: INTEGER_32; a_pixmap: EV_PIXMAP; area: EV_RECTANGLE)
`area'`a_pixmap'`x'`y'
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
a_pixmap_not_void: a_pixmap /= Void
area_not_void: area /= Void
draw_text (x, y: INTEGER_32; a_text: STRING_GENERAL)
`a_text'`x'`y'font
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
a_text_not_void: a_text /= Void
draw_text_top_left (x, y: INTEGER_32; a_text: STRING_GENERAL)
`a_text'`x'`y'font
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
a_text_not_void: a_text /= Void
feature
fill_ellipse (x, y, a_bounding_width, a_bounding_height: INTEGER_32)
`x'`y'`a_bounding_width'
`a_bounding_height'
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
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)
`x'`y'`a_bounding_width'
`a_bounding_height'
`a_start_angle'`a_start_angle'`an_aperture'
`x'`y'
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
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])
`points'
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
points_not_void: points /= Void
fill_rectangle (x, y, a_width, a_height: INTEGER_32)
`x'`y'
`a_width'`a_height'
EV_DRAWABLE
require EV_DRAWABLE
not_destroyed: not is_destroyed
a_width_positive_or_zero: a_width >= 0
a_height_positive_or_zero: a_height >= 0
feature
io: STD_FILES
ANY
out: STRING_8
ANYtagged_out
ANY
print (some: ANY)
`some'
ANY
frozen tagged_out: STRING_8
ANYout
ANY
feature
operating_environment: OPERATING_ENVIRONMENT
ANY
feature
is_destroyed: BOOLEAN
`Current'
EV_ANY
ensure EV_ANY
bridge_ok: Result = implementation.is_destroyed
invariant
EV_DRAWABLE
line_width_positive_or_zero: is_usable implies line_width >= 0
drawing_mode_valid: is_usable implies valid_drawing_mode (drawing_mode)
EV_COLORIZABLE
background_color_not_void: is_usable implies background_color /= Void
foreground_color_not_void: is_usable implies foreground_color /= Void
EV_ANY
is_initialized: is_initialized
is_coupled: implementation /= Void and then implementation.interface = Current
default_create_called: default_create_called
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 EV_PRINTER