Changeset 521 for GraphicTest/Packages/bgrabitmap/perspectivescan.inc
- Timestamp:
- Apr 17, 2019, 12:58:41 AM (5 years ago)
- Location:
- GraphicTest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest
- Property svn:ignore
-
old new 8 8 GraphicTest.lps 9 9 GraphicTest.dbg 10 heaptrclog.trc
-
- Property svn:ignore
-
GraphicTest/Packages/bgrabitmap/perspectivescan.inc
r494 r521 51 51 procedure NextLight; inline; 52 52 begin 53 inc(light,lightStep);53 light := (light+lightStep) and 65535; 54 54 inc(lightAcc,lightDiff); 55 55 if lightAcc >= lightMod then 56 56 begin 57 57 dec(lightAcc,lightMod); 58 inc(light);58 light := (light + 1) and 65535; 59 59 end; 60 60 end; … … 101 101 light := info1.lightness; 102 102 lightLen := info2.lightness-info1.lightness; 103 lightStep := lightLen div (ix2-ix1); 104 lightMod := ix2-ix1; 105 lightDiff := lightLen - lightStep*(ix2-ix1); 103 if lightLen >= 0 then 104 begin 105 lightStep := lightLen div (ix2-ix1); 106 lightMod := ix2-ix1; 107 lightDiff := lightLen - lightStep*(ix2-ix1); 108 end else 109 begin 110 lightStep := (-lightLen+(ix2-ix1-1)) div (ix2-ix1); 111 lightMod := ix2-ix1; 112 lightDiff := lightLen + lightStep*(ix2-ix1); 113 lightStep := 65536 - lightStep; 114 end; 106 115 end; 107 116 lightAcc := lightDiff div 2;
Note:
See TracChangeset
for help on using the changeset viewer.