Hallo, ich möchte eine Prozedur zum Erstellen eines Koordinatensystems im Image_Koord mit Hilfe von Canvas zeichnen.
Hierzu mein 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: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54:
| var i:integer; begin with Image_Koord.canvas do For i:=1 to 20 do begin Pen.Color := clMedGray; Pen.Width :=1; moveto(50+i*25,0); lineto(50+i*25,300); end;
with Image_Koord.canvas do For i:=0 to 11 do begin moveto(50,10+i*20); lineto(500,10+i*20); end;
with Image_Koord.canvas do For i:=13 to 15 do begin moveto(50,10+i*20); lineto(500,10+i*20); end;
with Image_Koord.canvas do begin Pen.Width :=3; Pen.Color := clBlack; moveto(40,250); lineto(500,250); moveto(50,0); lineto(50,300); For i:=0 to 25 do begin moveto(50+i*50,247); lineto(50+i*50,253); moveto(47,10+i*20); lineto(53,10+i*20); end;
For i:=1 to 25 do begin Textout(40+i*50,252,inttostr(i*50)); end;
For i:=20 downto 1 do begin Textout(20,245-i*20,inttostr(i*20)); Textout(20,245,inttostr(0)); end; end; end; |
Momentan wird es noch Formcreate erstellt.
Nun habe ich eine Prozdedur "ZeichneKoordinatensystem" mit genau dem gleichen Quelltext unter dem Implementation-Teil erstellt. Nun plötzlich kann er mit dem
Image_Koord (im Quelltext markiert) nichts mehr anfangen und sagt "Undefinierter Bezeichner"
Meine Fragen:
1. Kann das damit zusammenhängen, dass ich im Implementationteil schon eine Komonente zugreifen will, die er noch nicht "kennt"?
2. Was kann ich anders machen, damit er das Image_Koord erkennt?
3. Bitte nicht über meinen Quelltext aufregen, der ist etwas lang und umständlich, aber mit meinen Kenntnissen hinzubekommen...
Vielen Danl für eine schnelle Antwort.
cs