Autor Beitrag
bummi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1248
Erhaltene Danke: 187

XP - Server 2008R2
D2 - Delphi XE
BeitragVerfasst: Mo 25.10.10 00:25 
Nachdem ich zu o.g. Thema nicht brauchbares finden konnte habe ich mich mal selbst reingepuzzelt.

Eigentlich gedacht ist es für die Umleitung von Paintroutinen eigener TGraphicskomponenten in ein PNG.
ausblenden 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:
var
  png:TPngImage;
  g:TGPGraphics;
  b:TGPSolidBrush;
  x,y:Integer;
  bmp:TBitMap;
begin
  bmp := TransparentBitmap(200,200);

  g := GetGraphics(bmp.Canvas);
  b := GetSolidBrush(clRed,200);
  g.FillEllipse(b,10,10,180,80);
  b.Free;
  b := GetSolidBrush(clBlue,128);
  g.FillEllipse(b,20,0,80,180);
  b.Free;
  b := GetSolidBrush(clWhite,180);
  g.FillEllipse(b,100,50,120,80);
  b.Free;


  PNG := PNG4TransparentBitMap(bmp);
  PNG.SaveToFile('C:\temp\Transp.png');
  bmp.Free;
  g.Free;
end;

wer meint es könnte für ihn auch interessant sein, bitte melden


Moderiert von user profile iconNarses: Topic aus Multimedia / Grafik verschoben am Mo 25.10.2010 um 10:01


Transp.png  (5.33 KB) Download (Rev 0)
 (334x, 334x gesamt)
Beschreibung: