line.ppi 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1993,97 by the Free Pascal development team
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. procedure DrawPattern(x1,x2,y:integer);
  12. begin
  13. if BytesPerPixel=3 then
  14. { big problem one point can be across boundary !! }
  15. begin
  16. if ((Y_Array[y]+X_array[x1]) and winlomask)+3 > winlomask then
  17. begin
  18. { special point !! }
  19. { not implemented yet !! }
  20. inc(x1);
  21. end;
  22. end;
  23. asm
  24. movswl x1,%ebx
  25. movswl x2,%ecx
  26. movswl y,%edx
  27. subl %ebx,%ecx
  28. incl %ecx
  29. movl _X_ARRAY(,%ebx,4),%eax
  30. movl _Y_ARRAY(,%edx,4),%edi // { Offset in %edi }
  31. addl %eax,%edi
  32. andl _WINLOMASK,%edi
  33. andl $0x7,%edx // { y and $7 }
  34. shll $0x5,%edx // { y * 8 * sizeof(longint) }
  35. leal _PATTERNBUFFER,%esi //
  36. addl %edx,%esi // { Offset in Patternbuffer }
  37. movl $0x7,%edx
  38. addl _WBUFFER,%edi
  39. pushw %es
  40. movw _SEG_WRITE,%ax
  41. movw %ax,%es
  42. testw $1,_AKTWRITEMODE
  43. jnz .Lpl_xord
  44. .Lpl_movd:
  45. cmpw $2,_BYTESPERPIXEL
  46. je .Lpl_movdw
  47. jb .Lpl_movdb
  48. {$ifdef TEST_24BPP}
  49. cmpw $3,_BYTESPERPIXEL
  50. je .Lpl_movd24BPP
  51. .align 4,0x90
  52. .Lpl_movd32BPP:
  53. andl $7,%ebx
  54. movl (%esi,%ebx,4),%eax
  55. movl %eax,%es:(%edi)
  56. addl $4,%edi
  57. { should not be necessary !! }
  58. cmpl _WINLOMASKMINUSPIXELSIZE,%edi
  59. ja .Lpl_d_exit
  60. incl %ebx
  61. decl %ecx
  62. jnz .Lpl_movd32BPP
  63. jz .Lpl_d_exit
  64. .align 4,0x90
  65. .Lpl_movd24BPP:
  66. andl $7,%ebx
  67. movl (%esi,%ebx,4),%eax
  68. andl $0x00FFFFFF,%eax
  69. movl %es:(%edi),%edx
  70. andl $0xFF000000,%edx
  71. orl %edx,%eax
  72. movl %eax,%es:(%edi)
  73. addl $3,%edi
  74. cmpl _WINLOMASKMINUSPIXELSIZE,%edi
  75. ja .Lpl_d_exit
  76. incl %ebx
  77. decl %ecx
  78. jnz .Lpl_movd24BPP
  79. jz .Lpl_d_exit
  80. {$endif TEST_24BPP}
  81. .align 4,0x90
  82. .Lpl_movdb:
  83. andl %edx,%ebx
  84. movb (%esi,%ebx,4),%al
  85. movb %al,%es:(%edi)
  86. incl %edi
  87. incl %ebx
  88. decl %ecx
  89. jnz .Lpl_movdb
  90. jz .Lpl_d_exit
  91. .align 4,0x90
  92. .Lpl_movdw:
  93. andl %edx,%ebx
  94. movw (%esi,%ebx,4),%ax
  95. movw %ax,%es:(%edi)
  96. addl $2,%edi
  97. incl %ebx
  98. decl %ecx
  99. jnz .Lpl_movdw
  100. jz .Lpl_d_exit
  101. .Lpl_xord:
  102. cmpw $2,_BYTESPERPIXEL
  103. je .Lpl_xordw
  104. jb .Lpl_xordb
  105. {$ifdef TEST_24BPP}
  106. cmpw $3,_BYTESPERPIXEL
  107. je .Lpl_xord24BPP
  108. .align 4,0x90
  109. .Lpl_xord32BPP:
  110. andl $7,%ebx
  111. movl (%esi,%ebx,4),%eax
  112. movl %es:(%edi),%edx
  113. xorl %edx,%eax
  114. movl %eax,%es:(%edi)
  115. addl $4,%edi
  116. cmpl _WINLOMASKMINUSPIXELSIZE,%edi
  117. ja .Lpl_d_exit
  118. incl %ebx
  119. decl %ecx
  120. jnz .Lpl_xord32BPP
  121. jz .Lpl_d_exit
  122. .align 4,0x90
  123. .Lpl_xord24BPP:
  124. andl $7,%ebx
  125. movl (%esi,%ebx,4),%eax
  126. andl $0x00FFFFFF,%eax
  127. movl %es:(%edi),%edx
  128. xorl %edx,%eax
  129. movl %eax,%es:(%edi)
  130. addl $3,%edi
  131. cmpl _WINLOMASKMINUSPIXELSIZE,%edi
  132. ja .Lpl_d_exit
  133. incl %ebx
  134. decl %ecx
  135. jnz .Lpl_xord24BPP
  136. jz .Lpl_d_exit
  137. {$endif TEST_24BPP}
  138. .align 4,0x90
  139. .Lpl_xordb:
  140. andl %edx,%ebx
  141. movb (%esi,%ebx,4),%al
  142. xorb %al,%es:(%edi)
  143. incl %edi
  144. incl %ebx
  145. decl %ecx
  146. jnz .Lpl_xordb
  147. jz .Lpl_d_exit
  148. .align 4,0x90
  149. .Lpl_xordw:
  150. andl %edx,%ebx
  151. movw (%esi,%ebx,4),%ax
  152. xorw %ax,%es:(%edi)
  153. addl $2,%edi
  154. incl %ebx
  155. decl %ecx
  156. jnz .Lpl_xordw
  157. .Lpl_d_exit:
  158. popw %es
  159. .Lpl_exit:
  160. end;
  161. end;
  162. procedure PatternLine(x1,x2,y:integer);
  163. var bank1,bank2 : longint;
  164. ofs1,ofs2 : longint;
  165. diff : integer;
  166. viewport : ViewPortType;
  167. begin
  168. x1:= x1 + aktviewport.x1 ;
  169. y:= y + aktviewport.y1 ;
  170. x2:= x2 + aktviewport.x1 ;
  171. if aktviewport.clip then viewport:=aktviewport else viewport:=aktscreen;
  172. if (y < viewport.y1) or (y > viewport.y2) then exit;
  173. if x1 > x2 then begin diff:=x2; x2:=x1; x1:=diff; end;
  174. if (x1> viewport.x2) or (x2< viewport.x1) then exit;
  175. if x1 < viewport.x1 then x1:=viewport.x1;
  176. if x2 > viewport.x2 then x2:=viewport.x2;
  177. ofs1:= Y_ARRAY[y];
  178. ofs2:= ofs1 + X_ARRAY[x2];
  179. ofs1:= ofs1 + X_ARRAY[x1];
  180. bank1:=ofs1 shr winshift;
  181. bank2:=ofs2 shr winshift;
  182. if bank1 <> A_BANK then
  183. begin
  184. Switchbank(bank1);
  185. end;
  186. if bank1 <> bank2 then begin
  187. diff:=(((bank2 shl winshift)-ofs1) div BytesPerPixel)+x1;
  188. DrawPattern(x1,diff-1,y);
  189. Switchbank(bank2);
  190. DrawPattern(diff,x2,y);
  191. end else DrawPattern(x1,x2,y);
  192. end;
  193. procedure HorizontalLine(x1,x2,y:integer);
  194. { without bankswitching }
  195. { nothing for 24BPP yet (PM) }
  196. {$ifdef TEST_24BPP}
  197. var i,j : longint;
  198. {$endif TEST_24BPP}
  199. begin
  200. {$ifdef TEST_24BPP}
  201. if BytesPerPixel=3 then
  202. { big problem one point can be across boundary !! }
  203. begin
  204. if ((Y_Array[y]+X_array[x1]) and winlomask)+3 > winlomask then
  205. begin
  206. { special point !! }
  207. { not implemented yet !! }
  208. inc(x1);
  209. end;
  210. j:=Y_array[y]+X_array[x1];
  211. for i:=x1 to x2 do
  212. begin
  213. if aktwritemode=normalput then
  214. pixel(j)
  215. else
  216. begin
  217. putpixeli(i,y,aktcolor xor getpixel(i,y));
  218. end;
  219. inc(j,3);
  220. end;
  221. exit;
  222. end;
  223. {$endif TEST_24BPP}
  224. asm
  225. movw %es,%dx
  226. movzwl y,%ebx
  227. movzwl x1,%eax
  228. movzwl x2,%ecx
  229. incl %ecx
  230. movl _X_ARRAY(,%eax,4),%eax
  231. movl _X_ARRAY(,%ecx,4),%ecx
  232. movl _Y_ARRAY(,%ebx,4),%edi // { Offset in %edi }
  233. subl %eax,%ecx // { Counter }
  234. addl %eax,%edi
  235. andl _WINLOMASK,%edi
  236. movl _AKTCOLOR,%eax
  237. movzwl _AKTWRITEMODE,%esi
  238. addl _WBUFFER,%edi
  239. movw _SEG_WRITE,%bx
  240. movw %bx,%es
  241. testl %esi,%esi // { Writemode ? }
  242. jnz .Lhl_xor
  243. shrl %ecx
  244. jnc .L_movw
  245. stosb
  246. .L_movw:
  247. shrl %ecx
  248. jnc .L_movd
  249. stosw
  250. .L_movd:
  251. rep
  252. stosl
  253. jmp .Lhl_exit
  254. .Lhl_xor: // -------------------------------------------------
  255. movl $4,%esi
  256. shrl %ecx
  257. jnc .Lhl_xorw
  258. xorb %al,%es:(%edi)
  259. incl %edi
  260. .Lhl_xorw:
  261. shrl %ecx
  262. jnc .Lhl_xord
  263. xorw %ax,%es:(%edi)
  264. addl $2,%edi
  265. .Lhl_xord:
  266. jecxz .Lhl_exit
  267. .align 4,0x90
  268. .Lhl_xorloop:
  269. xorl %eax,%es:(%edi)
  270. addl %esi,%edi
  271. decl %ecx
  272. jnz .Lhl_xorloop
  273. .Lhl_exit:
  274. movw %dx,%es
  275. end;
  276. end;
  277. procedure Line(x1,y1,x2,y2: integer);
  278. var dx,dy,d : longint;
  279. i,j : integer;
  280. ofs,ofs2 : longint;
  281. i1,i2,ix : longint;
  282. x,y : Integer;
  283. flag,dontcheck : Boolean;
  284. viewport : ViewPortType;
  285. begin
  286. x1:= x1 + aktviewport.x1 ;
  287. y1:= y1 + aktviewport.y1 ;
  288. x2:= x2 + aktviewport.x1 ;
  289. y2:= y2 + aktviewport.y1 ;
  290. if aktviewport.clip then viewport:=aktviewport else viewport:=aktscreen;
  291. { ************ Horizontalline ************** }
  292. if y1=y2 then begin
  293. if x1>x2 then begin d:=x1; x1:=x2; x2:=d; end;
  294. if aktlineinfo.thickness=3 then y1:=y1-1;
  295. i:=0;
  296. if x1 < viewport.x1 then x1:=viewport.x1;
  297. if x2 > viewport.x2 then x2:=viewport.x2;
  298. if (y1 > viewport.y2) or (x1 > x2 ) then exit;
  299. repeat
  300. if (y1 >= viewport.y1) and (y1 <=viewport.y2)
  301. then begin
  302. ofs:= Y_ARRAY[y1];
  303. ofs2:=ofs+X_ARRAY[x2];
  304. ofs:= ofs+X_ARRAY[x1];
  305. i1:=ofs shr winshift; i2:=ofs2 shr winshift;
  306. if i1 <> a_bank then
  307. begin
  308. switchbank(i1);
  309. end;
  310. if i1=i2 then Horizontalline(x1,x2,y1)
  311. else
  312. begin
  313. dx:=((i2 shl winshift)-ofs) div BytesPerPixel;
  314. horizontalline(x1,x1+dx-1,y1);
  315. Switchbank(i2);
  316. horizontalline(dx+x1,x2,y1);
  317. end;
  318. end;
  319. i:=i+1; y1:=y1+1;
  320. until i=aktlineinfo.thickness;
  321. exit;
  322. end;
  323. { *********** End Horizontalline *********** }
  324. if y1 > y2 then begin
  325. x:=x1; x1:=x2; x2:=x;
  326. y:=y1; y1:=y2; y2:=y;
  327. end;
  328. { ************** Verticalline ************** }
  329. if x1=x2 then
  330. begin
  331. if y1 < viewport.y1 then y1:=viewport.y1;
  332. if y2 > viewport.y2 then y2:=viewport.y2;
  333. if ( y1 > y2) or (x1 < viewport.x1) or (x1 > viewport.x2) then exit;
  334. ofs:= Y_Array[y2]+X_Array[x1];
  335. ofs2:=Y_Array[y1]+X_Array[x1];
  336. while ofs >= ofs2 do begin
  337. pixel(ofs);
  338. if aktlineinfo.thickness=3 then begin
  339. if x1>viewport.x1 then pixel(ofs-1);
  340. if x1<viewport.x2 then pixel(ofs+1);
  341. end;
  342. ofs:=ofs-BytesPerLine;
  343. end;
  344. exit;
  345. end;
  346. { ************ End Verticalline ************ }
  347. dy:=y2-y1;
  348. dx:=abs(x2-x1);
  349. if x1>x2 then ix:=-1 else ix:= 1;
  350. if dx<dy then begin d:=dx; dx:=dy; dy:=d; Flag:=true end else Flag:=false;
  351. i1:=dy shl 1;
  352. d:=i1 - dx;
  353. i2:=(dx shl 1)-i1;
  354. { for 24BPP use slow checking code,easy and poor implementation ! PM }
  355. dontcheck:=(y1>=viewport.y1) and (y2<=viewport.y2) and
  356. (x1>=viewport.x1) and (x1<=viewport.x2) and
  357. (x2>=viewport.x1) and (x2<=viewport.x2) and
  358. (BytesPerPixel<3);
  359. if aktlineinfo.thickness=3 then
  360. { *************************************** }
  361. { **** Thickness=3 with rangechecking *** }
  362. { *************************************** }
  363. begin
  364. repeat
  365. for i:=y1-1 to y1+1 do
  366. for j:=x1-1 to x1+1 do
  367. if (i>=viewport.y1) and (j>=viewport.x1) and
  368. (j<=viewport.x2) and (i<=viewport.y2) then pixel(X_ARRAY[j]+Y_ARRAY[i]);
  369. if d < 0
  370. then begin
  371. if Flag then y1:=y1+1 else x1:=x1+ix;
  372. d:=d+i1;
  373. end
  374. else begin
  375. d:=d-i2; x1:=x1+ix; y1:=y1+1;
  376. end;
  377. dx:=dx-1;
  378. until ( dx=0 ) or ( y1 > viewport.y2 )
  379. end else
  380. if dontcheck then
  381. { *************************************** }
  382. { ** Thickness=1 without rangechecking ** }
  383. { *************************************** }
  384. begin
  385. asm
  386. pushw %gs
  387. movw _SEG_WRITE,%ax
  388. movw %ax,%gs // { ScreenSelector }
  389. // selfmodify to speedup Code
  390. xorl %ebx,%ebx
  391. movl ix,%eax
  392. testl %eax,%eax
  393. jns line1_inc
  394. movl $0x08,%ebx
  395. line1_inc:
  396. addl $0x43,%ebx // Opcode incl %ebx
  397. movb %bl,inc_dec1
  398. movb %bl,inc_dec2
  399. movl i1,%eax
  400. movl %eax,i1long1
  401. movl %eax,i1long2
  402. movl i2,%eax
  403. movl %eax,i2long
  404. movl _WBUFFER,%eax
  405. movl %eax,.Lwbuffer
  406. movzbl _WINSHIFT,%eax
  407. movb %al,.Lwinshift
  408. movl _WINLOMASK,%eax
  409. movl %eax,.Lwinlomask
  410. movb $0x90,operandprefix // Opcade nop
  411. testw $1,_AKTWRITEMODE
  412. jnz line1XOR
  413. movb $0x88,linemode // Opcode movb
  414. jmp linedepth
  415. line1XOR:
  416. movb $0x30,linemode // Opcode xorb
  417. linedepth:
  418. testw $1,_BYTESPERPIXEL
  419. jnz is_byte
  420. movb $0x66,operandprefix // Prefix for operandsize
  421. incb linemode // incr. for wordacces
  422. is_byte:
  423. movl dx,%ecx
  424. movl _AKTCOLOR,%eax
  425. movzwl y1,%esi
  426. movzwl x1,%ebx
  427. movswl d,%edx
  428. //----------------//
  429. // Linemainloop //
  430. //----------------//
  431. .align 4,0x90
  432. line1_loop:
  433. pushl %ecx
  434. pushl %eax
  435. movl _Y_ARRAY(,%esi,4),%edi
  436. addl _X_ARRAY(,%ebx,4),%edi
  437. movl %edi,%eax
  438. .byte 0x81,0xe7 // andl ..,%edi
  439. .Lwinlomask: //
  440. .long 0x88888888 // _WINLOMASK
  441. .byte 0xc1,0xe8 // shrl ..,%eax
  442. .Lwinshift: //
  443. .byte 0x88 // _WINSHIFT
  444. pushl %edi
  445. cmpl _A_BANK,%eax
  446. je line1_dontswitch
  447. pushl %ebx
  448. pushl %edx
  449. pushl %esi
  450. pushl %eax
  451. movl _BANKSWITCHPTR,%eax
  452. call %eax
  453. popl %esi
  454. popl %edx
  455. popl %ebx
  456. .align 4,0x90
  457. line1_dontswitch:
  458. popl %edi
  459. popl %eax
  460. popl %ecx
  461. .byte 0x81,0xc7 // addl ..,%edi
  462. .Lwbuffer: //
  463. .long 0x88888888 // _WBUFFER
  464. operandprefix:
  465. .byte 0x90 // Operandprefix (nop for Byte,$66 for Word)
  466. .byte 0x65 // Segmentprefix %gs:
  467. linemode:
  468. .byte 0x88,0x07 // modified OpCode<movb,xorb...>,%edi
  469. decl %ecx
  470. jz line1_end
  471. testl %edx,%edx // { if d < 0 then }
  472. jns is_positive
  473. testb $1,flag // { if flag then }
  474. jz no_flag
  475. incl %esi // { y1:=y1+1 }
  476. .byte 0x81,0xc2
  477. i1long1:
  478. .long 0x88888888 // { d:=d+i1 }
  479. jmp line1_loop
  480. .align 4,0x90
  481. no_flag:
  482. inc_dec1:
  483. .byte 0x88 // { x1:=x1+ix }
  484. .byte 0x81,0xc2
  485. i1long2:
  486. .long 0x88888888 // { d:=d+i1 }
  487. jmp line1_loop
  488. .align 4,0x90
  489. is_positive:
  490. inc_dec2:
  491. .byte 0x88 // { x1:=x1+ix }
  492. incl %esi // { y1:=y1+1 }
  493. .byte 0x81,0xea
  494. i2long:
  495. .long 0x88888888 // { d:=d-i2 }
  496. jmp line1_loop
  497. line1_end:
  498. popw %gs
  499. end;
  500. end else
  501. { *************************************** }
  502. { **** Thickness=1 with rangechecking *** }
  503. { *************************************** }
  504. begin
  505. repeat
  506. if y1 > viewport.y2 then exit;
  507. if (y1>=viewport.y1) and (x1>=viewport.x1) and
  508. (x1<=viewport.x2) then pixel(Y_ARRAY[y1]+X_ARRAY[x1]);
  509. if d < 0
  510. then begin
  511. if Flag then y1:=y1+1 else x1:=x1+ix;
  512. d:=d+i1;
  513. end
  514. else begin
  515. d:=d-i2; x1:=x1+ix; y1:=y1+1;
  516. end;
  517. dx:=dx-1;
  518. until dx=0 ;
  519. end;
  520. end;
  521. procedure MoveTo(x,y : integer);
  522. begin
  523. _graphresult:=grOk;
  524. if not isgraphmode then
  525. begin
  526. _graphresult:=grnoinitgraph;
  527. exit;
  528. end;
  529. curx:=x;
  530. cury:=y;
  531. end;
  532. procedure MoveRel(dx,dy : integer);
  533. begin
  534. _graphresult:=grOk;
  535. if not isgraphmode then
  536. begin
  537. _graphresult:=grnoinitgraph;
  538. exit;
  539. end;
  540. curx:=curx+dx;
  541. cury:=cury+dy;
  542. end;
  543. procedure LineTo(x,y : integer);
  544. begin
  545. _graphresult:=grOk;
  546. if not isgraphmode then
  547. begin
  548. _graphresult:=grnoinitgraph;
  549. exit;
  550. end;
  551. Line(curx,cury,x,y);
  552. MoveTo(x,y);
  553. end;
  554. procedure LineRel(dx,dy : integer);
  555. begin
  556. _graphresult:=grOk;
  557. if not isgraphmode then
  558. begin
  559. _graphresult:=grnoinitgraph;
  560. exit;
  561. end;
  562. Line(curx,cury,curx+dx,cury+dy);
  563. curx:=curx+dx;
  564. cury:=cury+dy;
  565. end;
  566. procedure SetLineStyle(LineStyle : word;pattern : word;thickness : word);
  567. const
  568. linepatterns : array[0..3] of word =
  569. ($ffff,$aaaa,$fafa,$ffff);
  570. begin
  571. if (linestyle<0) or (linestyle>4) or
  572. ((thickness<>1) and (thickness<>3)) then
  573. begin
  574. _graphresult:=grerror;
  575. exit;
  576. end;
  577. aktlineinfo.linestyle:=linestyle;
  578. if aktlineinfo.linestyle=UserBitLn then
  579. aktlineinfo.pattern:=pattern
  580. else
  581. aktlineinfo.pattern:=linepatterns[aktlineinfo.linestyle];
  582. aktlineinfo.thickness:=thickness;
  583. end;
  584. procedure DrawPoly(points : word;var polypoints);
  585. type
  586. ppointtype = ^pointtype;
  587. var
  588. i : longint;
  589. begin
  590. _graphresult:=grOk;
  591. if not isgraphmode then
  592. begin
  593. _graphresult:=grnoinitgraph;
  594. exit;
  595. end;
  596. line(ppointtype(@polypoints)[points-1].x,
  597. ppointtype(@polypoints)[points-1].y,
  598. ppointtype(@polypoints)[0].x,
  599. ppointtype(@polypoints)[0].y);
  600. for i:=0 to points-2 do
  601. line(ppointtype(@polypoints)[i].x,
  602. ppointtype(@polypoints)[i].y,
  603. ppointtype(@polypoints)[i+1].x,
  604. ppointtype(@polypoints)[i+1].y);
  605. end;
  606. {
  607. $Log$
  608. Revision 1.4 1998-11-18 13:23:35 pierre
  609. * floodfill got into an infinite loop !!
  610. + added partial support for fillpoly
  611. (still wrong if the polygon is not convex)
  612. Simply make a floodfill from the barycenter !
  613. * some 24BPP code changed (still does not work for my S3VBE program !)
  614. Revision 1.3 1998/11/18 09:31:37 pierre
  615. * changed color scheme
  616. all colors are in RGB format if more than 256 colors
  617. + added 24 and 32 bits per pixel mode
  618. (compile with -dDEBUG)
  619. 24 bit mode with banked still as problems on pixels across
  620. the bank boundary, but works in LinearFrameBufferMode
  621. Look at install/demo/nmandel.pp
  622. Revision 1.2 1998/09/02 08:16:00 pierre
  623. * local asm labels with global variable names removed !!
  624. Revision 1.1.1.1 1998/03/25 11:18:42 root
  625. * Restored version
  626. Revision 1.4 1998/03/03 22:48:43 florian
  627. + graph.drawpoly procedure
  628. + putimage with xorput uses mmx if available
  629. Revision 1.3 1998/01/26 11:58:18 michael
  630. + Added log at the end
  631. Working file: rtl/dos/ppi/line.ppi
  632. description:
  633. ----------------------------
  634. revision 1.2
  635. date: 1997/12/01 12:21:31; author: michael; state: Exp; lines: +14 -0
  636. + added copyright reference in header.
  637. ----------------------------
  638. revision 1.1
  639. date: 1997/11/27 08:33:51; author: michael; state: Exp;
  640. Initial revision
  641. ----------------------------
  642. revision 1.1.1.1
  643. date: 1997/11/27 08:33:51; author: michael; state: Exp; lines: +0 -0
  644. FPC RTL CVS start
  645. =============================================================================
  646. }