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
|
//----------------------------------------------------------------------------
// 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] -----------------------------------------------------
//
// 27.01.2006-Milano: Unit port establishment
//
{ agg_span_generator.pas }
unit
agg_span_generator ;
INTERFACE
{$I agg_mode.inc }
uses
agg_basics ,
agg_span_allocator ,
agg_vertex_source ,
agg_color ;
{ TYPES DEFINITION }
type
span_generator_ptr = ^span_generator;
span_generator = object(vertex_source )
m_alloc : span_allocator_ptr;
constructor Construct(alloc : span_allocator_ptr );
procedure allocator_(alloc : span_allocator_ptr );
function _allocator : span_allocator_ptr;
procedure prepare (max_span_len : unsigned ); virtual;
function generate(x ,y : int; len : unsigned ) : aggclr_ptr; virtual; abstract;
end;
{ GLOBAL PROCEDURES }
IMPLEMENTATION
{ LOCAL VARIABLES & CONSTANTS }
{ UNIT IMPLEMENTATION }
{ CONSTRUCT }
constructor span_generator.Construct;
begin
m_alloc:=alloc;
end;
{ ALLOCATOR_ }
procedure span_generator.allocator_;
begin
m_alloc:=alloc;
end;
{ _ALLOCATOR }
function span_generator._allocator;
begin
result:=m_alloc;
end;
{ PREPARE }
procedure span_generator.prepare;
begin
m_alloc.allocate(max_span_len );
end;
END.
|