Re: [Pgui-devel] Bitmap rotation

2003-01-17 Thread Olivier Bornet
Hello, > 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. No problem. I have now commited the change. Good night. ;-) Olivier -- Olivier Bornet http://www.s

Re: [Pgui-devel] Bitmap rotation

2003-01-16 Thread Micah Dowty
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, >

Re: [Pgui-devel] Bitmap rotation

2003-01-16 Thread Olivier Bornet
Hi Micah, > There's a good example of this in action in the pgserver code for rotating > bitmaps when entering and leaving a rotated mode. The syntax is different > since it doesn't go through the gropnode layer, but semantically it's > the same. On line 518 of video/video_drivers.c, the bitmap_r

Re: [Pgui-devel] Bitmap rotation

2003-01-16 Thread Micah Dowty
Assuming this is the only problem, it's a bug- the bitmaps and canvas widget should render the same. If you have an example case demonstrating the bug, send it. Otherwise I'll take a look at this soon. On Wed, Jan 15, 2003 at 02:51:25PM +0100, Olivier Bornet wrote: > Hello again, > > another ques

Re: [Pgui-devel] Bitmap rotation

2003-01-16 Thread Micah Dowty
On Wed, Jan 15, 2003 at 02:07:09PM +0100, Olivier Bornet wrote: > Hello, > > > In our app, we want to turn an image from 90 or 270 degres. > > To achieve this we thought about displaying the bitmap in a canvas and > > using the PG_GROP_ROTATEBITMAP parameter with something like : > > After some t

Re: [Pgui-devel] Bitmap rotation

2003-01-15 Thread Olivier Bornet
Hello again, another question is : can we use a bitmap instead of a canvas. This mean, instead of: > pgWriteCmd (canvas, > PGCANVAS_GROP, 6, > PG_GROP_ROTATEBITMAP, 0, w, h, w, image); can I use: pgRender (bitmap, PGCANVAS_GROP, 6,

Re: [Pgui-devel] Bitmap rotation

2003-01-15 Thread Olivier Bornet
Hello, > In our app, we want to turn an image from 90 or 270 degres. > To achieve this we thought about displaying the bitmap in a canvas and > using the PG_GROP_ROTATEBITMAP parameter with something like : After some tests, I have found the solution. This require 3 calls to pgWriteCmd (). Here a