| Line | |
|---|
| 1 | unit River;
|
|---|
| 2 |
|
|---|
| 3 | interface
|
|---|
| 4 |
|
|---|
| 5 | uses
|
|---|
| 6 | Classes, SysUtils, Graphics, Generics.Collections;
|
|---|
| 7 |
|
|---|
| 8 | type
|
|---|
| 9 | { TRiver }
|
|---|
| 10 |
|
|---|
| 11 | TRiver = class
|
|---|
| 12 | Points: array of TPoint;
|
|---|
| 13 | procedure Paint(Canvas: TCanvas);
|
|---|
| 14 | end;
|
|---|
| 15 |
|
|---|
| 16 | { TRivers }
|
|---|
| 17 |
|
|---|
| 18 | TRivers = class(TObjectList<TRiver>)
|
|---|
| 19 | end;
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 | implementation
|
|---|
| 23 |
|
|---|
| 24 | { TRiver }
|
|---|
| 25 |
|
|---|
| 26 | procedure TRiver.Paint(Canvas: TCanvas);
|
|---|
| 27 | begin
|
|---|
| 28 | Canvas.Brush.Color := $ffffe0;
|
|---|
| 29 | Canvas.Brush.Style := bsSolid;
|
|---|
| 30 | Canvas.Polygon(Points);
|
|---|
| 31 | end;
|
|---|
| 32 |
|
|---|
| 33 | end.
|
|---|
| 34 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.