OS4 DepotLogo by Nickman 
(anonymous IP: 174.129.92.127) 
 HomeRecentStatsSearchSubmitUploadsMirrorsContactInfoDisclaimerConfigAdmin
 Menu

 Features
   Crashlogs
   Bug tracker
   Locale browser
 
 Categories

   o Audio (321)
   o Datatype (47)
   o Demo (176)
   o Development (487)
      o Cross (35)
      o Debug (8)
      o Edit (5)
      o Example (31)
      o Game (19)
      o Guitool (5)
      o Ide (6)
      o Install (0)
      o Language (34)
      o Library (243)
         o Audio (54)
         o Graphics (63)
         o Gui (6)
         o Math (8)
         o Misc (103)
         o Toolkit (8)
      o Misc (26)
      o Utility (75)
      o Webtool (0)
   o Document (19)
   o Driver (82)
   o Emulation (131)
   o Game (786)
   o Graphics (422)
   o Library (73)
   o Network (185)
   o Office (49)
   o Utility (733)
   o Video (56)

Total files: 3567

Full index file. Download
Recent index file. Download




 Links

  Amigans.net
  OpenAmiga
  Aminet
  UtilityBase
  IntuitionBase
  AmigaBounty


Support the site


 Readme for:  Development » Library » Graphics » libsdl_draw.lha

Libsdl_draw

Description: Simple SDL library to draw basic elements
Download: libsdl_draw.lha       (TIPS: Use the right click menu if your browser takes you back here all the time)
Size: 421kb
Version: 1.2.11
Date: 07 Oct 06
Author: M. Palomo Torrero, J. M. de la Huerga Fern├índez, P. Gonz├ílez Mora, AOS compile by Spot
Submitter: Spot / Up Rough
Email: spot/triad se
Homepage: http://sdl-draw.sourceforge.net/
Requirements: SDL
Category: development/library/graphics
License: GPL
Distribute: yes
Min OS Version: 4.0
FileID: 2148
 
Comments: 0  [View]
Snapshots: 0  [View]
Downloads: 200  (Current version)
200  (Accumulated)

Show content Show crashlogs Replace file 
SDL_draw 1.2.1 - AmigaOS 4.0 - newlib + clib2 version.

Installing the Amiga version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Copy the contents of SDK/ to SDK:

.. Spot / Up Rough 2006




SDL_draw 1.2.1
~~~~~~~~~~~~~~
The latest version of this library is available from:
http://sdl-draw.sourceforge.net/

This is a simple library to draw basic elements, like points, lines and
circles, on SDL surfaces.

Library API
~~~~~~~~~~~
#include "SDL_draw.h"

//IMPORTANT: Call this function AFTER the call to 'SDL_SetVideoMode':
Draw_Init(); //Register the functions for current bpp 


void Draw_Pixel(SDL_Surface *super,
                Sint16 x, Sint16 y, Uint32 color);

  Draw a colored pixel on coordinates x,y.


void Draw_Line(SDL_Surface *super,
               Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2,
               Uint32 color);

  Draw a line from x1,y1 to x2,y2.


void Draw_Circle(SDL_Surface *super,
                 Sint16 x0, Sint16 y0, Uint16 r,
                 Uint32 color);
                                        
  Draw a circle with center x0,y0 and radius r.


void Draw_FillCircle(SDL_Surface *super,
                     Sint16 x0, Sint16 y0, Uint16 r,
                     Uint32 color);
                     
  Draw a filled circle with center x0,y0 and radius r.


void Draw_HLine(SDL_Surface *super,
                Sint16 x0,Sint16 y0, Sint16 x1,
                Uint32 color);

  Draw a horizontal line from x0,y0 to x1,y0.


void Draw_VLine(SDL_Surface *super,
                Sint16 x0,Sint16 y0, Sint16 y1,
                Uint32 color);

  Draw a vertical line from x0,y0 to x0,y1.


void Draw_Rect(SDL_Surface *super,
               Sint16 x,Sint16 y, Uint16 w,Uint16 h,
               Uint32 color);

  Draw a rectangle with upper left corner in x,y being w the width and h the
  height.


void Draw_FillRect(SDL_Surface *super,
                   Sint16 x,Sint16 y, Uint16 w,Uint16 h,
                   Uint32 color);

  The same as above but the rectangle is filled. This function is equivalent 
  to SDL_FillRect (is a MACRO).


void Draw_Ellipse(SDL_Surface *super,
                  Sint16 x0, Sint16 y0,
                  Uint16 Xradius, Uint16 Yradius,
                  Uint32 color);

  Draw a ellipse with center in x0,y0. Xradius is the major axis and Yradius is
  the minor axis.
                  

void Draw_FillEllipse(SDL_Surface *super,
                      Sint16 x0, Sint16 y0,
                      Uint16 Xradius, Uint16 Yradius,
                      Uint32 color);

  Draw a filled ellipse (same parameters as the above function).


void Draw_Round(SDL_Surface *super,
                Sint16 x0,Sint16 y0, Uint16 w,Uint16 h,
                Uint16 corner, Uint32 color);

  Draw a rectangle with rounded corners. x0,y0 is the upper left corner of the
  rectangle, w is the width and h is the height. corner is the radius of the
  corner.


void Draw_Round(SDL_Surface *super,
                Sint16 x0,Sint16 y0, Uint16 w,Uint16 h,
                Uint16 corner, Uint32 color);
  
  The same as above but the rounded rectangle is filled.


The file sdldrawtest.c is a example application for the library. You can
compile it using (for GNU Compiler):

$ export CFLAGS="`sdl-config --cflags` -I./include"
$ export LIBS="`sdl-config --libs` ./src/.libs/libSDL_draw.a"
$ gcc -o sdldrawtest sdldrawtest.c -Wall $CFLAGS $LIBS

This library is under the GNU Library General Public License, see the file
"COPYING" for details.








File Version Size Date OS Dls Readme
libsdl_anim.lha0.5.0709kb25 Oct 064.0190¤ Libsdl_anim - libSDL_anim displays anim files
libsdl_image.lha1.2.12987kb29 Sep 144.035¤ libsdl_image - SDL image file loading library
libsdl_rtf.lha0.1.0571kb15 Oct 064.0182¤ Libsdl_rtf - Display simple RTF files
libsdl_ttf.lha2.0.111Mb06 Feb 144.048¤ Libsdl_ttf - A Freetype 2.0 wrapper for SDL.
Copyright (c) 2004-2014 by Björn Hagström All Rights Reserved
Amiga OS and its logos are registered trademarks of Hyperion Entertainment