ginsonic
asked on
TPicture : Where is wrong ?
Hi to all .
I have 3 TPicture objects and a Canvas .
Pic1 - store a jpeg file
Pic2 - store a jpeg file
and Pic3 - store a black bitmap :
Pic3.Bitmap.Canvas.Brush.C olor:=clBl ack;
Pic3.Bitmap.Canvas.FillRec t(RECT(0,0 ,200,200)) ;
For the case :
Canvas.Draw(0,0,Pic1.Graph ic);
I can see in canvas Pic 1 .
For the case :
Pic1.Assign(Pic2);
Canvas.Draw(0,0,Pic1.Graph ic);
I can see in canvas Pic 2 .
But for :
Pic1.Assign(Pic3);
Canvas.Draw(0,0,Pic1.Graph ic);
I can't see anything . In normal case I must see a black square .
Where I wrong ?
I have 3 TPicture objects and a Canvas .
Pic1 - store a jpeg file
Pic2 - store a jpeg file
and Pic3 - store a black bitmap :
Pic3.Bitmap.Canvas.Brush.C
Pic3.Bitmap.Canvas.FillRec
For the case :
Canvas.Draw(0,0,Pic1.Graph
I can see in canvas Pic 1 .
For the case :
Pic1.Assign(Pic2);
Canvas.Draw(0,0,Pic1.Graph
I can see in canvas Pic 2 .
But for :
Pic1.Assign(Pic3);
Canvas.Draw(0,0,Pic1.Graph
I can't see anything . In normal case I must see a black square .
Where I wrong ?
Yes, it's importent to set the width and height of bitmaps created in runtime.
/Probie
/Probie
ASKER
What stupid I am :P
Kretzschmar thanks for help .
Put an answer please.
Kretzschmar thanks for help .
Put an answer please.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
maybe you must the picture first tell the width and height of the bitmap like
Pic3.Bitmap.Width := 200;
Pic3.Bitmap.Height := 200;
Pic3.Bitmap.Canvas.Brush.C
Pic3.Bitmap.Canvas.FillRec
meikl