indexing
description: "[
Abstraction for objects onto which graphical primitives may be applied.
Note: When line style is dashed and line width is bigger than one,
lines are not guaranteed to be dashed on all platforms.
All drawing operations are performed in the current
oreground color unless otherwise stated. i.e. clear_rectangle
uses the current background color.
]"
legal: "See notice at end of class."
status: "See notice at end of class."
keywords: "figure, primitive, drawing, line, point, ellipse"
date: "$Date: 2007-08-30 11:34:36 -0700 (Thu, 30 Aug 2007) $"
revision: "$Revision: 70204 $"
deferred class interface
EV_DRAWABLE
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
require
not_destroyed: not is_destroyed
ensure
bridge_ok: (Result = Void) = (implementation.clip_area = Void)
dashed_line_style: BOOLEAN
require
not_destroyed: not is_destroyed
ensure
bridge_ok: Result = implementation.dashed_line_style
data: ANY
EV_ANY
drawing_mode: INTEGER_32
require
not_destroyed: not is_destroyed
ensure
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
ensure ANY
generating_type_not_void: Result /= Void
generating_type_not_empty: not Result.is_empty
generator: STRING_8
ANY
ensure ANY
generator_not_void: Result /= Void
generator_not_empty: not Result.is_empty
line_width: INTEGER_32
require
not_destroyed: not is_destroyed
ensure
bridge_ok: Result = implementation.line_width
tile: EV_PIXMAP
foreground_color
require
not_destroyed: not is_destroyed
ensure
bridge_ok: (Result = Void) = (implementation.tile = Void)
feature
height: INTEGER_32
require
not_destroyed: not is_destroyed
width: INTEGER_32
require
not_destroyed: not is_destroyed
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 (other /= Void and then 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))
frozen is_deep_equal (other: EV_DRAWABLE): BOOLEAN
`Current'`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
shallow_implies_deep: standard_is_equal (other) implies Result
same_type: Result implies same_type (other)
symmetric: Result implies other.is_deep_equal (Current)
is_equal (other: EV_DRAWABLE): 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: EV_DRAWABLE): 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
set_default_colors
EV_COLORIZABLE
require EV_COLORIZABLE
not_destroyed: not is_destroyed
feature
disable_dashed_line_style
require
not_destroyed: not is_destroyed
ensure
dashed_line_style_disabled: not dashed_line_style
enable_dashed_line_style
require
not_destroyed: not is_destroyed
ensure
dashed_line_style_enabled: dashed_line_style
remove_clip_area
EV_DRAWABLEremove_clipping
require
not_destroyed: not is_destroyed
ensure
clip_area_void: clip_area = Void
remove_clipping
EV_DRAWABLEremove_clip_area
require
not_destroyed: not is_destroyed
ensure
clip_area_void: clip_area = Void
remove_tile
require
not_destroyed: not is_destroyed
ensure
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)
require
not_destroyed: not is_destroyed
an_area_not_void: an_area /= Void
ensure
clip_area_assigned: clip_area.is_equal (an_area)
set_clip_region (a_region: EV_REGION)
require
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'
require
not_destroyed: not is_destroyed
a_mode_valid: valid_drawing_mode (a_mode)
ensure
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
require
not_destroyed: not is_destroyed
a_width_positive_or_zero: a_width >= 0
ensure
line_width_assigned: line_width = a_width
set_tile (a_pixmap: EV_PIXMAP)
background_color
require
not_destroyed: not is_destroyed
a_pixmap_not_void: a_pixmap /= Void
ensure
tile_assigned: tile /= Void
feature
copy (other: EV_DRAWABLE)
`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: EV_DRAWABLE)
copy`other'deep_twin
ANY
require ANY
other_not_void: other /= Void
ensure ANY
deep_equal: deep_equal (Current, other)
frozen deep_twin: EV_DRAWABLE
ANY
ensure ANY
deep_twin_not_void: Result /= Void
deep_equal: deep_equal (Current, Result)
frozen standard_copy (other: EV_DRAWABLE)
`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: EV_DRAWABLE
`other'
ANY
ensure ANY
standard_twin_not_void: Result /= Void
equal: standard_equal (Result, Current)
sub_pixmap (area: EV_RECTANGLE): EV_PIXMAP
`Current'`area'
require
not_destroyed: not is_destroyed
area_not_void: area /= Void
ensure
result_not_void: Result /= Void
frozen twin: EV_DRAWABLE
`Current'
twincopycopy
ANY
ensure ANY
twin_not_void: Result /= Void
is_equal: Result.is_equal (Current)
feature
frozen default: ?EV_DRAWABLE
ANY
frozen default_pointer: POINTER
`POINTER'
`p'default
`p'`POINTER'
ANY
default_rescue
ANY
frozen do_nothing
ANY
feature
clear
`Current'background_color
require
not_destroyed: not is_destroyed
clear_rectangle (x, y, a_width, a_height: INTEGER_32)
`x'`y'
`a_width'`a_height'background_color
require
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
is_background_color_void: BOOLEAN
background_color
EV_COLORIZABLE
is_foreground_color_void: BOOLEAN
foreground_color
EV_COLORIZABLE
valid_drawing_mode (a_mode: INTEGER_32): BOOLEAN
`a_mode'
EV_DRAWABLE_CONSTANTS
feature
set_and_mode
drawing_mode
require
not_destroyed: not is_destroyed
ensure
drawing_mode_assigned: drawing_mode = drawing_mode_and
set_copy_mode
drawing_mode
require
not_destroyed: not is_destroyed
ensure
drawing_mode_assigned: drawing_mode = drawing_mode_copy
set_invert_mode
drawing_mode
require
not_destroyed: not is_destroyed
ensure
drawing_mode_assigned: drawing_mode = drawing_mode_invert
set_or_mode
drawing_mode
require
not_destroyed: not is_destroyed
ensure
drawing_mode_assigned: drawing_mode = drawing_mode_or
set_xor_mode
drawing_mode
require
not_destroyed: not is_destroyed
ensure
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'
require
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'
require
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'
require
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'
require
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'
require
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'
require
not_destroyed: not is_destroyed
a_pixmap_not_void: a_pixmap /= Void
draw_point (x, y: INTEGER_32)
`x'`y'
require
not_destroyed: not is_destroyed
draw_polyline (points: ARRAY [EV_COORDINATE]; is_closed: BOOLEAN)
`points'`is_closed'
`points'
require
not_destroyed: not is_destroyed
points_not_void: points /= Void
points_contains_no_void_items: not points.has (Void)
points_contains_first_and_last: points.count >= 2
draw_rectangle (x, y, a_width, a_height: INTEGER_32)
`x'`y'
`a_width'`a_height'
require
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'
require
not_destroyed: not is_destroyed
draw_straight_line (x1, y1, x2, y2: INTEGER_32)
`x1'`y1'
`x2'`y2'
require
not_destroyed: not is_destroyed
points_not_equal: x1 /= x2 or y1 /= y2
draw_sub_pixel_buffer (x, y: INTEGER_32; a_pixel_buffer: EV_PIXEL_BUFFER; area: EV_RECTANGLE)
`area'`x'`y'
require
not_destroyed: not is_destroyed
a_pixel_buffer_not_void: a_pixel_buffer /= Void
area_not_void: area /= Void
draw_sub_pixmap (x, y: INTEGER_32; a_pixmap: EV_PIXMAP; area: EV_RECTANGLE)
`area'`a_pixmap'`x'`y'
require
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
require
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
require
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'
require
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'
require
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'
require
not_destroyed: not is_destroyed
points_not_void: points /= Void
points_contains_no_void_items: not points.has (Void)
points_contains_first_and_last: points.count >= 2
fill_rectangle (x, y, a_width, a_height: INTEGER_32)
`x'`y'
`a_width'`a_height'
require
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
ensure ANY
io_not_void: Result /= Void
out: STRING_8
ANY
ensure ANY
out_not_void: Result /= Void
print (some: ?ANY)
`some'
ANY
frozen tagged_out: STRING_8
ANY
ensure ANY
tagged_out_not_void: Result /= Void
feature
operating_environment: OPERATING_ENVIRONMENT
ANY
ensure ANY
operating_environment_not_void: Result /= Void
feature
is_destroyed: BOOLEAN
`Current'
EV_ANY
ensure EV_ANY
bridge_ok: Result = implementation.is_destroyed
invariant
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 not is_background_color_void
foreground_color_not_void: is_usable implies not is_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)"