Autor Beitrag
Chryzler
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1097
Erhaltene Danke: 2



BeitragVerfasst: Fr 23.09.05 13:58 
Hi

Ist Alpha-Blending mit nem Label (oder StaticText??) möglich?
Ich hab schon einiges versucht, allerdings geht das alles nur mit der Form.
Und im Forum war auch nichts brauchbares.


Ich hoffe ihr könnt mir helfen :D
SnuffMaster23
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: Sa 01.10.05 01:09 
Hi du,

Ich versuch mal, dir zu helfen.
Du kannst einfach die Eigenschaft "Transparent" von TLabel auf true setzen.
Wenn dir das nicht reicht und die Schrift durchsichtig sein soll sehe ich keine andere Möglichkeit, als über ein Canvas (z.B. von der Form) die Farben Pixel für Pixel zu mixen.

Mfg SnuffMaster23

P.S.: ruf mich mal an

_________________
Nichts ist wahr - Alles ist erlaubt
Chryzler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1097
Erhaltene Danke: 2



BeitragVerfasst: Sa 01.10.05 10:53 
Tja, das ist ja grad das Problem.
Ich wollte ne Animation draus machen, also dass die Schrift dann so "einfaded" oder wie man dass nennt.
und da würde das mit Canvas ne halbe Ewigkeit dauern.
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Sa 01.10.05 10:56 
user profile iconChryzler hat folgendes geschrieben:
da würde das mit Canvas ne halbe Ewigkeit dauern.


zu programmieren vielleich schon, aber langsam sollte das nicht sein

_________________
wer andern eine grube gräbt hat ein grubengrabgerät
- oder einfach zu viel zeit
Chryzler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1097
Erhaltene Danke: 2



BeitragVerfasst: Sa 01.10.05 11:05 
Hm.
Jedes einzelen Framee, Pixel für Pixel durchgehen.
Und das soll dann flüssig ablaufen.
Die einzige Möglichkeit wäre vielleicht, alle Frames schon vor dem Anzeigen zu berechnen.
LH_Freak
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 385

Win XP
D7 PE, D2k5 Trial
BeitragVerfasst: Sa 01.10.05 17:45 
ich glaub mit Graphic32 sollte das recht einfach und schnell von der Geschwindigkeit her gehen
Chryzler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1097
Erhaltene Danke: 2



BeitragVerfasst: Sa 01.10.05 18:04 
Graphic32 :?: :?: :?:
was ist das??
LH_Freak
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 385

Win XP
D7 PE, D2k5 Trial
BeitragVerfasst: Sa 01.10.05 18:15 
eine Komponentensammlungen für Grafikdinger ;)

Guckst du hier: www.g32.org/graphics32/
alzaimar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2889
Erhaltene Danke: 13

W2000, XP
D6E, BDS2006A, DevExpress
BeitragVerfasst: Sa 01.10.05 19:21 
Ist doch einfach: (Form, button, label)
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
Function MergeColors (C0,C1 : TColor; I,N : Integer) : TColor;
Begin
  i:= i mod n;
  If N=1 Then
    Result := c0
  Else
    Result := RGB (
        (GetRValue(c1)*I + GetRValue(c0)*(N-I-1)) div (n-1),
        (GetGValue(c1)*I + GetGValue(c0)*(N-I-1)) div (n-1),
        (GetBValue(c1)*I + GetBValue(c0)*(N-I-1)) div (n-1)
      );
end;

procedure TForm1.btAnimateClick(Sender: TObject);
Var
  i,j : Integer;
  c0,c1 : TColor;

begin
  c0 := clRed; // Anfangsfarbe

  c1 := clWhite; // Endfarbe
  For i:=1 to 5 do begin
    For j:=0 to 99 do begin
      lbAnimate.font.Color := mergeColors (c0,c1,j,100);
      sleep(10);
      Application.ProcessMessages;
      End;
    For j:=99 downto 0 do begin
      lbAnimate.font.Color := mergeColors (c0,c1,j,100);
      sleep (10);
      Application.ProcessMessages;
      End;
    End;
end;

_________________
Na denn, dann. Bis dann, denn.