Ignore:
Timestamp:
Apr 17, 2019, 10:42:18 AM (5 years ago)
Author:
chronos
Message:
  • Modified: Updated Graphics32 library.
Location:
GraphicTest/Packages/Graphics32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GraphicTest/Packages/Graphics32

    • Property svn:ignore set to
      lib
  • GraphicTest/Packages/Graphics32/GR32_VectorMaps.pas

    r450 r522  
    118118
    119119uses
    120   GR32_Lowlevel, GR32_Blend, GR32_Transforms, GR32_Math, SysUtils;
     120  GR32_Lowlevel, GR32_Math, SysUtils;
    121121
    122122resourcestring
     
    249249    {$IFDEF HAS_NATIVEINT}
    250250    Result := CombineVectorsReg(CombineVectorsReg(PFixedPoint(P)^,
    251       PFixedPoint(NativeUInt(P) + H)^, WX), CombineVectorsReg(
    252       PFixedPoint(NativeUInt(P) + W)^, PFixedPoint(NativeUInt(P) + W + H)^, WX),
    253       WY);
     251      PFixedPoint(NativeUInt(P) + NativeUInt(H))^, WX), CombineVectorsReg(
     252      PFixedPoint(NativeUInt(P) + NativeUInt(W))^,
     253      PFixedPoint(NativeUInt(P) + NativeUInt(W + H))^, WX), WY);
    254254    {$ELSE}
    255255    Result := CombineVectorsReg(CombineVectorsReg(PFixedPoint(P)^,
    256       PFixedPoint(Cardinal(P) + H)^, WX), CombineVectorsReg(
    257       PFixedPoint(Cardinal(P) + W)^, PFixedPoint(Cardinal(P) + W + H)^, WX),
    258       WY);
     256      PFixedPoint(Cardinal(P) + Cardinal(H))^, WX), CombineVectorsReg(
     257      PFixedPoint(Cardinal(P) + Cardinal(W))^,
     258      PFixedPoint(Cardinal(P) + Cardinal(W) + Cardinal(H))^, WX), WY);
    259259    {$ENDIF}
    260260  end else
     
    322322    Reset(MeshFile, 1);
    323323    BlockRead(MeshFile, Header, SizeOf(TPSLiquifyMeshHeader));
    324     if Lowercase(String(Header.Ident)) <> Lowercase(MeshIdent) then
     324    if LowerCase(string(Header.Ident)) <> LowerCase(MeshIdent) then
    325325      Exception.Create(RCStrBadFormat);
    326326    with Header do
     
    433433  var
    434434    I: Integer;
     435{$IFDEF COMPILERRX1}
     436    f: single;
     437{$ENDIF}
    435438  begin
    436439    for I := 0 to Length(FVectors) - 1 do
     
    438441      //Not a mistake! Converting physical mem. directly to avoid temporary floating point buffer
    439442      //Do no change to PFloat.. the type is relative to the msh format.
     443
     444//Workaround for Delphi 10.1 Internal Error C6949 ...
     445{$IFDEF COMPILERRX1}
     446      f := FVectors[I].X * FixedToFloat;
     447      FVectors[I].X := PInteger(@f)^;
     448      f := FVectors[I].Y * FixedToFloat;
     449      FVectors[I].Y := PInteger(@f)^;
     450{$ELSE}
    440451      PSingle(@FVectors[I].X)^ := FVectors[I].X * FixedToFloat;
    441452      PSingle(@FVectors[I].Y)^ := FVectors[I].Y * FixedToFloat;
     453{$ENDIF}
    442454    end;
    443455  end;
     
    589601      Inc(VectorPtr);
    590602      Inc(Top);
    591     until Top = Width * Height;
    592 
    593     TopDone: Top := Top div Width;
     603    until Top = Self.Width * Self.Height;
     604
     605    TopDone: Top := Top div Self.Width;
    594606
    595607    //Find Bottom
    596     Bottom := Width * Height - 1;
     608    Bottom := Self.Width * Self.Height - 1;
    597609    VectorPtr := @Vectors[Bottom];
    598610    repeat
     
    602614    until Bottom < 0;
    603615
    604     BottomDone: Bottom := Bottom div Width - 1;
     616    BottomDone: Bottom := Bottom div Self.Width - 1;
    605617
    606618    //Find Left
     
    613625      until J >= Bottom;
    614626      Inc(Left)
    615     until Left >= Width;
     627    until Left >= Self.Width;
    616628
    617629    LeftDone:
    618630
    619631    //Find Right
    620     Right := Width - 1;
     632    Right := Self.Width - 1;
    621633    repeat
    622634      J := Bottom;
     
    628640    until Right <= Left;
    629641
    630 
    631642  end;
    632643  RightDone:
    633644  if IsRectEmpty(Result) then
    634     Result := Rect(0,0,0,0);
     645    Result := Rect(0, 0, 0, 0);
    635646end;
    636647
Note: See TracChangeset for help on using the changeset viewer.