summaryrefslogtreecommitdiff
path: root/src/corelib/render/software/agg_scanline.pas
blob: 204dc04d6bfdd4c7fb4a71c0eb8fe3f1b99e0183 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
//----------------------------------------------------------------------------
// Anti-Grain Geometry - Version 2.4 (Public License)
// Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com)
//
// Anti-Grain Geometry - Version 2.4 Release Milano 3 (AggPas 2.4 RM3)
// Pascal Port By: Milan Marusinec alias Milano
//                 milan@marusinec.sk
//                 http://www.aggpas.org
// Copyright (c) 2005-2006
//
// Permission to copy, use, modify, sell and distribute this software
// is granted provided this copyright notice appears in all copies.
// This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
//
//----------------------------------------------------------------------------
// Contact: mcseem@antigrain.com
//          mcseemagg@yahoo.com
//          http://www.antigrain.com
//
// [Pascal Port History] -----------------------------------------------------
//
// 15.01.2006-Milano: Unit port establishment
//
{ agg_scanline.pas }
unit
 agg_scanline ;

INTERFACE

{$I agg_mode.inc }

uses
 agg_basics ;

{ TYPES DEFINITION }
type
 span_ptr = ^span;
 span = record
   x   ,
   len : int16;

   covers : int8u_ptr;

  end;

 span_obj_ptr = ^span_obj;
 span_obj = object
   function  x      : int; virtual;
   function  len    : int; virtual;
   function  covers : int8u_ptr; virtual;

   procedure inc_operator; virtual;

  end;

 scanline_ptr = ^scanline;
 scanline = object
   procedure reset(min_x ,max_x : int ); virtual; abstract;
   procedure reset_spans; virtual; abstract;

   procedure finalize (y_ : int ); virtual; abstract;
   procedure add_cell (x : int; cover : unsigned ); virtual; abstract;
   procedure add_cells(x : int; len : unsigned; covers : int8u_ptr ); virtual; abstract;
   procedure add_span (x : int; len ,cover : unsigned ); virtual; abstract;

   function  y : int; virtual; abstract;
   function  num_spans : unsigned; virtual; abstract;
   function  begin_ : pointer; virtual; abstract;

   function  sz_of_span : unsigned; virtual; abstract;
   function  is_plain_span : boolean; virtual;
   function  is_embedded : boolean; virtual;

   procedure init (ptr : int8u_ptr; dx ,dy : int ); virtual; abstract;
   procedure setup(scanline_idx : unsigned ); virtual; abstract;

  end;

{ GLOBAL PROCEDURES }


IMPLEMENTATION
{ LOCAL VARIABLES & CONSTANTS }
{ UNIT IMPLEMENTATION }
{ X }
function span_obj.x;
begin
 result:=0;

end;

{ LEN }
function span_obj.len;
begin
 result:=0;

end;

{ COVERS }
function span_obj.covers;
begin
 result:=NIL;

end;

{ INC_OPERATOR }
procedure span_obj.inc_operator;
begin
end;

{ IS_PLAIN_SPAN }
function scanline.is_plain_span;
begin
 result:=true;

end;

{ IS_EMBEDDED }
function scanline.is_embedded;
begin
 result:=false;

end;

END.