[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/draw drawline.cpp,1.1.1.1,1.2 drawtile.cp
From: |
Alexander Pipelka <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/draw drawline.cpp,1.1.1.1,1.2 drawtile.cpp,1.1.1.1,1.2 gradient.cpp,1.1.1.1,1.2 pgrect.cpp,1.1.1.1,1.2 rotozoom.cpp,1.1.1.1,1.2 setpixel.cpp,1.1.1.1,1.2 stretch.cpp,1.1.1.1,1.2 surface.cpp,1.1.1.1,1.2 |
Date: |
Mon, 15 Apr 2002 09:31:34 -0400 |
Update of /cvsroot/paragui/paragui/src/draw
In directory subversions:/tmp/cvs-serv21582/src/draw
Modified Files:
drawline.cpp drawtile.cpp gradient.cpp pgrect.cpp rotozoom.cpp
setpixel.cpp stretch.cpp surface.cpp
Log Message:
imported version 1.0.1
Index: drawline.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/drawline.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
Index: drawtile.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/drawtile.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
Index: gradient.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/gradient.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** gradient.cpp 15 Apr 2002 13:22:10 -0000 1.1.1.1
--- gradient.cpp 15 Apr 2002 13:31:30 -0000 1.2
***************
*** 164,171 ****
for (register Sint32 y = 0; y < drawrect.h; y++) {
! pixel = (r>>Rloss) << Rshift
! | (g>>Gloss) << Gshift
! | (b>>Bloss) << Bshift;
! //| Amask;
/* Set the pixel */
--- 164,174 ----
for (register Sint32 y = 0; y < drawrect.h; y++) {
! if ( bpp == 1 )
! pixel = SDL_MapRGB ( surface->format, r>>8,
g>>8, b>>8 );
! else
! pixel = (r>>Rloss) << Rshift
! | (g>>Gloss) << Gshift
! | (b>>Bloss) << Bshift;
! //| Amask;
/* Set the pixel */
Index: pgrect.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/pgrect.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
Index: rotozoom.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/rotozoom.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
Index: setpixel.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/setpixel.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
Index: stretch.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/stretch.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
Index: surface.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/surface.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** surface.cpp 15 Apr 2002 13:22:10 -0000 1.1.1.1
--- surface.cpp 15 Apr 2002 13:31:31 -0000 1.2
***************
*** 49,53 ****
static PG_Rect dstrect;
int x,y,i;
!
// check if we have anything to do
if(!gradient && !background) {
--- 49,56 ----
static PG_Rect dstrect;
int x,y,i;
! bool bColorKey = false;
! Uint32 uColorKey;
! Uint32 c;
!
// check if we have anything to do
if(!gradient && !background) {
***************
*** 55,60 ****
}
! if (!r.h || !r.w)
! return;
// draw the gradient first
--- 58,63 ----
}
! if (!r.h || !r.w)
! return;
// draw the gradient first
***************
*** 68,72 ****
return;
! if (!background->w || !background->h)
return;
--- 71,75 ----
return;
! if (!background->w || !background->h)
return;
***************
*** 76,79 ****
--- 79,92 ----
int w,h;
+ bColorKey = (background->flags & SDL_SRCCOLORKEY);
+ Uint8 rc,gc,bc;
+
+ SDL_GetRGB(background->format->colorkey, background->format, &rc, &gc,
&bc);
+ uColorKey = (rc << 16) | (gc << 8) | bc;
+
+ if(((gradient == NULL) || (blend == 0)) && bColorKey) {
+ SDL_SetColorKey(background, 0, 0);
+ }
+
switch(bkmode) {
***************
*** 277,280 ****
--- 290,309 ----
break;
+ }
+
+ if(((gradient == NULL) || (blend == 0)) && bColorKey) {
+ c = SDL_MapRGB(
+ background->format,
+ (uColorKey>>16) & 0xFF,
+ (uColorKey>>8) & 0xFF,
+ uColorKey & 0xFF);
+ SDL_SetColorKey(background, SDL_SRCCOLORKEY, c);
+
+ c = SDL_MapRGB(
+ surface->format,
+ (uColorKey>>16) & 0xFF,
+ (uColorKey>>8) & 0xFF,
+ uColorKey & 0xFF);
+ SDL_SetColorKey(surface, SDL_SRCCOLORKEY, c);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/draw drawline.cpp,1.1.1.1,1.2 drawtile.cpp,1.1.1.1,1.2 gradient.cpp,1.1.1.1,1.2 pgrect.cpp,1.1.1.1,1.2 rotozoom.cpp,1.1.1.1,1.2 setpixel.cpp,1.1.1.1,1.2 stretch.cpp,1.1.1.1,1.2 surface.cpp,1.1.1.1,1.2,
Alexander Pipelka <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui/src/themes Makefile.am,1.1.1.1,1.2 theme_priv.cpp,1.1.1.1,1.2 theme_priv.h,1.1.1.1,1.2 themeloader.cpp,1.1.1.1,1.2
- Next by Date:
[paragui-cvs] CVS: paragui/bin make_colors.pike,1.1.1.1,1.2
- Previous by thread:
[paragui-cvs] CVS: paragui/src/themes Makefile.am,1.1.1.1,1.2 theme_priv.cpp,1.1.1.1,1.2 theme_priv.h,1.1.1.1,1.2 themeloader.cpp,1.1.1.1,1.2
- Next by thread:
[paragui-cvs] CVS: paragui/bin make_colors.pike,1.1.1.1,1.2
- Index(es):