Вниз
Скачать: CL | DM;

Прозрачная картинка   Найти похожие ветки 

 
Protey   (2002-12-03 05:56) [0]

Люди помогите! Имеется две картинки. Необходимо одну наложить на другую так, чтоб один из цетов оказался прозрачен.


 
MBo ©   (2002-12-03 06:15) [1]

TransparentBlt (не для всех версий windows)


 
SI-riuss ©   (2002-12-05 11:15) [2]

Ну да. Или так Image1.Transparent:=True; За прозрачный берется цвет с не помню какого угла картинки.


 
Mirovodin ©   (2002-12-05 11:34) [3]

2 SI-riuss © Вернего левого.


2 Protey Также см. пример процедуры:
http://delphigfx.mastak.ru/faq/gdi/gdi_faq.htm#Q6


 
Protey   (2002-12-15 03:03) [4]

Спасибо. Работает.


 
3223(jab)   (2003-04-24 15:03) [5]

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls;

type
TForm1 = class(TForm)
Image1: TImage;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
( Sender: TObject) unit Unit1;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls;

type
TForm1 = class(TForm)
Image1: TImage;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
var
b1,b2,b3:TBitmap;
begin
b1:=TBitmap.Create;
b2:=TBitmap.Create;
b3:=TBitmap.Create;

b1.LoadFromFile("c:\1.bmp");
b2.LoadFromFile("c:\2.bmp");

b2.Transparent:=True;

b3.Width:=b1.Width; b3.Height:=b1.Height;
b3.Canvas.Draw(0,0,b1);
b3.Canvas.Draw(0,0,b2);

Image1.Picture.Assign(b3);

b1.free;
b2.free;
b3.free;
end;

end.



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.46 MB
Время: 0.014 c
14-89565
Yakudza
2003-10-07 22:00
2003.10.27
Совет !


14-89531
sapsi
2003-10-08 14:03
2003.10.27
Игры для ZX-Spectrum


14-89490
panov
2003-10-09 17:20
2003.10.27
Создание топиков, обращенных к определенному участнику форума


1-89318
Элина
2003-10-16 16:17
2003.10.27
Как загрузить иконку из DLL?


3-89152
Игоряныч
2003-09-19 08:03
2003.10.27
Splash при подключении к БД через ADO???




   Наверх