delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/22/12:07:53

Message-Id: <335CDC42.19EC@canvaslink.com>
Date: Tue, 22 Apr 1997 11:41:54 -0400
From: Tom Grandgent <tgrand AT canvaslink DOT com>
Reply-To: tgrand AT canvaslink DOT com
Organization: Canvas Link, Inc.
Mime-Version: 1.0
To: ragingfish AT hotmail DOT com
Cc: djgpp AT delorie DOT com
Subject: Re: Allegro's rotate_sprite()

> I've had a great deal of trouble getting Allegro's rotate_sprite to
> rotate anything without clipping off its right and bottom edges.  
> I've searched through the newsgroup archives & found a few other
> people with this problem, but no solutions.  Anyone have an idea on
> how to get rotate_sprite to cooperate?

Actually, rotate_sprite() is doing exactly what it should.  It's not
supposed to scale a bitmap down if the rotated version of it does not
fit in the target bitmap's clipping window..  You should either
increase the dimensions of your target bitmap (tbtcopy) or scale
down your source bitmap (tenbyten) before calling rotate_sprite().

>       tenbyten=create_bitmap(10,10);
>       tbtcopy=create_bitmap(10,10);

When you rotate the image around its center point, won't it
have to go outside the 10x10 target bitmap area?

I'm not sure if I'm right in understanding your situation..  I
would try out your program, but I'm at work and don't have
DJGPP and Allegro here.

Well anyway, good luck!  rotate_sprite() has been one of the most
valuable parts of Allegro for me....

	Tom Grandgent
	tgrand AT canvaslink DOT com
	Canvas Link, Inc.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019