equal
deleted
inserted
replaced
111 var d1, d2, d: hwFloat; |
111 var d1, d2, d: hwFloat; |
112 begin |
112 begin |
113 Vx:= int2hwFloat(p1.X - p3.X); |
113 Vx:= int2hwFloat(p1.X - p3.X); |
114 Vy:= int2hwFloat(p1.Y - p3.Y); |
114 Vy:= int2hwFloat(p1.Y - p3.Y); |
115 |
115 |
116 d:= DistanceI(p2.X - p1.X, p2.Y - p1.Y); |
|
117 d1:= DistanceI(p2.X - p3.X, p2.Y - p3.Y); |
|
118 d2:= Distance(Vx, Vy); |
116 d2:= Distance(Vx, Vy); |
119 |
|
120 if d1 < d then |
|
121 d:= d1; |
|
122 if d2 < d then |
|
123 d:= d2; |
|
124 |
|
125 d:= d * _1div3; |
|
126 |
117 |
127 if d2.QWordValue = 0 then |
118 if d2.QWordValue = 0 then |
128 begin |
119 begin |
129 Vx:= _0; |
120 Vx:= _0; |
130 Vy:= _0 |
121 Vy:= _0 |
131 end |
122 end |
132 else |
123 else |
133 begin |
124 begin |
134 d2:= _1 / d2; |
125 d:= DistanceI(p2.X - p1.X, p2.Y - p1.Y); |
|
126 d1:= DistanceI(p2.X - p3.X, p2.Y - p3.Y); |
|
127 |
|
128 if d1 < d then |
|
129 d:= d1; |
|
130 if d2 < d then |
|
131 d:= d2; |
|
132 |
|
133 d2:= d * _1div3 / d2; |
|
134 |
135 Vx:= Vx * d2; |
135 Vx:= Vx * d2; |
136 Vy:= Vy * d2; |
136 Vy:= Vy * d2 |
137 |
|
138 Vx:= Vx * d; |
|
139 Vy:= Vy * d |
|
140 end |
137 end |
141 end; |
138 end; |
142 |
139 |
143 procedure AddLoopPoints(var pa, opa: TPixAr; StartI, EndI: LongInt; Delta: hwFloat); |
140 procedure AddLoopPoints(var pa, opa: TPixAr; StartI, EndI: LongInt; Delta: hwFloat); |
144 var i, pi, ni: LongInt; |
141 var i, pi, ni: LongInt; |