anchor.diff:    inherited;
   end;
   
  +function TDataMatrixDecode.GetedgeMax: integer;
  +begin
  +  result:=fOptions.edgeMax;
  +end;
  +
  +function TDataMatrixDecode.GetedgeMin: integer;
  +begin
  +  result:=fOptions.edgeMin;
  +end;
  +
  +function TDataMatrixDecode.GetedgeThresh: integer;
  +begin
  +  result:=fOptions.edgeThresh;
  +end;
  +
  +function TDataMatrixDecode.GetScanGap: integer;
  +begin
  +  Result:=fOptions.scanGap;
  +end;
  +
  +function TDataMatrixDecode.getsquareDevn: integer;
  +begin
  +  Result:=fOptions.squareDevn;
  +end;
  +
   function TDataMatrixDecode.GetStopafter: integer;
   begin
     result:=fOptions.stopAfter;
  
positive.code:     function GettimeoutMS: integer;
      procedure SetStopAfter(const Value: integer);
      procedure SettimeoutMS(const Value: integer);
    public
      constructor Create(bitmap:TBitmap);
      destructor Destroy;override;
      procedure Decode(codes:TStrings);
      procedure DecodeRegion(codes:TStrings;rect:TRect);
      property StopAfter:integer read GetStopafter write SetStopAfter;
      property timeoutMS:integer read GettimeoutMS write SettimeoutMS;
    end;
  
  implementation
  
negative.code: function SetDecodeOptions(decode:pDmtxDecode;image:pDmtxImage;options:DatamatrixDecodeOptions):boolean;
  begin
    try
      if dmtxDecodeSetProp(decode, DmtxPropScanGap, options.scanGap)=DmtxFail then raise Exception.Create('Illegal value for scangap');
  
      if(options.edgeMin <> DmtxUndefined) then
        if dmtxDecodeSetProp(decode, DmtxPropEdgeMin, options.edgeMin)=DmtxFail then raise Exception.Create('Illegal value for edgeMin');
  
      if(options.edgeMax <> DmtxUndefined) then
         if dmtxDecodeSetProp(decode, DmtxPropEdgeMax, options.edgeMax)=DmtxFail then raise Exception.Create('Illegal value for edgeMax');
  
      if(options.squareDevn <> DmtxUndefined) then
        if dmtxDecodeSetProp(decode, DmtxPropSquareDevn, options.squareDevn)=DmtxFail then raise Exception.Create('Illegal value for squareDevn');
  
      if dmtxDecodeSetProp(decode, DmtxPropSymbolSize, options.sizeIdxExpected)=DmtxFail then raise Exception.Create('Illegal value for sizeIdxExpedted');
  
      if dmtxDecodeSetProp(decode, DmtxPropEdgeThresh, options.edgeThresh)=DmtxFail then raise Exception.Create('Illegal value for edgeThresh');
  
      if(options.xMin <> DmtxUndefined) then
        if dmtxDecodeSetProp(decode, DmtxPropXmin, ScaleNumber(options.xMin, image.width, options.regionPercentage))=DmtxFail then raise Exception.Create('Illegal value for xMin');
  
      if(options.xMax <> DmtxUndefined) then
        if dmtxDecodeSetProp(decode, DmtxPropXmax, ScaleNumber(options.xMax, image.width, options.regionPercentage))=DmtxFail then raise Exception.Create('Illegal value for xMax');
  
      if(options.yMin <> DmtxUndefined) then
        if dmtxDecodeSetProp(decode, DmtxPropYmin, ScaleNumber(options.yMin, image.height, options.regionPercentage))=DmtxFail then raise Exception.Create('Illegal value for yMin');
  
      if(options.yMax <> DmtxUndefined) then
        if dmtxDecodeSetProp(decode, DmtxPropYmax, ScaleNumber(options.yMax, image.height, options.regionPercentage))=DmtxFail then raise Exception.Create('Illegal value for yMax');
      result:=true;
    except
      result:=false;
  