[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/draw gradient.cpp,1.3,1.4 rotozoom.cpp,1.
From: |
Alexander Pipelka <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/draw gradient.cpp,1.3,1.4 rotozoom.cpp,1.3,1.4 stretch.cpp,1.3,1.4 surface.cpp,1.3,1.4 |
Date: |
Sun, 18 Aug 2002 04:12:55 -0400 |
Update of /cvsroot/paragui/paragui/src/draw
In directory subversions:/tmp/cvs-serv12482/src/draw
Modified Files:
gradient.cpp rotozoom.cpp stretch.cpp surface.cpp
Log Message:
synced with the devel-1-0-x tree.
Index: gradient.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/gradient.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** gradient.cpp 15 Apr 2002 13:35:35 -0000 1.3
--- gradient.cpp 18 Aug 2002 08:12:52 -0000 1.4
***************
*** 29,36 ****
*/
#include <cmath>
#include <cassert>
- #include "pgdraw.h"
SDL_Surface* PG_Draw::CreateGradient(const PG_Rect& r, PG_Gradient& gradient)
{
return CreateGradient(
--- 29,37 ----
*/
+ #include "pgdraw.h"
+
#include <cmath>
#include <cassert>
SDL_Surface* PG_Draw::CreateGradient(const PG_Rect& r, PG_Gradient& gradient)
{
return CreateGradient(
***************
*** 104,107 ****
--- 105,112 ----
int oy = drawrect.y - rect.y;
+ if(SDL_MUSTLOCK(surface)) {
+ SDL_LockSurface(surface);
+ }
+
// color space vectors
v00 = ((ur.r - ul.r) * 256) / w;
***************
*** 164,168 ****
for (register Sint32 y = 0; y < drawrect.h; y++) {
! if ( bpp == 1 )
pixel = SDL_MapRGB ( surface->format, r>>8,
g>>8, b>>8 );
else
--- 169,173 ----
for (register Sint32 y = 0; y < drawrect.h; y++) {
! /* if ( bpp == 1 )
pixel = SDL_MapRGB ( surface->format, r>>8,
g>>8, b>>8 );
else
***************
*** 171,186 ****
| (b>>Bloss) << Bshift;
//| Amask;
/* Set the pixel */
switch (bpp) {
case 1:
*((Uint8 *) (bits)) = (Uint8) pixel;
break;
case 2:
*((Uint16 *) (bits)) = (Uint16) pixel;
break;
! case 3: { /*
Format/endian independent */
Uint8 ri = (pixel >>
surface->format->Rshift) & 0xFF;
Uint8 gi = (pixel >>
surface->format->Gshift) & 0xFF;
--- 176,201 ----
| (b>>Bloss) << Bshift;
//| Amask;
+ */
/* Set the pixel */
switch (bpp) {
case 1:
+ pixel = SDL_MapRGB ( surface->format,
r>>8, g>>8, b>>8 );
*((Uint8 *) (bits)) = (Uint8) pixel;
break;
case 2:
+ pixel = (r>>Rloss) << Rshift
+ | (g>>Gloss) <<
Gshift
+ | (b>>Bloss) <<
Bshift;
+
*((Uint16 *) (bits)) = (Uint16) pixel;
break;
! case 3: {
! pixel = (r>>Rloss) << Rshift
! | (g>>Gloss)
<< Gshift
! | (b>>Bloss)
<< Bshift;
!
Uint8 ri = (pixel >>
surface->format->Rshift) & 0xFF;
Uint8 gi = (pixel >>
surface->format->Gshift) & 0xFF;
***************
*** 193,196 ****
--- 208,215 ----
case 4:
+ pixel = (r>>Rloss) << Rshift
+ | (g>>Gloss) <<
Gshift
+ | (b>>Bloss) <<
Bshift;
+
*((Uint32 *) (bits)) = (Uint32) pixel;
break;
***************
*** 215,217 ****
--- 234,239 ----
}
+ if(SDL_MUSTLOCK(surface)) {
+ SDL_UnlockSurface(surface);
+ }
}
Index: rotozoom.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/rotozoom.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** rotozoom.cpp 15 Apr 2002 13:35:35 -0000 1.3
--- rotozoom.cpp 18 Aug 2002 08:12:52 -0000 1.4
***************
*** 29,38 ****
*/
#include <cstdlib>
#include <cstring>
#include <cmath>
-
- #include "paragui.h"
- #include "pgdraw.h"
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
--- 29,38 ----
*/
+ #include "paragui.h"
+ #include "pgdraw.h"
+
#include <cstdlib>
#include <cstring>
#include <cmath>
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
Index: stretch.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/stretch.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** stretch.cpp 15 Apr 2002 13:35:35 -0000 1.3
--- stretch.cpp 18 Aug 2002 08:12:52 -0000 1.4
***************
*** 27,36 ****
*/
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
-
- #include "pgdraw.h"
#if ! defined( macintosh ) && ! defined( __MWERKS__ )
--- 27,36 ----
*/
+ #include "pgdraw.h"
+
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#if ! defined( macintosh ) && ! defined( __MWERKS__ )
Index: surface.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/surface.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** surface.cpp 15 Apr 2002 13:35:35 -0000 1.3
--- surface.cpp 18 Aug 2002 08:12:52 -0000 1.4
***************
*** 64,68 ****
--- 64,74 ----
if((background == NULL) || (background && (blend > 0))) {
if(gradient != NULL) {
+ if(SDL_MUSTLOCK(surface)) {
+ SDL_LockSurface(surface);
+ }
DrawGradient(surface, r, *gradient);
+ if(SDL_MUSTLOCK(surface)) {
+ SDL_UnlockSurface(surface);
+ }
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/draw gradient.cpp,1.3,1.4 rotozoom.cpp,1.3,1.4 stretch.cpp,1.3,1.4 surface.cpp,1.3,1.4,
Alexander Pipelka <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui/src/layout layoutparsers.cpp,1.4,1.5 pgxmllayoutloader.cpp,1.5,1.6
- Next by Date:
[paragui-cvs] CVS: paragui/src/physfs/test Makefile.am,1.2,1.3 test_physfs.c,1.2,1.3
- Previous by thread:
[paragui-cvs] CVS: paragui/src/layout layoutparsers.cpp,1.4,1.5 pgxmllayoutloader.cpp,1.5,1.6
- Next by thread:
[paragui-cvs] CVS: paragui/src/physfs/test Makefile.am,1.2,1.3 test_physfs.c,1.2,1.3
- Index(es):