indexing
description: "[
rotated elliptic is defined by 4 points:
p0-----------p1
| |
| |
| center |
| |
| |
p3-----------p2
p0.x = point_a.x and p0.y = point_a.y
p2.x = point_b.x and p2.y = point_b.y
radius1 is half of the distance between p0 and p1
radius2 is half of the distance between p0 and p3
center is in the middle of the line from p0 to p2
]"
legal: "See notice at end of class."
status: "See notice at end of class."
date: "$Date: 2006-01-22 18:25:44 -0800 (Sun, 22 Jan 2006) $"
revision: "$Revision: 56675 $"
deferred class interface
EV_MODEL_ROTATED_ELLIPTIC
feature
angle: REAL_64
`Current'
dashed_line_style: BOOLEAN
EV_MODEL_ATOMIC
foreground_color: EV_COLOR
EV_MODEL_ATOMIC
generating_type: STRING_8
ANY
generator: STRING_8
ANY
group: EV_MODEL_GROUP
`Current'`Current'
EV_MODEL
id: INTEGER_32
EV_MODEL
ensure HASHABLE
good_hash_value: Result >= 0
frozen id_object (an_id: INTEGER_32): IDENTIFIED
`an_id'
IDENTIFIED
ensure IDENTIFIED
consistent: Result = Void or else Result.object_id = an_id
line_width: INTEGER_32
EV_MODEL_ATOMIC
frozen object_id: INTEGER_32
IDENTIFIED
ensure IDENTIFIED
valid_id: id_object (Result) = Current
pebble: ANY
EV_MODEL
pebble_function: FUNCTION [ANY, TUPLE, ANY]
`Void'pebble
EV_MODEL
point_a: EV_COORDINATE
`Current'
EV_MODEL_SINGLE_POINTED
ensure EV_MODEL_SINGLE_POINTED
result_exists: Result /= Void
result_x_equal_point_x: Result.x = point_a_x
result_y_eqyal_point_y: Result.y = point_a_y
point_a_x: INTEGER_32
point_a
point_a_y: INTEGER_32
point_a
point_b: EV_COORDINATE
`Current'
EV_MODEL_DOUBLE_POINTED
ensure EV_MODEL_DOUBLE_POINTED
result_exists: Result /= Void
result_x_equal_point_b_x: Result.x = point_b_x
result_y_equal_point_b_y: Result.y = point_b_y
point_b_relative: EV_COORDINATE
point_bgroup`point'
EV_MODEL_DOUBLE_POINTED
ensure EV_MODEL_DOUBLE_POINTED
result_exists: Result /= Void
result_x_equal_point_b_x_relative: Result.x = point_b_x_relative
result_y_eqyal_point_b_y_relative: Result.y = point_b_y_relative
point_b_x: INTEGER_32
`pint_b'
point_b_x_relative: INTEGER_32
point_b_xgroup`point_x'
EV_MODEL_DOUBLE_POINTED
point_b_y: INTEGER_32
point_b
point_b_y_relative: INTEGER_32
point_b_ygroup`point_y'
EV_MODEL_DOUBLE_POINTED
point_count: INTEGER_32
`Current'
EV_MODEL_DOUBLE_POINTED
require EV_MODEL_SINGLE_POINTED
True
require EV_MODEL
True
ensure EV_MODEL
correct: Result = point_array.count
point_relative: EV_COORDINATE
`point'group`point'
EV_MODEL_SINGLE_POINTED
ensure EV_MODEL_SINGLE_POINTED
result_exists: Result /= Void
result_x_equal_point_x_relative: Result.x = point_a_x_relative
result_y_eqyal_point_y_relative: Result.y = point_a_y_relative
point_a_x_relative: INTEGER_32
`point_x'group`point_x'
EV_MODEL_SINGLE_POINTED
point_a_y_relative: INTEGER_32
`point_y'group`point_y'
EV_MODEL_SINGLE_POINTED
pointer_style: EV_POINTER_STYLE
EV_MODEL
radius1: INTEGER_32
radius2: INTEGER_32
target_name: STRING_GENERAL
`Current'
EV_ABSTRACT_PICK_AND_DROPABLE
world: EV_MODEL_WORLD
`Current'`Current'
EV_MODEL
x: INTEGER_32
x
EV_MODEL
y: INTEGER_32
y
EV_MODEL
feature {ANY}
pi: REAL_64 is 3.14159265358979323846
MATH_CONST
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
is_hashable: BOOLEAN
HASHABLE
ensure HASHABLE
ok_if_not_default: Result implies (Current /= default)
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
disable_dashed_line_style
EV_MODEL_ATOMIC
ensure EV_MODEL_ATOMIC
dashed_line_style_disabled: not dashed_line_style
enable_dashed_line_style
EV_MODEL_ATOMIC
ensure EV_MODEL_ATOMIC
dashed_line_style_enabled: dashed_line_style
set_foreground_color (a_color: EV_COLOR)
`a_color'foreground_color
EV_MODEL_ATOMIC
require EV_MODEL_ATOMIC
a_color_not_void: a_color /= Void
ensure EV_MODEL_ATOMIC
foreground_color_assigned: foreground_color = a_color
set_line_width (a_width: INTEGER_32)
`a_width'line_width
EV_MODEL_ATOMIC
require EV_MODEL_ATOMIC
a_width_non_negative: a_width >= 0
ensure EV_MODEL_ATOMIC
line_width_assigned: line_width = a_width
set_point_b_position_relative (ax, ay: INTEGER_32)
point_b_relative`ax'`ay'
EV_MODEL_DOUBLE_POINTED
set_point_a_position_relative (ax, ay: INTEGER_32)
point_relative`ax'`ay'
EV_MODEL_SINGLE_POINTED
set_target_name (a_name: STRING_GENERAL)
`a_name'target_name
EV_ABSTRACT_PICK_AND_DROPABLE
require EV_ABSTRACT_PICK_AND_DROPABLE
a_name_not_void: a_name /= Void
ensure EV_ABSTRACT_PICK_AND_DROPABLE
target_name_assigned: a_name /= target_name and a_name.is_equal (target_name)
feature
remove_pebble
pebble`Void'pebble_function
EV_MODEL
ensure EV_ABSTRACT_PICK_AND_DROPABLE
pebble_removed: pebble = Void and pebble_function = Void
rotate (an_angle: REAL_64)
`an_angle'
EV_MODEL
require EV_MODEL
is_rotatable: is_rotatable
ensure EV_MODEL
center_valid: is_center_valid
rotate_around (an_angle: REAL_64; ax, ay: INTEGER_32)
`ax'`ay'`an_angle'
EV_MODEL
require EV_MODEL
is_rotatable: is_rotatable
ensure EV_MODEL
center_valid: is_center_valid
scale (a_scale: REAL_64)
`a_scale'
EV_MODEL
require EV_MODEL
is_scalable: is_scalable
a_scale_bigger_zero: a_scale > 0.0
scale_abs (a_scale: REAL_64)
`a_scale'
angle
EV_MODEL
require EV_MODEL
is_scalable: is_scalable
a_scale_bigger_zero: a_scale > 0.0
scale_x (a_scale_x: REAL_64)
`a_scale_x'
EV_MODEL
require EV_MODEL
is_scalable: is_scalable
a_scale_x_bigger_zero: a_scale_x > 0.0
scale_x_abs (a_scale_x: REAL_64)
`a_scale_x'
angle
EV_MODEL
require EV_MODEL
is_scalable: is_scalable
a_scale_x_bigger_zero: a_scale_x > 0.0
scale_y (a_scale_y: REAL_64)
`a_scale_y'
EV_MODEL
require EV_MODEL
is_scalable: is_scalable
a_scale_y_bigger_zero: a_scale_y > 0.0
scale_y_abs (a_scale_y: REAL_64)
`a_scale_y'
angle
EV_MODEL
require EV_MODEL
is_scalable: is_scalable
a_scale_y_bigger_zero: a_scale_y > 0.0
set_accept_cursor (a_cursor: EV_POINTER_STYLE)
`a_cursor'
pebble
EV_MODEL
require EV_ABSTRACT_PICK_AND_DROPABLE
a_cursor_not_void: a_cursor /= Void
ensure EV_ABSTRACT_PICK_AND_DROPABLE
accept_cursor_assigned: accept_cursor.is_equal (a_cursor)
set_deny_cursor (a_cursor: EV_POINTER_STYLE)
`a_cursor'
EV_MODEL
require EV_ABSTRACT_PICK_AND_DROPABLE
a_cursor_not_void: a_cursor /= Void
ensure EV_ABSTRACT_PICK_AND_DROPABLE
deny_cursor_assigned: deny_cursor.is_equal (a_cursor)
set_pebble (a_pebble: like pebble)
`a_pebble'pebble
EV_MODEL
require EV_ABSTRACT_PICK_AND_DROPABLE
a_pebble_not_void: a_pebble /= Void
ensure EV_ABSTRACT_PICK_AND_DROPABLE
pebble_assigned: pebble = a_pebble
set_pebble_function (a_function: FUNCTION [ANY, TUPLE, ANY])
`a_function'pebble
EV_MODEL
require EV_ABSTRACT_PICK_AND_DROPABLE
a_function_not_void: a_function /= Void
a_function_takes_two_integer_open_operands: a_function.valid_operands ([1, 1])
ensure EV_ABSTRACT_PICK_AND_DROPABLE
pebble_function_assigned: pebble_function = a_function
set_point_a_position (ax, ay: INTEGER_32)
point_a`ax'`ay'
set_point_b_position (ax, ay: INTEGER_32)
point_b`ax'`ay'
set_pointer_style (a_cursor: like pointer_style)
`a_cursor'pointer_style
EV_MODEL
require EV_MODEL
a_cursor_not_void: a_cursor /= Void
ensure EV_MODEL
pointer_style_assigned: pointer_style = a_cursor
set_radius1 (radius: INTEGER_32)
radius1`radius'
require
radius_positive: radius >= 0
ensure
set: (distance (point_array.item (0).x_precise, point_array.item (0).y_precise, point_array.item (1).x_precise, point_array.item (1).y_precise) / 2).rounded = radius
set_radius2 (radius: INTEGER_32)
radius2`radius'
require
radius_positive: radius >= 0
ensure
set: (distance (point_array.item (0).x_precise, point_array.item (0).y_precise, point_array.item (3).x_precise, point_array.item (3).y_precise) / 2).rounded = radius
set_x (a_x: INTEGER_32)
x`an_x'
EV_MODEL
ensure EV_MODEL
x_set: a_x = x
center_valid: is_center_valid
set_x_y (a_x, a_y: INTEGER_32)
x`a_x'y`a_y'
EV_MODEL
ensure EV_MODEL
set: a_x = x and a_y = y
center_valid: is_center_valid
set_y (a_y: INTEGER_32)
y`an_y'
EV_MODEL
ensure EV_MODEL
y_set: a_y = y
center_valid: is_center_valid
transform (a_transformation: EV_MODEL_TRANSFORMATION)
point_array`a_transformation'
`Current'
EV_MODEL
require EV_MODEL
a_transformation_not_void: a_transformation /= Void
is_transformable: is_transformable
feature
copy (other: like Current)
`other'
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)
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
conforming_pick_actions: EV_NOTIFY_ACTION_SEQUENCE
EV_MODEL
drop_actions: EV_PND_ACTION_SEQUENCE
`Current'
EV_MODEL
pick_actions: EV_PND_START_ACTION_SEQUENCE
pebble
EV_MODEL
pointer_button_press_actions: EV_POINTER_BUTTON_ACTION_SEQUENCE
EV_MODEL
pointer_button_release_actions: EV_POINTER_BUTTON_ACTION_SEQUENCE
EV_MODEL
pointer_double_press_actions: EV_POINTER_BUTTON_ACTION_SEQUENCE
EV_MODEL
pointer_enter_actions: EV_NOTIFY_ACTION_SEQUENCE
EV_MODEL
pointer_leave_actions: EV_NOTIFY_ACTION_SEQUENCE
EV_MODEL
pointer_motion_actions: EV_POINTER_MOTION_ACTION_SEQUENCE
EV_MODEL
feature
bounding_box: EV_RECTANGLE
`Current'
EV_MODEL_ATOMIC
ensure EV_MODEL
result_not_void: Result /= Void
internal_is_twin: internal_bounding_box /= Result
position_on_figure (a_x, a_y: INTEGER_32): BOOLEAN
`a_x'`a_y'
EV_MODEL
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
accept_cursor: EV_POINTER_STYLE
pebble
EV_MODEL
are_events_sended_to_group: BOOLEAN
pointer_motion_actionspointer_button_press_actions
pointer_double_press_actionspointer_button_release_actions
pointer_enter_actionspointer_leave_actions`Current'
`Current'
EV_MODEL
deny_cursor: EV_POINTER_STYLE
EV_MODEL
has_capture: BOOLEAN
`Current'
EV_MODEL
is_center_valid: BOOLEAN
EV_MODEL
is_in_group: BOOLEAN
`Current'
EV_MODEL
ensure EV_MODEL
group_defines_is_in_group: Result = (group /= Void)
is_in_world: BOOLEAN
`Current'
EV_MODEL
ensure EV_MODEL
world_defines_is_in_world: Result = (world /= Void)
is_rotatable: BOOLEAN is True
is_scalable: BOOLEAN is False
is_sensitive: BOOLEAN
EV_MODEL
is_show_requested: BOOLEAN
`Current'
EV_MODEL
is_transformable: BOOLEAN is False
feature
disable_capture
world
EV_MODEL
require EV_MODEL
in_world: world /= Void
has_capture: has_capture
ensure EV_MODEL
capture_released: not has_capture
disable_events_sended_to_group
are_events_sended_to_group
EV_MODEL
ensure EV_MODEL
events_blocked: not are_events_sended_to_group
disable_sensitive
EV_MODEL
ensure EV_MODEL
insensitive_requested: not internal_is_sensitive
enable_capture
world
EV_MODEL
require EV_MODEL
in_world: world /= Void
ensure EV_MODEL
capture_set: has_capture
enable_events_sended_to_group
are_events_sended_to_group
EV_MODEL
ensure EV_MODEL
events_sended_to_group: are_events_sended_to_group
enable_sensitive
EV_MODEL
ensure EV_MODEL
sensitive_requested: internal_is_sensitive
hide
`Current'group
EV_MODEL
ensure EV_MODEL
not_is_show_requested: not is_show_requested
show
`Current'group
`True'
EV_MODEL
ensure EV_MODEL
is_show_requested: is_show_requested
feature EV_FIGURE
center_invalidate
EV_MODEL
invariant
EV_MODEL_ATOMIC
foreground_color_exists: foreground_color /= Void
line_width_non_negative: line_width >= 0
EV_MODEL
point_array_exists: point_array /= Void
center_exists: center /= Void
x_is_center_x: x = center.x
y_is_center_y: y = center.y
all_points_exist: all_points_exist (point_array)
projection_matrix_not_void: projection_matrix /= Void
is_transfomable_implies_rotatable_and_scalable: is_transformable implies (is_rotatable and is_scalable)
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_MODEL_ROTATED_ELLIPTIC