Autor Beitrag
bogus2k
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 25



BeitragVerfasst: Sa 13.03.04 21:00 
wie kann ich auf eine leere timage datei malen? ich moechte einzelne pixel dadrauf erstellen es wird aber nichts angezeigt, muss man die timage datei vorher irgend wie initialisieren oder was einstellen?
FatalError
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 64

WIN ME
D6 Pers
BeitragVerfasst: Sa 13.03.04 22:07 
Hi,

so kannst du eine ganze Fläche einfärben:

Zitat:
var spa,zei: integer;
begin
for spa:= 1 to 20 do
for zei:= 1 to 20 do
image1.Canvas.Pixels[spa,zei]:= RGB(200,200,3)


einzelne Pixel fäben geht natürlich auch, musst nur für spa bzw. zei konkrete Werte einsetzen.

Grüße
Andy :wink:
bogus2k Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 25



BeitragVerfasst: Sa 13.03.04 22:23 
genau das mach ich ja aber es wird nichts angezeigt nur ein ganz weisses bild,
muss ich irgend was einstellen? eine neues bild erstellen oder so?
oder wo dran kann das liegen?
FatalError
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 64

WIN ME
D6 Pers
BeitragVerfasst: Sa 13.03.04 22:43 
Hi,

du kannst das image auf Transparent setzen:

ausblenden Delphi-Quelltext
1:
image1.Transparent:= true;					


Damit werden alle Pixel, die die Farbe des unteren linken haben(also weiß,(=RGB(0,0,0)) wenn image "leer" ist) durchsichtig gemacht.

Wenn die eingestellte Farbe der gezeichneten Linie nicht identisch ist mit der Hintergrundfarbe deiner Form, sollte eigentlich was zu sehen sein? :? Ansonsten einfach nochmal fragen;-)

Grüße
Andy :wink:
bogus2k Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 25



BeitragVerfasst: So 14.03.04 10:11 
ich hab mein programm zu erst auf ein bevel malen lassen und das ging ohne probleme
nur jetzt wo es auf ein timage malen soll geht es nicht mehr,
es wird halt nur ganz weiss angezeigt obwohl ich es transparent habe.
ich benutzt den befehl
ausblenden Quelltext
1:
map.Canvas.pixels[map.Left-1+(Karte[i2].xCoord * 2),map.Top-1+(Karte[i2].yCoord * 2)]:=color;					

wobei map das timage ist und karte ein array in dem die position enthalten ist und in color ist die farbe.
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: So 14.03.04 10:54 
Nimm doch Folgendes:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
  Rect.Left := 0;
  Rect.Top := 0;
  Rect.Right := Image1.Width;
  Rect.Bottom := Image1.Height;

  Image1.Canvas.Brush.Color := clBlue;
  Image1.Canvas.FillRect(Rect);

wobei Rect eine Variable vom Typ TRect ist.

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
bogus2k Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 25



BeitragVerfasst: So 14.03.04 11:15 
es sieht bei mir alles ziemlich gekachelt aus, ist das normal oder hab ich jetzt was mit den koordinaten falsch gemacht?
auf jedenfall vielen danke hat mir sehr geholfen