Autor Beitrag
Killi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 299

Win*
D6 Prof
BeitragVerfasst: Fr 31.01.03 18:19 
Hi!

Kann ich Bilder, die in einem Canvas gezeichnet wurden speichern? Hab ich schonmal gesehen aber irgendwie finde ich das nicht mehr!


Killi
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Fr 31.01.03 19:17 
wenns das/der (?) canvas eines Images ist so:
ausblenden Quelltext
1:
image1.picture.savetofile(filename:string);					


Fiji-Fighter
Killi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 299

Win*
D6 Prof
BeitragVerfasst: Fr 31.01.03 19:42 
Nee, leider nicht - das ist es ja! Ich lass Kurven zeichnen bei meinem Oszilloskop-Programm- würde also gerne die linien als ganzes speichern - und deshalb gibt es kein Image...
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Fr 31.01.03 19:47 
du zeichnest also im form1.canvas???

willst du das Bild speichern oder willst du die Linien in einer Textdatei speichern???

Fiji-Fighter
Killi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 299

Win*
D6 Prof
BeitragVerfasst: Fr 31.01.03 22:12 
Will das durch eine Funktion entstandene Bild speichern! Ich lass das Ganze in einer PaintBox malen!
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Fr 31.01.03 22:23 
erstell mal nen image mit der gleichen größe wie deine paintbox...
dann mach zum speichern das hier:
ausblenden Quelltext
1:
2:
image1.Canvas.copyrect(rect(0,0,image1.Width,image1.height),paintbox1.canvas,rect(0,0,paintbox1.Width,paintbox1.height));
image1.picture.savetofile(filename);


fertisch :wink:

Warum benutzt du kein image???/was ist der Vorteil der Paintbox???
ich bin damit immer ausgekommen...

Fiji-Fighter
Killi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 299

Win*
D6 Prof
BeitragVerfasst: Mo 03.02.03 19:27 
Ich wüsste leider nicht welche Vorteile die PB hat - nur Nachteile! Man kann nicht speichern, das Schlimmste jedoch ist dass das Bild weggeht wenn man ein anderes Fenster drüber hat! Ich WUSSTE aber gar nicht dass man im Image auch malen kann - danke!!! Ist viel besser!!!
smiegel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 992
Erhaltene Danke: 1

WIN 7
D7 Prof., C#, RAD XE Prof.
BeitragVerfasst: Mo 03.02.03 20:09 
Hallo,

killi hat folgendes geschrieben:

... wüsste leider nicht welche Vorteile die PB ...


Der ganze überflüssige Image-Overhead (Picture, Icon, Graphic, ...) fällt weg und es ist ein OnPaint-Ereignis verfügbar.

_________________
Gruß Smiegel
Ich weiß, daß ich nichts weiß, aber ich weiß mehr als die, die nicht wissen, daß sie nichts wissen. (Sokrates)