indexing
	description: "Adapters for EV_DRAWABLE that allow drawing of figures."
	status: "See notice at end of class"
	keywords: "figure, primitives, drawing"
	date: "$Date$"
	revision: "$Revision$"

deferred class interface
	EV_FIGURE_DRAWER

feature -- Access

	default_colors: EV_STOCK_COLORS

	drawable: EV_DRAWABLE
			-- Drawable surface (screen, drawing area or pixmap).

	world: EV_FIGURE_WORLD
	
feature -- Basic Operations

	draw_grid
			-- Draw grid on canvas.
			-- world.point is the origin of the grid.
	
feature -- Element Change

	set_drawable (a_drawable: EV_DRAWABLE)
			-- Set drawable to a_drawable.
		require
			a_drawable_not_void: a_drawable /= void
		ensure
			assigned: drawable = a_drawable
	
feature -- Figure drawing

	draw_figure_arc (arc: EV_FIGURE_ARC)
			-- Draw standard representation of arc to canvas.
		require -- from EV_FIGURE_DRAWING_ROUTINES
			arc_not_void: arc /= void

	draw_figure_dot (dot: EV_FIGURE_DOT)
			-- Draw standard representation of dot to canvas.
		require -- from EV_FIGURE_DRAWING_ROUTINES
			dot_not_void: dot /= void

	draw_figure_ellipse (ellipse: EV_FIGURE_ELLIPSE)
			-- Draw standard representation of ellipse to canvas.
		require -- from EV_FIGURE_DRAWING_ROUTINES
			ellipse_not_void: ellipse /= void

	draw_figure_equilateral (eql: EV_FIGURE_EQUILATERAL)
			-- Draw standard representation of eql to canvas.
		require -- from EV_FIGURE_DRAWING_ROUTINES
			eql_not_void: eql /= void

	draw_figure_line (line: EV_FIGURE_LINE)
			-- Draw standard representation of line to canvas.
		require -- from EV_FIGURE_DRAWING_ROUTINES
			line_not_void: line /= void

	draw_figure_picture (picture: EV_FIGURE_PICTURE)
			-- Draw standard representation of picture to canvas.
		require -- from EV_FIGURE_DRAWING_ROUTINES
			picture_not_void: picture /= void

	draw_figure_pie_slice (slice: EV_FIGURE_PIE_SLICE)
			-- Draw standard representation of slice to canvas.
		require -- from EV_FIGURE_DRAWING_ROUTINES
			slice_not_void: slice /= void

	draw_figure_polygon (polygon: EV_FIGURE_POLYGON)
			-- Draw standard representation of polygon to canvas.
		require -- from EV_FIGURE_DRAWING_ROUTINES
			polygon_not_void: polygon /= void

	draw_figure_polyline (line: EV_FIGURE_POLYLINE)
			-- Draw standard representation of polyline to canvas.
		require -- from EV_FIGURE_DRAWING_ROUTINES
			line_not_void: line /= void

	draw_figure_rectangle (rectangle: EV_FIGURE_RECTANGLE)
			-- Draw standard representation of rectangle to canvas.
		require -- from EV_FIGURE_DRAWING_ROUTINES
			rectangle_not_void: rectangle /= void

	draw_figure_rounded_rectangle (f: EV_FIGURE_ROUNDED_RECTANGLE)
			-- Draw standard representation of f to canvas.
		require -- from EV_FIGURE_DRAWING_ROUTINES
			f_not_void: f /= void

	draw_figure_star (star: EV_FIGURE_STAR)
			-- Draw standard representation of star to canvas.
		require -- from EV_FIGURE_DRAWING_ROUTINES
			star_not_void: star /= void

	draw_figure_text (text_figure: EV_FIGURE_TEXT)
			-- Draw standard representation of text_figure to canvas.
		require -- from EV_FIGURE_DRAWING_ROUTINES
			text_figure_not_void: text_figure /= void
	
invariant

	drawable_not_void: drawable /= void
		-- from ANY
	reflexive_equality: standard_is_equal (Current)
	reflexive_conformance: conforms_to (Current)

end -- class EV_FIGURE_DRAWER