Questo sito utilizza cookies, anche di terze parti, per mostrare pubblicità e servizi in linea con il tuo account. Leggi l'informativa sui cookies.
Username: Password: oppure
Phi immgrd.dll versione2 - graphimmgrd.pas

graphimmgrd.pas

Caricato da: Phi
Scarica il programma completo

  1. { $Id: gplunit.pt,v 1.2 2002/09/07 15:40:47 peter Exp 2010/05/01 16:18:32 peter Exp $
  2.    This file is part of Phi immgrd.dll
  3.    Copyright (c) 2010 by Phi
  4.  
  5.    Unit using immgrd.dll's function for then FreePascal graph unit
  6.  
  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. unit graphimmgrd;
  12.  
  13. interface
  14.  
  15. uses windows, graph;
  16.  
  17. type
  18. Timmagine = packed record
  19.  head : bitmapfileheader;
  20.  info : bitmapinfoheader;
  21.  bits : array[0..0]of byte;
  22. end;
  23.  
  24. function font(nome:string[31];h,l:word;corsivo,sottolineato : boolean) : hfont;external 'phi immgrd'name'dati a font';
  25. function brush(c:longint):hbrush;external 'phi immgrd'name'dati to brush';
  26. function pen(colore:longint;l:byte;stile:longint):hpen;external 'phi immgrd'name'dati a pen';
  27. function ImmtoBitmap(var bitmap) : hbitmap;external 'phi immgrd'name'Timmagine a bitmap';
  28. procedure disegnabitmap(dc:hdc;x,y:smallint;bitmap:hbitmap);external 'phi immgrd'name'disegnabitmap';
  29. function leggifilebmp(nome:string; var bitmap:pointer):boolean;external 'phi immgrd'name'leggifilebmp';
  30. procedure disegnafilebmp(dc:hdc;x,y:smallint;nome:string);external 'phi immgrd'name'disegnafilebmp';
  31. procedure writeln(x, y : integer; S:string);
  32.  
  33. procedure disegnabitmap(x,y:smallint;bitmap:hbitmap);
  34. procedure disegnafilebmp(x,y:smallint;nome:string);
  35. procedure settext(colore,sfondo:longint;nome:string[31];h, l:word;g,c:boolean);
  36. procedure disegnabitmap(x, y:word;bitmap:hbitmap);
  37.  
  38. var
  39. icona : hicon;external 'phi immgrd' name 'icona';
  40. bitmap : hicon;external 'phi immgrd' name 'bitmap';
  41.  
  42.  
  43. implementation
  44.  
  45. procedure disegnabitmap(x,y:smallint;bitmap:hbitmap);
  46. begin
  47. if drawtoscreen then disegnabitmap(windc,x,y,bitmap);
  48. if drawtobitmap then disegnabitmap(bitmapdc,x,y,bitmap);
  49. end;
  50.  
  51. procedure disegnafilebmp(x,y:smallint;nome:string);
  52. begin
  53. if drawtoscreen then disegnafilebmp(windc,x,y,nome);
  54. if drawtobitmap then disegnafilebmp(bitmapdc,x,y,nome);
  55. end;
  56.  
  57. procedure write(dc:hdc;x,y:smallint;const textstring:shortstring);external 'phi immgrd'name'write';
  58.  
  59. procedure writeln(x, y : integer; S:string);
  60. begin
  61. if drawtoscreen then write(windc,x,y,s);
  62. if drawtobitmap then write(bitmapdc,x,y,s);
  63. end;
  64.  
  65. procedure disegnabitmap(x, y:word;bitmap:hbitmap);
  66. begin
  67. if drawtoscreen then disegnabitmap(windc,x,y,bitmap);
  68. if drawtobitmap then disegnabitmap(bitmapdc,x,y,bitmap);
  69. end;
  70.  
  71. procedure settext(colore,sfondo:longint;nome:string[31];h, l:word;g,c:boolean);
  72. begin
  73. windows.settextcolor(bitmapdc,colore);
  74. windows.setbkcolor(bitmapdc,sfondo);
  75. windows.settextcolor(windc,colore);
  76. windows.setbkcolor(windc,sfondo);
  77. selectobject(bitmapdc,font(nome,h,l,g,c));
  78. selectobject(windc,font(nome,h,l,g,c));
  79. end;
  80.  
  81.  
  82. END.