PDA

View Full Version : TImageSprite and rotation



hammer
14-03-2004, 11:06 AM
i was wondering is there a way to rotate an image befora loading it in the TImageSprite.image ????

peterbone
30-03-2004, 12:03 PM
rotate a TBitmap like this
http://delphi.about.com/cs/adptips2001/a/bltip1201_4.htm
Where's this TImageSprite you speak of? What does it do?

cairnswm
30-03-2004, 12:47 PM
Also look at TImageSpriteEx

davidluo188
01-04-2004, 09:26 AM
i think TImageSpriteEx's collision detect can't support pixelCheck.

function TImageSpriteEx.TestCollision(Sprite: TSprite): Boolean;
begin
if Sprite is TImageSpriteEx then
begin
Result := OverlapRect(Bounds(Trunc(Sprite.WorldX), Trunc(Sprite.WorldY), Sprite.Width, Sprite.Height),
Bounds(Trunc(WorldX), Trunc(WorldY), Width, Height));
end else
begin
Result := OverlapRect(Sprite.BoundsRect, Bounds(Trunc(WorldX), Trunc(WorldY), Width, Height));
end;
end;