class DRAW_KIT

Features exported to ANY

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.

Direct parents

conformant parents

DRAW_STYLE

Summary

creation features

exported features

Details

default_create

Default creation method. It is used when no creation method is specified if allowed. Note it may be renamed.

set_drawable (d: DRAWABLE)

Set the drawable to use in future drawing function calls.

require

  • d /= Void

ensure

  • valid_drawable

point (x1: INTEGER, y1: INTEGER)

require

  • valid_drawable

line (x1: INTEGER, y1: INTEGER, x2: INTEGER, y2: INTEGER)

TODO: explain how line width is used

require

  • valid_drawable

rectangle (x1: INTEGER, y1: INTEGER, w: INTEGER, h: INTEGER)

TODO: explain how line width is used

require

  • w > 0
  • h > 0
  • valid_drawable

arc (x1: INTEGER, y1: INTEGER, w: INTEGER, h: INTEGER, angle1: REAL, angle2: REAL)

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: INTEGER, y: INTEGER, r1: INTEGER, r2: INTEGER, angle1: REAL, angle2: REAL)

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: INTEGER, y1: INTEGER, w: INTEGER, h: INTEGER)

require

  • w > 0
  • h > 0
  • valid_drawable

fill_arc (x1: INTEGER, y1: INTEGER, w: INTEGER, h: INTEGER, angle1: REAL, angle2: REAL)

arc will be drawn inside the rectangle defined with x1, y1, w, h

require

  • w > 0
  • h > 0
  • valid_drawable

fill_arc_radius (x: INTEGER, y: INTEGER, r1: INTEGER, r2: INTEGER, angle1: REAL, angle2: REAL)

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: INTEGER, y: INTEGER)

require

  • s /= Void
  • valid_drawable

valid_drawable: BOOLEAN
color: COLOR
set_color (c: COLOR)

require

  • c /= Void

line_width: INTEGER
set_line_width (w: INTEGER)

require

  • w > 0