Changeset 522 for GraphicTest/Packages/Graphics32/GR32_VectorMaps.pas
- Timestamp:
- Apr 17, 2019, 10:42:18 AM (5 years ago)
- Location:
- GraphicTest/Packages/Graphics32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest/Packages/Graphics32
-
Property svn:ignore
set to
lib
-
Property svn:ignore
set to
-
GraphicTest/Packages/Graphics32/GR32_VectorMaps.pas
r450 r522 118 118 119 119 uses 120 GR32_Lowlevel, GR32_ Blend, GR32_Transforms, GR32_Math, SysUtils;120 GR32_Lowlevel, GR32_Math, SysUtils; 121 121 122 122 resourcestring … … 249 249 {$IFDEF HAS_NATIVEINT} 250 250 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); 254 254 {$ELSE} 255 255 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); 259 259 {$ENDIF} 260 260 end else … … 322 322 Reset(MeshFile, 1); 323 323 BlockRead(MeshFile, Header, SizeOf(TPSLiquifyMeshHeader)); 324 if Lower case(String(Header.Ident)) <> Lowercase(MeshIdent) then324 if LowerCase(string(Header.Ident)) <> LowerCase(MeshIdent) then 325 325 Exception.Create(RCStrBadFormat); 326 326 with Header do … … 433 433 var 434 434 I: Integer; 435 {$IFDEF COMPILERRX1} 436 f: single; 437 {$ENDIF} 435 438 begin 436 439 for I := 0 to Length(FVectors) - 1 do … … 438 441 //Not a mistake! Converting physical mem. directly to avoid temporary floating point buffer 439 442 //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} 440 451 PSingle(@FVectors[I].X)^ := FVectors[I].X * FixedToFloat; 441 452 PSingle(@FVectors[I].Y)^ := FVectors[I].Y * FixedToFloat; 453 {$ENDIF} 442 454 end; 443 455 end; … … 589 601 Inc(VectorPtr); 590 602 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; 594 606 595 607 //Find Bottom 596 Bottom := Width *Height - 1;608 Bottom := Self.Width * Self.Height - 1; 597 609 VectorPtr := @Vectors[Bottom]; 598 610 repeat … … 602 614 until Bottom < 0; 603 615 604 BottomDone: Bottom := Bottom div Width - 1;616 BottomDone: Bottom := Bottom div Self.Width - 1; 605 617 606 618 //Find Left … … 613 625 until J >= Bottom; 614 626 Inc(Left) 615 until Left >= Width;627 until Left >= Self.Width; 616 628 617 629 LeftDone: 618 630 619 631 //Find Right 620 Right := Width - 1;632 Right := Self.Width - 1; 621 633 repeat 622 634 J := Bottom; … … 628 640 until Right <= Left; 629 641 630 631 642 end; 632 643 RightDone: 633 644 if IsRectEmpty(Result) then 634 Result := Rect(0, 0,0,0);645 Result := Rect(0, 0, 0, 0); 635 646 end; 636 647
Note:
See TracChangeset
for help on using the changeset viewer.