class interface DRAW_KIT
-- DRAW_KIT is a tool to make some free drawing, you may consider
-- it as a pen. You can draw points, lines, rectangles, arcs, words...
-- Difference with DRAW_STYLE is that you pre-select the drawable
-- to draw into and drawing functions automatically use this drawable.
creation
default_create
-- Default creation method. It is used when no creation
-- method is specified if allowed. Note it may be renamed.
feature(s) from COLOR_LIST
white_color: COLOR
black_color: COLOR
dim_grey_color: COLOR
dark_grey_color: COLOR
grey_color: COLOR
light_grey_color: COLOR
dark_blue_color: COLOR
medium_blue_color: COLOR
blue_color: COLOR
royal_blue_color: COLOR
deep_sky_blue_color: COLOR
sky_blue_color: COLOR
light_sky_blue_color: COLOR
steel_blue_color: COLOR
light_steel_blue_color: COLOR
light_blue_color: COLOR
pale_turquoise_color: COLOR
dark_turquoise_color: COLOR
medium_turquoise_color: COLOR
turquoise_color: COLOR
dark_cyan_color: COLOR
cyan_color: COLOR
light_cyan_color: COLOR
dark_green_color: COLOR
green_color: COLOR
light_green_color: COLOR
yellow_green_color: COLOR
dark_khaki_color: COLOR
khaki_color: COLOR
yellow_color: COLOR
light_yellow_color: COLOR
gold_color: COLOR
beige_color: COLOR
chocolate_color: COLOR
firebrick_color: COLOR
brown_color: COLOR
dark_salmon_color: COLOR
salmon_color: COLOR
light_salmon_color: COLOR
dark_orange_color: COLOR
orange_color: COLOR
orange_red_color: COLOR
dark_red_color: COLOR
red_color: COLOR
hot_pink_color: COLOR
deep_pink_color: COLOR
pink_color: COLOR
light_pink_color: COLOR
pale_violet_red_color: COLOR
maroon_color: COLOR
medium_violet_red_color: COLOR
violet_red_color: COLOR
violet_color: COLOR
dark_magenta_color: COLOR
magenta_color: COLOR
dark_violet_color: COLOR
blue_violet_color: COLOR
medium_purple_color: COLOR
purple_color: COLOR
feature(s) from STATE_CONSTANTS
state_normal: INTEGER
state_active: INTEGER
state_prelight: INTEGER
state_selected: INTEGER
state_insensitive: INTEGER
feature(s) from ALIGNMENT_CONSTANTS
center_alignment: ALIGNMENT
left_alignment: ALIGNMENT
right_alignment: ALIGNMENT
top_alignment: ALIGNMENT
down_alignment: ALIGNMENT
top_left_alignment: ALIGNMENT
top_right_alignment: ALIGNMENT
down_right_alignment: ALIGNMENT
down_left_alignment: ALIGNMENT
feature(s) from GRAPHIC
vision: VISION
font_manager: FONT_MANAGER
default_font: BASIC_FONT
feature(s) from DISPOSABLE
dispose
-- Action to be executed just before garbage collection
-- reclaims an object. (The default action is to do nothing
-- at all.) If you want to change the default action, please
-- make your class inherit DISPOSABLE and effect dispose
-- instead of inheriting MEMORY and redefining this dispose
-- feature.
feature(s) from MEMORY
-- Garbage collector information and tuning:
collecting: BOOLEAN
-- Is garbage collection enabled?
collection_off
-- Disable garbage collection.
collection_on
-- Enable garbage collection.
full_collect
-- Force a full collection cycle if garbage collection is
-- enabled (i.e. collecting is True); do nothing otherwise.
collector_counter: INTEGER
-- The number of collections actually performed or -1 when the
-- system is not using the SmartEiffel garbage collector (i.e. when
-- the system is compiled using the -no_gc flag).
ensure
Result >= -1
feature(s) from MEMORY
-- SmartEiffel Garbage collector information and tuning:
smart_eiffel_collector: BOOLEAN
-- Is the SmartEiffel garbage collector really used?
ensure
Result = (collector_counter >= 0)
low_memory_strategy: BOOLEAN
-- Is the low memory strategy in use? When this strategy is used,
-- the garbage collector try to use as few memory as possible.
require
smart_eiffel_collector
set_low_memory_strategy
require
smart_eiffel_collector
ensure
low_memory_strategy
high_memory_strategy: BOOLEAN
-- Is the high memory strategy in use? When this strategy is used,
-- the garbage collector assume that more memory can be allocated
-- if necessary.
require
smart_eiffel_collector
set_high_memory_strategy
require
smart_eiffel_collector
ensure
high_memory_strategy
default_memory_strategy: BOOLEAN
-- Is the default memory strategy in use? This is the default initial
-- mode for the garbage collector (somewhere between low_memory_strategy
-- and high_memory_strategy).
require
smart_eiffel_collector
set_default_memory_strategy
require
smart_eiffel_collector
ensure
default_memory_strategy
allocated_bytes: INTEGER
-- Total number of allocated bytes of memory in the heap.
require
collector_counter >= 0
feature(s) from DRAW_STYLE
default_create
-- Default creation method. It is used when no creation
-- method is specified if allowed. Note it may be renamed.
feature(s) from DRAW_STYLE
color: COLOR
set_color (c: COLOR)
require
c /= Void
line_width: INTEGER
set_line_width (w: INTEGER)
require
w > 0
feature(s) from DRAW_STYLE
draw_rectangle (d: POINTER; x1, y1, w, h: INTEGER)
require
w > 0;
h > 0;
d /= default_pointer
feature(s) from DRAW_STYLE
draw_fill_rectangle (d: POINTER; x1, y1, w, h: INTEGER)
require
w > 0;
h > 0;
d /= default_pointer
feature(s) from DRAW_STYLE
draw_line (d: POINTER; x1, y1, x2, y2: INTEGER)
require
d /= default_pointer
feature(s) from DRAW_STYLE
draw_string (d: POINTER; s: UNICODE_STRING; x, y: INTEGER)
require
s /= Void;
d /= default_pointer
feature(s) from DRAW_STYLE
draw_point (d: POINTER; x1, y1: INTEGER)
require
d /= default_pointer
draw_arc (d: POINTER; x1, y1, w, h: INTEGER; angle1, angle2: DOUBLE)
-- arc will be drawn inside the rectangle defined with x1, y1, w, h
require
w > 0;
h > 0;
d /= default_pointer
draw_arc_radius (d: POINTER; x, y, r1, r2: INTEGER; angle1, angle2: DOUBLE)
-- arc will be drawn using (x, y) as center and r1/r2 as
-- horizontal/vertical radius
require
r1 > 0;
r2 > 0;
d /= default_pointer
draw_fill_arc (d: POINTER; x1, y1, w, h: INTEGER; angle1, angle2: DOUBLE)
-- arc will be drawn inside the rectangle defined with x1, y1, w, h
require
w > 0;
h > 0;
d /= default_pointer
draw_fill_arc_radius (d: POINTER; x, y, r1, r2: INTEGER; angle1, angle2: DOUBLE)
-- arc will be drawn using (x, y) as center and r1/r2 as
-- horizontal/vertical radius
require
r1 > 0;
r2 > 0;
d /= default_pointer
feature(s) from DRAW_STYLE
style: POINTER
font: BASIC_FONT
basic_style_new: POINTER
basic_style_set_color (sty: POINTER; color_: POINTER)
basic_style_set_line_width (sty: POINTER; w: INTEGER)
basic_style_set_font (sty, f: POINTER)
basic_style_free (sty: POINTER)
basic_draw_point (draw, sty: POINTER; x1, y1: INTEGER)
basic_draw_line (draw, sty: POINTER; x1, y1, x2, y2: INTEGER)
basic_draw_rectangle (draw, sty: POINTER; x1, y1, w, h: INTEGER)
basic_draw_arc (draw, sty: POINTER; x1, y1, w, h: INTEGER; a1, a2: DOUBLE)
basic_draw_fill_rectangle (draw, sty: POINTER; x1, y1, w, h: INTEGER)
basic_draw_fill_arc (draw, sty: POINTER; x1, y1, w, h: INTEGER; a1, a2: DOUBLE)
basic_draw_text (draw, sty: POINTER; x, y, bl: INTEGER; text: POINTER; length: INTEGER)
feature(s) from DRAW_KIT
set_drawable (d: DRAWABLE)
-- Set the drawable to use in future drawing function calls.
require
d /= Void
ensure
valid_drawable
point (x1, y1: INTEGER)
require
valid_drawable
line (x1, y1, x2, y2: INTEGER)
--TODO: explain how line width is used
require
valid_drawable
rectangle (x1, y1, w, h: INTEGER)
--TODO: explain how line width is used
require
w > 0;
h > 0;
valid_drawable
arc (x1, y1, w, h: INTEGER; angle1, angle2: DOUBLE)
--TODO: explain how line width is used
-- arc will be drawn inside the rectangle defined with x1, y1, w, h
require
w > 0;
h > 0;
valid_drawable
arc_radius (x, y, r1, r2: INTEGER; angle1, angle2: DOUBLE)
--TODO: explain how line width is used
-- arc will be drawn using (x, y) as center and r1/r2 as
-- horizontal/vertical radius
require
r1 > 0;
r2 > 0;
valid_drawable
fill_rectangle (x1, y1, w, h: INTEGER)
require
w > 0;
h > 0;
valid_drawable
fill_arc (x1, y1, w, h: INTEGER; angle1, angle2: DOUBLE)
-- arc will be drawn inside the rectangle defined with x1, y1, w, h
require
w > 0;
h > 0;
valid_drawable
fill_arc_radius (x, y, r1, r2: INTEGER; angle1, angle2: DOUBLE)
-- arc will be drawn using (x, y) as center and r1/r2 as
-- horizontal/vertical radius
require
r1 > 0;
r2 > 0;
valid_drawable
put_string (s: UNICODE_STRING; x, y: INTEGER)
require
s /= Void;
valid_drawable
valid_drawable: BOOLEAN
feature(s) from DRAW_KIT
drawable: POINTER
end of DRAW_KIT