1. with Tiles.Matrices;                    use Tiles.Matrices; 
  2.  
  3. package Tools.Matrixbrushes is 
  4.  
  5.     type Matrixbrush is new Tool with private; 
  6.     type A_Matrixbrush is access all Matrixbrush'Class; 
  7.  
  8.     function Create_Matrixbrush( matrix  : not null A_Tile_Matrix; 
  9.                                  offsetX, 
  10.                                  offsetY : Integer ) return A_Tool; 
  11.     pragma Postcondition( Create_Matrixbrush'Result /= null ); 
  12.  
  13.     -- Returns a reference to the internal tile matrix. Do not modify it. 
  14.     function Get_Matrix( this : not null access Matrixbrush'Class ) return A_Tile_Matrix; 
  15.     pragma Postcondition( Get_Matrix'Result /= null ); 
  16.  
  17.     procedure Get_Offset( this : not null access Matrixbrush'Class; 
  18.                           x, y : out Integer ); 
  19.  
  20. private 
  21.  
  22.     type Matrixbrush is new Tool with 
  23.         record 
  24.             matrix     : A_Tile_Matrix := null; 
  25.             offsetX, 
  26.             offsetY    : Integer := 0; 
  27.             startTileX, 
  28.             startTileY, 
  29.             overTileX, 
  30.             overTileY  : Integer := -1; 
  31.         end record; 
  32.  
  33.     procedure Adjust( this : access Matrixbrush ); 
  34.  
  35.     procedure Apply( this      : access Matrixbrush; 
  36.                      func      : Function_Type; 
  37.                      modifiers : Modifiers_Array; 
  38.                      first     : Boolean; 
  39.                      world     : not null A_World; 
  40.                      worldX, 
  41.                      worldY, 
  42.                      layer     : Integer ); 
  43.  
  44.     procedure Construct( this    : access Matrixbrush; 
  45.                          matrix  : A_Tile_Matrix; 
  46.                          offsetX, 
  47.                          offsetY : Integer ); 
  48.  
  49.     procedure Delete( this : in out Matrixbrush ); 
  50.  
  51. end Tools.Matrixbrushes;