Autor Beitrag
KleinesProgramm
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 21



BeitragVerfasst: Mi 19.03.08 13:57 
hallo, ich möchte ein Programm schreiben, das im Hintergrund läuft und im programm Paint (welches im vordergrund läuft) nach meinen Anweisungen zeichnet.

Ein Problem dabei ist: Die Farben

Kann Delphi mit Hexadezimalschreibweisen von Farben zurecht kommen? also kann ich fragen ob der Pixel auf (X, Y) die Farbe #FF66FF hat oder iwas in der Art?

vll falls möglich schritt für schritt erklären, und vielleicht ein kleines Beispiel dazu schreiben? weil mit begriffen wie Parameter und sowas kann ich nicht umgehen...

danke für eure antworten



(P.S. ich habe noch mehr topics zu diesem Thema, aber man soll hier ja Fragen einzeln listen...
weitere Topics:
Probleme bei Tastaturkontrolle
Probleme bei Cursorkontrolle
Delphi im Hintergrund)
huuuuuh
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 665
Erhaltene Danke: 19

win xp, (win vista), win 7
VS 2008 Express Edition, VS 2010 Express Edition, VS 2010 Professionell
BeitragVerfasst: Mi 19.03.08 14:29 
ausblenden Delphi-Quelltext
1:
2:
farbebgr:= '$00' + edit4.text + edit3.Text + edit2.Text;
canvas.Pen.Color:= StringToColor(farbebgr);


edit2 beinhaltet die ersten 2 zahlen vom HEX Farbcode
edit 3 die zweiten 2
usw.
KleinesProgramm Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 21



BeitragVerfasst: Mi 19.03.08 14:31 
ok dann kannste mir bitte folgendes beispiel schreiben:

wenn der pixel (X, Y) die farbe FFFFFF hat, dann .... pff, ka, male den pixel 000000 an....

ok bitte!
huuuuuh
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 665
Erhaltene Danke: 19

win xp, (win vista), win 7
VS 2008 Express Edition, VS 2010 Express Edition, VS 2010 Professionell
BeitragVerfasst: Mi 19.03.08 14:34 
KleinesProgramm Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 21



BeitragVerfasst: Fr 21.03.08 18:57 
da steht aber nicht wie ich die RPG Farbe eines pixels (x, y) feststellen kann, sondern nur wie ich selber mit canvas verschiedene farben zeichnen kann...
huuuuuh
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 665
Erhaltene Danke: 19

win xp, (win vista), win 7
VS 2008 Express Edition, VS 2010 Express Edition, VS 2010 Professionell
BeitragVerfasst: Sa 22.03.08 07:46 
müsste mit canvas.pixels[x,y] gehen