123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329 |
- deferred class CD_PRIMITIVES_MARKS
- inherit
- CANVAS_DRAW
- feature {ANY}
-
- draws_pixel (x, y, red, green, blue: INTEGER)
-
-
-
-
- local
- cl: INTEGER
- do
- cl := encode_color (red, green, blue)
- int_canvas_pixel (cnvs, x, y, cl)
- end
- draws_pixel_real (x, y: REAL_64; red, green, blue: INTEGER)
-
- local
- cl: INTEGER
- do
- cl := encode_color (red, green, blue)
- int_canvas_c_double_pixel (cnvs, x, y, cl)
- end
- wd_draws_pixel (x, y: REAL_64; red, green, blue: INTEGER)
-
- local
- cl: INTEGER
- do
- cl := encode_color (red, green, blue)
- int_wd_canvas_pixel (cnvs, x, y, cl)
- end
-
- draws_mark (x, y: INTEGER)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- do
- int_canvas_mark (cnvs, x, y)
- end
- draws_mark_real (x, y: REAL_64)
-
- do
- int_canvas_c_double_mark (cnvs, x, y)
- end
- wd_draws_mark (x, y: REAL_64)
-
- do
- int_wd_canvas_mark (cnvs, x, y)
- end
-
- set_mark_size (size: INTEGER)
-
-
- require
- size >= 1
- local
- i: INTEGER
- do
- i := int_canvas_mark_size (cnvs, size)
- end
- set_wd_mark_size (size: REAL_64)
-
- require
- size >= 1
- local
- i: REAL_64
- do
- i := int_wd_canvas_mark_size (cnvs, size)
- end
- get_mark_size: INTEGER
-
- do
- Result := int_canvas_mark_size (cnvs, -1)
- end
- get_wd_mark_size: REAL_64
-
- do
- Result := int_wd_canvas_mark_size (cnvs, -1)
- end
-
- mark_type_plus: STRING
- local
- i: INTEGER
- do
- i := int_canvas_mark_type (cnvs, 0)
- Result := int_mark_type_integer_to_string(i)
- end
- mark_type_star: STRING
- local
- i: INTEGER
- do
- i := int_canvas_mark_type (cnvs, 1)
- Result := int_mark_type_integer_to_string(i)
- end
- mark_type_circle: STRING
- local
- i: INTEGER
- do
- i := int_canvas_mark_type (cnvs, 2)
- Result := int_mark_type_integer_to_string(i)
- end
- mark_type_x: STRING
- local
- i: INTEGER
- do
- i := int_canvas_mark_type (cnvs, 3)
- Result := int_mark_type_integer_to_string(i)
- end
- mark_type_box: STRING
- local
- i: INTEGER
- do
- i := int_canvas_mark_type (cnvs, 4)
- Result := int_mark_type_integer_to_string(i)
- end
- mark_type_diamond: STRING
- local
- i: INTEGER
- do
- i := int_canvas_mark_type (cnvs, 5)
- Result := int_mark_type_integer_to_string(i)
- end
- mark_type_hollow_circle: STRING
- local
- i: INTEGER
- do
- i := int_canvas_mark_type (cnvs, 6)
- Result := int_mark_type_integer_to_string(i)
- end
- mark_type_hollow_box: STRING
- local
- i: INTEGER
- do
- i := int_canvas_mark_type (cnvs, 7)
- Result := int_mark_type_integer_to_string(i)
- end
- mark_type_hollow_diamond: STRING
- local
- i: INTEGER
- do
- i := int_canvas_mark_type (cnvs, 8)
- Result := int_mark_type_integer_to_string(i)
- end
- mark_type: STRING
-
-
-
-
-
-
-
-
-
-
-
- local
- i: INTEGER
- do
- i := int_canvas_mark_type (cnvs, -1)
- Result := int_mark_type_integer_to_string(i)
- end
-
- feature {NONE}
-
- int_canvas_pixel (wgt: POINTER; x, y, cl: INTEGER)
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "cdCanvasPixel ($wgt, $x, $y, $cl);"
- end
- int_canvas_c_double_pixel (wgt: POINTER; x, y: REAL_64; cl: INTEGER)
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "cdfCanvasPixel ($wgt, $x, $y, $cl);"
- end
- int_wd_canvas_pixel (wgt: POINTER; x, y: REAL_64; cl: INTEGER)
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "wdCanvasPixel ($wgt, $x, $y, $cl);"
- end
- int_canvas_mark (wgt: POINTER; x, y: INTEGER)
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "cdCanvasMark ($wgt, $x, $y);"
- end
- int_canvas_c_double_mark (wgt: POINTER; x, y: REAL_64)
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "cdfCanvasMark ($wgt, $x, $y);"
- end
- int_wd_canvas_mark (wgt: POINTER; x, y: REAL_64)
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "wdCanvasMark ($wgt, $x, $y);"
- end
- int_canvas_mark_size (wgt: POINTER; s: INTEGER): INTEGER
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "return cdCanvasMarkSize ($wgt, $s);"
- end
- int_wd_canvas_mark_size (wgt: POINTER; s: REAL_64): REAL_64
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "return wdCanvasMarkSize ($wgt, $s);"
- end
- int_canvas_mark_type (wgt: POINTER; type: INTEGER): INTEGER
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "return cdCanvasMarkType ($wgt, $type);"
- end
- int_mark_type_integer_to_string (t: INTEGER): STRING
- do
- if t.is_equal(0) then
- Result := "CD_PLUS"
- elseif t.is_equal(1) then
- Result := "CD_STAR"
- elseif t.is_equal(2) then
- Result := "CD_CIRCLE"
- elseif t.is_equal(3) then
- Result := "CD_X"
- elseif t.is_equal(4) then
- Result := "CD_BOX"
- elseif t.is_equal(5) then
- Result := "CD_DIAMOND"
- elseif t.is_equal(6) then
- Result := "CD_HOLLOW_CIRCLE"
- elseif t.is_equal(7) then
- Result := "CD_HOLLOW_BOX"
- elseif t.is_equal(8) then
- Result := "CD_HOLLOW_DIAMOND"
- else
- Result := "CD_PLUS"
- end
- end
- end
|