On Thu, Jan 16, 2003 at 12:42:27PM +0100, Olivier Bornet wrote:
...
> 
> So, my patch seem OK for me. ;-)
> Because the bw and bh is the coordinates of the _source_ rectangle. And
> it is unrotated. If you compare the following rotating action:
> 
>     VID(rotateblit) (r->output,n->r.x,n->r.y,
>                      bit,clipsrc.x,clipsrc.y,clipsrc.w,clipsrc.h,
>                      &r->clip,r->angle,r->lgop);
> 
> clipsrc is used on the _source_ rectangle. Here is a sample: we have a
> source bitmap of 100x50 pixels. You want to rotated it to 90. Without my
> patch, you will have:
>     - bw = 50
>     - bh = 100
> After that, you have the checks:
>     if (clipsrc.x < 0) clipsrc.x = 0;
>     if (clipsrc.y < 0) clipsrc.y = 0;
>     if (clipsrc.w > (bw - clipsrc.x)) clipsrc.w = bw - clipsrc.x;
>     if (clipsrc.h > (bh - clipsrc.y)) clipsrc.h = bh - clipsrc.y;
> This will result of :
>     - clipsrc.x = 0
>     - clipsrc.x = 0
>     - clipsrc.w = 50  (because bw was set to 50)
>     - clipsrc.h = 50  (because clipsrc.h is 50)
> 
> So, the rotation is done correctly after that, but with only the first
> part of the source bitmap copyed (and an empty space just after it).
> 
> Am I right ?

Ah, you're right!
Sorry, I must have been too asleep last night to realize that was clipping
the source rectangle, not the destination rectangle.

> 
>               Olivier
> -- 
> Olivier Bornet                      http://www.smartdata.ch/
> [EMAIL PROTECTED]         SMARTDATA SA
> Phone: +41-27-723'55'03             Rue du Coll?ge 5A
> GPG key ID: C53D9218                CH-1920 Martigny



-- 
Only you can prevent creeping featurism!


-------------------------------------------------------
This SF.NET email is sponsored by: Thawte.com
Understand how to protect your customers personal information by implementing
SSL on your Apache Web Server. Click here to get our FREE Thawte Apache 
Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
_______________________________________________
Pgui-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/pgui-devel

Reply via email to