Thread Transparente Frames???? (8 answers)
Opened by fabmo at 2007-09-24 16:33

Arkhen2
 2007-10-05 13:03
#100330 #100330
User since
2005-03-11
25 Artikel
BenutzerIn
[default_avatar]
Mit Tk:Zinc scheint es zu funktionieren.

Code: (dl )
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
36
37
#!/usr/bin/perl
use Tk;
use Tk::Zinc;
use Tk::JPEG;
use strict;

my $mw = MainWindow->new();

my $img = $mw->Photo(
-data => 'JPEG',
-file => 'c:\mann3.jpg'
);

my $zinc = $mw->Zinc(
-borderwidth => 1,
-relief => 'sunken',
-render => 1
)->pack();




$zinc->add('icon',1,
-image => $img,
-anchor => 'nw',
-position => [15, 15]);

$zinc->add('rectangle', 1, [10,10, 330, 200],
-fillcolor => "=axial 90|#ffffff;80 |#c0c0c0;50", # von bis Farbe Transparenz
-filled => 1);

$zinc->add('text',1,
-text => 'Ein schöner Text',
-anchor => 'nw',
-position => [15, 15]);

MainLoop();



Zuerst das Bild und dann die anderen Zinc Elemente drüber legen.
Das Rectangle Element erzeugt die Transparenz.

View full thread Transparente Frames????