Changeset 521 for GraphicTest/Packages/bgrabitmap/lineartexscan.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/lineartexscan.inc
r494 r521 21 21 procedure NextLight; inline; 22 22 begin 23 inc(light,lightStep);23 light := (light+lightStep) and 65535; 24 24 inc(lightAcc,lightDiff); 25 25 if lightAcc >= lightMod then 26 26 begin 27 27 dec(lightAcc,lightMod); 28 inc(light);28 light := (light + 1) and 65535; 29 29 end; 30 30 end; … … 53 53 light := info1.lightness; 54 54 lightLen := info2.lightness-info1.lightness; 55 lightStep := lightLen div (ix2-ix1); 56 lightMod := ix2-ix1; 57 lightDiff := lightLen - lightStep*(ix2-ix1); 55 if lightLen >= 0 then 56 begin 57 lightStep := lightLen div (ix2-ix1); 58 lightMod := ix2-ix1; 59 lightDiff := lightLen - lightStep*(ix2-ix1); 60 end else 61 begin 62 lightStep := (-lightLen+(ix2-ix1-1)) div (ix2-ix1); 63 lightMod := ix2-ix1; 64 lightDiff := lightLen + lightStep*(ix2-ix1); 65 lightStep := 65536 - lightStep; 66 end; 58 67 end; 59 68 lightAcc := lightDiff div 2;
Note:
See TracChangeset
for help on using the changeset viewer.