Autor Beitrag
The...
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 122



BeitragVerfasst: Sa 05.02.05 01:29 
Hi,

also dieser code:

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:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  DXClass, DXDraws;

type
  TForm1 = class(TForm)
    DXDraw1: TDXDraw;
    DXImageList1: TDXImageList;
    DXTimer1: TDXTimer;
    procedure DXTimer1Timer(Sender: TObject; LagCount: Integer);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.DXTimer1Timer(Sender: TObject; LagCount: Integer);
begin
dxdraw1.Surface.fill(0);
DXImageList1.Items[0].draw(dxdraw1.surface, 0, 0, 0);
dxdraw1.flip;
end;



sollte mir eigendlich dazu verhelfen ein bild mit Delphix anzuzeigen... aber nein da kommt nur nen schwarzer bildschirm!


Was habe ich vergessen?
The... Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 122



BeitragVerfasst: Sa 05.02.05 03:21 
also ich glaube da stimmd was mit dem DXTimer nicht... weil wenn ich den code also

ausblenden Delphi-Quelltext
1:
2:
3:
dxdraw1.Surface.fill(0);  
DXImageList1.Items[0].draw(dxdraw1.surface, 0, 0, 0);  
dxdraw1.flip;



lösche, kommt das gleiche dabei raus, ein schwarzer bildschirm!

Warum? :?: :?:

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.
en!gma
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 378

win xp
delphi 7.0
BeitragVerfasst: Sa 05.02.05 13:11 
hast du die imagelist auf die ddraw-komponente verwiesen?
is wichtig sonst zeigt er nix an
The... Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 122



BeitragVerfasst: Sa 05.02.05 15:01 
ehm nein, ich glaubenicht!

Also ich habe bei Properties folgendes stehen:

DXDraw = DXDraw1
Items =(TPictureCollection)
Name = DXImageList1
Tag = 0

wo muss ich das zuweisen :?:
en!gma
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 378

win xp
delphi 7.0
BeitragVerfasst: Sa 05.02.05 15:25 
ja hmm das stimmt schon
DXDraw=DXDraw1
das isses eigentlich.
haste schonmal ein anderes bild ausprobiert?
villeicht nen bmp?
The... Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 122



BeitragVerfasst: Sa 05.02.05 15:29 
jop habe gerdae versucht... geht nicht!

Also irgendwie ist das nicht gut!

ist was an meinem code nicht richtig?
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Sa 05.02.05 15:35 
probiers mal mit der normalen timer komponente von delphi, damit müsste es gehen :!:
en!gma
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 378

win xp
delphi 7.0
BeitragVerfasst: Sa 05.02.05 15:36 
hmm aber irgendwo hab ich mal gelesen, dass die viel langsamer sei (ca 20x oda so)
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Sa 05.02.05 15:38 
er ist ungenauer aber in manchem fällen funktioniert der delphiX timer net, kA warum
The... Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 122



BeitragVerfasst: Sa 05.02.05 16:00 
na so was... nun habe ich mal ein paar andere versucht und nun geht es mit .bmp aber da habe ich soe schwarzen bild fehler. aber davor habe ich den code so angeordnet:

ausblenden Quelltext
1:
2:
3:
dxdraw1.Surface.fill(0);
DXImageList1.Items[0].draw(dxdraw1.surface, 0, 0, 0);
dxdraw1.flip;


war aber irgenwan schon mal so und da ging es auch nicht...


also ich versteh das nicht???
en!gma
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 378

win xp
delphi 7.0
BeitragVerfasst: Sa 05.02.05 16:17 
was meinste mit schwarzem bildfehler?
bestimmt wegen backgroudn...mach mal die hintergrundfarbe von deinem bild
zb hellrosa, also eine farbe, die in deinem bild nicht vorkommt.
Elite
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 05.02.05 16:53 
Und wenn du jpegs auf dem DXDraw anzeigen lassen willst, musst du die Unit jpeg oben in die uses-Liste einbinden!
The... Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 122



BeitragVerfasst: Sa 05.02.05 16:53 
okey das prob. mit dem bldfehler ist damit behoben... ich ahbe trasparent einfach auf False gesetzt!

Nun bleibt aber immer noch die sache mit dem .jpg, die kann ich nämmlich nicht benuzen!**heul
en!gma
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 378

win xp
delphi 7.0
BeitragVerfasst: Sa 05.02.05 17:00 
hmm ich bin mir nicht sicher.
normalerweise müssten jpeg funktionieren.
aber selbst wenn nicht, wo liegt das problem schnell jpeg zu bmp umzuwandeln?
geht ja sogar mit paint.
jpeg öffnen speichern unter und dann bmp auswählen
Elite
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 05.02.05 17:33 
Elite hat folgendes geschrieben:
Und wenn du jpegs auf dem DXDraw anzeigen lassen willst, musst du die Unit jpeg oben in die uses-Liste einbinden!

Dem Zeitabstand unserer Posts nach zu urteilen, möchte ich wetten, dass er noch nicht gelesen hat, was ich ihm geschrieben habe.
en!gma
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 378

win xp
delphi 7.0
BeitragVerfasst: Sa 05.02.05 17:50 
ganz ehrlich...
ich hab den post auch jex grade erst gesehen, wo du es nocheinmal gesagt hast : )
The... Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 122



BeitragVerfasst: Sa 05.02.05 17:50 
ha... dein postig hatt ich übersehen, sorry :( !

Nun gehts!! :D also da bewegt sich zwar noch nichts aber der anfang ist da! :P

:arrow: Vielen dank an euch beide :wink: :!:

nun werde ich mal versuch 2 .jpg's dazu zu bringen das sich das eine auf dem anderm (hintergrund bewegt) kann ja so schwer nicht sein :? ,oder?
en!gma
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 378

win xp
delphi 7.0
BeitragVerfasst: Sa 05.02.05 18:11 
kein plan...hab noch nie weiter gemacht, als 1 bild zu zeichnen : )
aber normalerweise...
müsstest du ja nur ein 2. bild nehmen, welches genausogross ist wie der hintergrund.
und dann musst du das bild einfach zeichnen lassen, bevor das richtige bild draufgezeichnet wird.
denk ich mir mal einfach so ;D