Page 1 of 1

Shadow not showing

Posted: Thu Jan 24, 2008 2:34 am
by 10546824
Probably a simple answer that I cannot figure out. I cannot get the shadow to appear in an Imageshape. Everything works fine but no shadow. Code as follows:

procedure AddShape1 (Bitmap1 : TBitmap , TreeX,TreeY : integer);
var
V : TImageShape;
begin
With Tree1 do
begin
V:= TImageShape.Create(Tree1);
v.AutoPosition.Left:= false;
v.AutoPosition.Top:= false;
AddNewShape(V,TreeX,TreeY,'',nil);
V.AutoSize:= false;

V.Width:= Bitmap1.Width;
V.Height:= Bitmap1.Height;

V.Image.Assign(bit);
V.Image.Transparent:= true;

V.Shadow.Color:= clBlack;
V.Shadow.Size:= 10;
V.Shadow.Visible:= true;

end;

Posted: Thu Feb 14, 2008 9:24 pm
by Tom
Default a TImageShape Transparent property is set to true. If the Transparent property is True, no shadow is drawn.

In your code you need to set the Transparent property to False, as in:

Code: Select all

V.Transparent := False