Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2935 connectés 

  FORUM HardWare.fr
  Programmation

  bitmap et DELPHI

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

bitmap et DELPHI

n°96961
vince10
Posté le 05-02-2002 à 14:49:53  profilanswer
 

lut je voudrais copier une partie d'un bitmap dans un autre bitmap
voila ce que je fais :  
 
 bitmap:=tbitmap.create;
 recta:=Rect(0,0,8,8);
 BitMapTemp1:=tbitmap.create;
 BitMapTemp1.copyrect(recta,bitmap);

 
mais ca marche po ;(
merci de m'aider

mood
Publicité
Posté le 05-02-2002 à 14:49:53  profilanswer
 

n°96988
JWhy
je peux plier (héhé)
Posté le 05-02-2002 à 16:10:16  profilanswer
 

ton utilisation de CopyRect n'a pas l'air correct... c'est une methode de TCanvas et non de TBitmap !
 
tiré de l'aide Delphi:
 
The following code illustrates the differences between CopyRect and BrushCopy. The bitmap graphic ?TARTAN.BMP? is loaded into Bitmap and displayed on the Canvas of Form1. BrushCopy replaces the color black in the graphic with the brush of the canvas, while CopyRect leaves the colors intact.
 

Code :
  1. var
  2.   Bitmap: TBitmap;
  3.   MyRect, MyOther: TRect;
  4. begin
  5.   MyRect := Rect(10,10,100,100);
  6.   MyOther := Rect(10,111,100, 201);
  7.   Bitmap := TBitmap.Create;
  8.   Bitmap.LoadFromFile('c:\windows\tartan.bmp' );
  9.   Form1.Canvas.BrushCopy(MyRect, Bitmap, MyRect, clBlack);
  10.   Form1.Canvas.CopyRect(MyOther,Bitmap.Canvas,MyRect);
  11.   Bitmap.Free;
  12. end;

 

[edtdd]--Message édité par JWhy--[/edtdd]


---------------
www.alliancefrancophone.org ... Home is where the heart is
n°97072
vince10
Posté le 05-02-2002 à 20:22:29  profilanswer
 

merci mais l'aide de dephi je l'aie... :pt1cable:

n°97079
JWhy
je peux plier (héhé)
Posté le 05-02-2002 à 20:53:09  profilanswer
 

bah si tu l'as pourquoi tu utilises CopyRect comme ca:  

Code :
  1. BitMapTemp1.copyrect(recta,bitmap);

 
:??:
 
c'est p'tet pour ca que ca marche pô :sarcastic: ;)


---------------
www.alliancefrancophone.org ... Home is where the heart is
n°97080
[SDF]Poire
Vive Grumly
Posté le 05-02-2002 à 20:57:30  profilanswer
 

JWhy a écrit a écrit :

bah si tu l'as pourquoi tu utilises CopyRect comme ca:  

Code :
  1. BitMapTemp1.copyrect(recta,bitmap);

 
:??:
 
c'est p'tet pour ca que ca marche pô :sarcastic: ;)  




Faut pas chercher JWhy...


---------------
Des bons sites pour Delphi? http://forum.hardware.fr/forum2.php3?post=16838&cat=10 -- informaticien -- http://www.z0rglub.com/phpwebgallery/ -- Delphi :love:
n°97089
JWhy
je peux plier (héhé)
Posté le 05-02-2002 à 21:25:12  profilanswer
 

j'ai pô de chance, moi... deja l'aut'gars avec son pb de WinRAR :( ;)


---------------
www.alliancefrancophone.org ... Home is where the heart is
n°97093
[SDF]Poire
Vive Grumly
Posté le 05-02-2002 à 21:29:58  profilanswer
 

JWhy a écrit a écrit :

j'ai pô de chance, moi... deja l'aut'gars avec son pb de WinRAR :( ;)  




Quel URL ? que je rigole


---------------
Des bons sites pour Delphi? http://forum.hardware.fr/forum2.php3?post=16838&cat=10 -- informaticien -- http://www.z0rglub.com/phpwebgallery/ -- Delphi :love:
n°97105
JWhy
je peux plier (héhé)
Posté le 05-02-2002 à 22:18:00  profilanswer
 

bah si tu sais, le gars qui voulait, dans un batch, archiver ses repertoires avec WinRAR et les deplacer sur un repertoire reseau... fait une recherche avec winrar comme mots clés... c'etait dans le titre du topic, je crois..
 
(ah non, pardon, c'etait pas toi, c était darklord22 qui y avait repondu...)

 

[edtdd]--Message édité par JWhy--[/edtdd]


---------------
www.alliancefrancophone.org ... Home is where the heart is

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation

  bitmap et DELPHI

 

Sujets relatifs
[delphi] debutant besoin d'info[Delphi] Accéder a MySQL a distance...
Petite question avec le DateTimePicker sous Delphi[delphi 5]pb o shutdown du pc
avenir de delphiBesoin d'un petit conseil sous Delphi
[DELPHI]BDE repertoire de recherche?Question : Delphi ou Visual C++ ?? ceci est une vrai question !!
[Delphi] 2 question: ordonner listbox ?? + programme tjs visible??delphi et bitmap
Plus de sujets relatifs à : bitmap et DELPHI


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR