SDL frage
-
Hi,
ich hab ne Frage zur SDL_Surface.
Ich lade ne SDL_Surface mit SDL_LoadBMP(); kein problem, nun, wie komm ich an die Abmessungen der BMP? also width und height?
-
Schau dir doch mal die ManPage von SDL_Rect an - vielleicht hilft dir das !?
-
und wie komm ich damit an die höhe und breite der Bitmap die ich geladen habe?
Also sorry, ich find irgendwie keinen ansatz
-
Darf ich mal nach ein wenig Quelltext fragen, bzw. wozu du das brauchst ? Ich könnte dir bis jetzt höchstens noch nen Link geben, der dich zu SDL-Documentation führt
-> SDLDoc
-
bin mir nicht sicher, habe noch nie mit sdl bitmaps geladen.
aber könnte es nicht w und h sein ??typedef struct SDL_Surface { Uint32 flags; /* Read-only */ SDL_PixelFormat *format; /* Read-only */ int w, h; /* Read-only */ Uint16 pitch; /* Read-only */ void *pixels; /* Read-write */ /* clipping information */ SDL_Rect clip_rect; /* Read-only */ /* Reference count -- used when freeing surface */ int refcount; /* Read-mostly */ /* This structure also contains private fields not shown here */ } SDL_Surface;