#13 thickLineRGBA unexpected result

v1.0 (example)
closed-fixed
nobody
None
5
2013-10-27
2012-12-24
Anonymous
No

Hello,
I am sorry, but I can't find the version of gfx. I instated it today on the default deposit of fedora 17.

I think that this is a bug :
When I swap the coordinate of x1,y1 with x2,y2 in parameters of thickLineRGBA, I don't get the same result.

Here is a test that show my point :

void test(){
SDL_Init( SDL_INIT_VIDEO );
SDL_Surface* screen = SDL_SetVideoMode( 400,400, 32,
SDL_HWSURFACE | SDL_DOUBLEBUF );
thickLineRGBA(screen,
80,80,
0,0,
2, 255,255,255,255);
thickLineRGBA(screen,
0,0,
80,80,
2,255,255,255,255);
SDL_Flip(screen);
while(1);
SDL_Quit();
}

As you can see I the attachment, I get tow different lines.

Discussion


  • Anonymous
    2012-12-24

    I expected the tow line to be the same

     
    Attachments
  • ferzkopp
    ferzkopp
    2013-10-27

    No repro.

    Test sources t.c:
    #include "SDL.h"
    #include "SDL_gfxPrimitives.h"
    void main(){
    int i = 0;
    SDL_Init( SDL_INIT_VIDEO );
    SDL_Surface* screen = SDL_SetVideoMode( 400,400, 32,
    SDL_HWSURFACE | SDL_DOUBLEBUF );
    while(i<10) {
    i++;
    thickLineRGBA(screen,
    80,80,
    0,0,
    2, 255,0,255,255);
    SDL_Flip(screen);
    SDL_Delay(500);
    thickLineRGBA(screen,
    0,0,
    80,80,
    2,0,255,255,255);
    SDL_Flip(screen);
    SDL_Delay(500);
    }
    SDL_Quit();
    }

    Compiled with:
    ~/Sources/sdlgfx/Test$ gcc -I/usr/local/include/SDL -o t t. -Wl,-rpath -Wl,/usr/local/lib -L/usr/local/lib /usr/local/lib/libSDL_gfx.so /usr/local/lib/libSDL.so -lm -ldl -lpthread

     
    Last edit: ferzkopp 2013-10-27
  • ferzkopp
    ferzkopp
    2013-10-27

    • status: open --> closed-fixed
    • Group: --> v1.0 (example)