Docs typo ?!?

the following string in the docs confused me…

surface->format->palette->colors

from /SDL-1.2.7/docs/html/sdlpixelformat.html

the surface struct does not appear to have a format member. (as per docs)
shouldn’t it say surface->palette->colors ???

aj.

According to “docs/html/sdlsurface.html” and “include/SDL_video.h”,
SDL_Surface has a format member

Probably you mixed up SDL_Surface with SDL_PixelFormat at the given html page.

Regards,
Johannes

< http://libufo.sourceforge.net > The OpenGL GUI ToolkitOn Saturday 27 November 2004 12:46, aj wrote:

the following string in the docs confused me…

surface->format->palette->colors

from /SDL-1.2.7/docs/html/sdlpixelformat.html

the surface struct does not appear to have a format member. (as per docs)
shouldn’t it say surface->palette->colors ???

At 11:22 PM 27/11/2004, you wrote:

the following string in the docs confused me…

surface->format->palette->colors

from /SDL-1.2.7/docs/html/sdlpixelformat.html

the surface struct does not appear to have a format member. (as per docs)
shouldn’t it say surface->palette->colors ???

According to “docs/html/sdlsurface.html” and “include/SDL_video.h”,
SDL_Surface has a format member

yes, it has a format member, but the docs for the page i mentioned show the
struct with out the format member var, and then on the same page make
reference to it. that document alone is misleading.>On Saturday 27 November 2004 12:46, aj wrote:

Probably you mixed up SDL_Surface with SDL_PixelFormat at the given html page.

Regards,
Johannes

Here you go:

an SDL_Surface contains a member SDL_PixelFormat variable. This is what
you are seeing. Everywhere you’re seeing “surface->format->…” it’s
actually this structure: “SDL_Surface->SDL_PixelFormat->…” I can see
where your confusion comes in.

And the page you referenced –
"/SDL-1.2.7/docs/html/sdlpixelformat.html" is the doc page for
SDL_PixelFormat, NOT for SDL_Surface.

Compare the Wiki:
http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fPixelFormat
vs.
http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fSurface

Hope that helps clarify things.
–Scott

aj wrote:> At 11:22 PM 27/11/2004, you wrote:

On Saturday 27 November 2004 12:46, aj wrote:

the following string in the docs confused me…

surface->format->palette->colors

from /SDL-1.2.7/docs/html/sdlpixelformat.html

the surface struct does not appear to have a format member. (as
per docs)
shouldn’t it say surface->palette->colors ???

According to “docs/html/sdlsurface.html” and “include/SDL_video.h”,
SDL_Surface has a format member

yes, it has a format member, but the docs for the page i mentioned show
the struct with out the format member var, and then on the same page
make reference to it. that document alone is misleading.

Probably you mixed up SDL_Surface with SDL_PixelFormat at the given
html page.

Regards,
Johannes


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl