INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "A region is a rectangle, polygon, or ellipse (or a ", "combination of two or more of these shapes) that can be ", "filled, painted, inverted, framed, and used to perform hit ", "testing. ", "WEL: library of reusable components for Eiffel. ", "Based on WEL library for ISE Eiffel, used with permission. "
project: "Windows Eiffel Library"
copyright: "(c) 1986-1997 Interactive Software Engineering Inc. ", "Modifications and extensions: ", "(c) 1997 Object Tools ", "All rights reserved. Duplication and distribution prohibited", "May be used only with Visual Eiffel under terms of user ", "license "
cluster: wel
class WEL_REGION
inherit

WEL_GDI_ANY
export
{ANY}
clone,
copy,
is_equal
redefine
is_equal
end
creation

make_elliptic,
make_elliptic_indirect,
make_empty,
make_polygon_alternate,
make_polygon_winding,
make_rect,
make_rect_indirect
feature {NONE}-- Initialization

make_empty
-- Make an empty rectangle region

make_elliptic (left, top, right, bottom: INTEGER)
-- Make an elliptical region specified by the
-- bounding rectangle `left', `top', `right', `bottom'

make_elliptic_indirect (rect: WEL_RECT)
-- Make an elliptical region specified by
-- the bounding rectangle `rect'
require
rect_not_void: rect /= void

make_polygon_alternate (points: ARRAY [INTEGER])
-- Make a polygonal region specified by `points'
-- using alternate mode. Fills area between
-- odd-numbered and even-numbered polygon sides
-- on each scan line.
require
points_not_void: points /= void
points_count: points.count \\ 2 = 0

make_polygon_winding (points: ARRAY [INTEGER])
-- Make a polygonal region specified by `points'
-- using winding mode. Fills any region with a nonzero
-- winding value.
require
points_not_void: points /= void
points_count: points.count \\ 2 = 0

make_rect (left, top, right, bottom: INTEGER)
-- Make a rectangle region specified by
-- `left', `top', `right', `bottom'.

make_rect_indirect (rect: WEL_RECT)
-- Make a rectangle region specified by
-- the rectangle `rect'.
require
rect_not_void: rect /= void
feature -- Comparison

is_equal (other: like Current): BOOLEAN
-- Is `Current' equal to `other'?
feature -- Basic operations

combine (region: WEL_REGION; mode: INTEGER): WEL_REGION
-- Combine `region' with the current one using `mode'.
-- See class WEL_RGN_CONSTANTS for `mode' values.
require
exists: exists
region_not_void: region /= void
region_exists: region.exists
ensure
result_not_void: Result /= void

offset (x_offset, y_offset: INTEGER)
-- Move the region by the specified offsets
-- `x_offset' and `y_offset'
require
exists: exists

set_rect (left, top, right, bottom: INTEGER)
-- Change the region to a rectangle region specified
-- by `left', `top', `right', `bottom'
require
exists: exists
feature -- Status report

point_in (x, y: INTEGER): BOOLEAN
-- Is the point `x', `y' is in the region?
require
exists: exists

rect_in (rect: WEL_RECT): BOOLEAN
-- Is any part of the rectangle `rect' is within
-- the boundaries of the region?
require
exists: exists
rect_not_void: rect /= void
end -- class WEL_REGION

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES