hi
In SDL,there are functions to get a screen. I have a problem,when i display
vedio, how to specify the x,y coordinate of the screen?
X.C.
–http://www.eyou.com
–??? ??? ??? ??? ???..???
hi
In SDL,there are functions to get a screen. I have a problem,when i display
vedio, how to specify the x,y coordinate of the screen?
X.C.
–http://www.eyou.com
–??? ??? ??? ??? ???..???
xc wrote:
hi
In SDL,there are functions to get a screen. I have a problem, when i display
video, how to specify the x,y coordinate of the screen?
set the width and height of the screen using SDL_SetVideoMode.
after that all coordinates used by other functions are
relative to the top left of the created screen/window.
read the docs at sdldoc.sf.net for more information–
-==-
Jon Atkins
http://jcatki.2y.net/
If you want to blit a surface on a particular x,y position, use SDL_Rect in
your SDL_Blit Function.
Refers to examples in the SDL source tarball.
Jos.> ----- Original Message -----
From: sdlmail@eyou.com (xc)
Newsgroups: loki.open-source.sdl
To:
Sent: Wednesday, April 03, 2002 9:42 AM
Subject: [SDL] screen has x,y coordinate ?hi
In SDL,there are functions to get a screen. I have a problem,when i
display
vedio, how to specify the x,y coordinate of the screen?X.C.
–http://www.eyou.com
–??? ??? ??? ???
???..???
I think I read it wrong… sorry
hi
In SDL,there are functions to get a screen. I have a problem,when i display
vedio, how to specify the x,y coordinate of the screen?X.C.
SDL_Rect src, dest;
// where is the image in test
src.x = 32;
src.y = 32;
// how big is the image
dest.w = src.w = 32;
dest.w = src.h = 32;
// where do you want it
dest.y= 32;
dest.x = 32;
// draw the tile to the screen
SDL_BlitSuface(test, &src, screen, &dest);
----- Original Message -----
Subject: [SDL] screen has x,y coordinate ?