summaryrefslogtreecommitdiff
path: root/src/corelib/render/software/agg_conv_contour.pas
blob: 2a466492ecef74c85232ba9f4a6a537dca98406a (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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
//----------------------------------------------------------------------------
// 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] -----------------------------------------------------
//
// 12.02.2006-Milano: Unit port establishment
//
{ agg_conv_contour.pas }
unit
 agg_conv_contour ;

INTERFACE

{$I agg_mode.inc }

uses
 agg_basics ,
 agg_vcgen_contour ,
 agg_conv_adaptor_vcgen ,
 agg_vertex_source ;

{ TYPES DEFINITION }
type
 conv_contour = object(conv_adaptor_vcgen )
   the_generator : vcgen_contour;

   constructor Construct(vs : vertex_source_ptr );
   destructor  Destruct; virtual;

   procedure line_join_ (lj : unsigned );
   procedure inner_join_(ij : unsigned );

   procedure width_(w : double );

   procedure miter_limit_        (ml : double );
   procedure miter_limit_theta_  (t : double );
   procedure inner_miter_limit_  (ml : double );
   procedure approximation_scale_(_as_ : double );

   procedure auto_detect_orientation_(v : boolean );

   function  _line_join : unsigned;
   function  _inner_join : unsigned;
   function  _width : double;
   function  _miter_limit : double;
   function  _inner_miter_limit : double;
   function  _approximation_scale : double;
   function  _auto_detect_orientation : boolean;

  end;

{ GLOBAL PROCEDURES }


IMPLEMENTATION
{ LOCAL VARIABLES & CONSTANTS }
{ UNIT IMPLEMENTATION }
{ CONSTRUCT }
constructor conv_contour.Construct;
begin
 the_generator.Construct;

 inherited Construct(vs ,@the_generator );

end;

{ DESTRUCT }
destructor conv_contour.Destruct;
begin
 inherited Destruct;

 the_generator.Destruct;

end;

{ LINE_JOIN_ }
procedure conv_contour.line_join_;
begin
 vcgen_contour_ptr(generator ).line_join_(lj );

end;

{ INNER_JOIN_ }
procedure conv_contour.inner_join_;
begin
 vcgen_contour_ptr(generator ).inner_join_(ij );

end;

{ WIDTH_ }
procedure conv_contour.width_;
begin
 vcgen_contour_ptr(generator ).width_(w );

end;

{ MITER_LIMIT_ }
procedure conv_contour.miter_limit_;
begin
 vcgen_contour_ptr(generator ).miter_limit_(ml );

end;

{ MITER_LIMIT_THETA_ }
procedure conv_contour.miter_limit_theta_;
begin
 vcgen_contour_ptr(generator ).miter_limit_theta_(t );

end;

{ INNER_MITER_LIMIT_ }
procedure conv_contour.inner_miter_limit_;
begin
 vcgen_contour_ptr(generator ).inner_miter_limit_(ml);

end;

{ APPROXIMATION_SCALE_ }
procedure conv_contour.approximation_scale_;
begin
 vcgen_contour_ptr(generator ).approximation_scale_(_as_ );

end;

{ AUTO_DETECT_ORIENTATION_ }
procedure conv_contour.auto_detect_orientation_;
begin
 vcgen_contour_ptr(generator ).auto_detect_orientation_(v );

end;

{ _LINE_JOIN }
function conv_contour._line_join;
begin
 result:=vcgen_contour_ptr(generator )._line_join;

end;

{ _INNER_JOIN }
function conv_contour._inner_join;
begin
 result:=vcgen_contour_ptr(generator )._inner_join;

end;

{ _WIDTH }
function conv_contour._width;
begin
 result:=vcgen_contour_ptr(generator )._width;

end;

{ _MITER_LIMIT }
function conv_contour._miter_limit;
begin
 result:=vcgen_contour_ptr(generator )._miter_limit;

end;

{ _INNER_MITER_LIMIT }
function conv_contour._inner_miter_limit;
begin
 result:=vcgen_contour_ptr(generator )._inner_miter_limit;

end;

{ _APPROXIMATION_SCALE }
function conv_contour._approximation_scale;
begin
 result:=vcgen_contour_ptr(generator )._approximation_scale;

end;

{ _AUTO_DETECT_ORIENTATION }
function conv_contour._auto_detect_orientation;
begin
 result:=vcgen_contour_ptr(generator )._auto_detect_orientation;

end;

END.