Re: [AD] docs suggestions.

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hi,

XML is a data storage standard. So it is possible to store data in the 
form as: (its worth considering this option to the ._tx format)

<function name="load_bitmap" section="10">
 <rettype>BITMAP *</rettype>
 BITMAP *load_bitmap(const char *filename, RGB *pal);
 <params>
  <param type="const char *">filename</param>
  <param type="RGB *">pal</param> 
 </params>
 <description lang="en" default="yes">
  Loads a bitmap from a file, returning a pointer to a bitmap and storing 
the palette data in the specified location, which should be an array of 
256 RGB structures. You are responsible for destroying the bitmap when you 
are finished with it. Returns NULL on error. At present this function 
supports BMP, LBM, PCX, and TGA files, determining the type from the file 
extension.

If the file contains a truecolor image, you must set the video mode or 
call set_color_conversion() before loading it. In this case, if the 
destination color depth is 8-bit, the palette will be generated by calling 
generate_optimized_palette() on the bitmap; otherwise, the returned 
palette will be generated by calling generate_332_palette().

The pal argument may be NULL. In this case, the palette data are simply 
not returned. Additionally, if the file is a truecolor image and the 
destination color depth is 8-bit, the color conversion process will use 
the current palette instead of generating an optimized one. 
 </description>
 <links>
  <link type="function" section="10">load_bmp</link>
  <link type="function" section="10">load_lbm</link>
  <link type="function" section="10">load_pcx</link>
  <link type="function" section="10">load_tga</link>
  <link type="function" section="9">destroy_bitmap</link>
  <link type="function" section="10">save_bitmap</link>
  <link type="function" section="10">register_bitmap_file_type</link>
  <link type="function" section="8">set_color_depth</link>
  <link type="function" section="10">set_color_conversion</link> 
  <link type="function" section="11">generate_optimized_palette</link>
  <link type="function" section="11">generate_332_palette</link>
  <link type="example">exaccel</link>
  <link type="example">exalpha</link>
  <link type="example">exbitmap</link>
  <link type="example">exblend</link>
  <link type="example">exconfig</link>
  <link type="example">exlights</link>
  <link type="example">exshade</link>
  <link type="example">extrans</link>
  <link type="example">exxfade</link>
 </links>
 </function>

and this is then converted into a HTML thru what is known as a XML 
stylesheet transform - XSLT... It is used to convert from data into the 
presentation layer :)

One of the sites that use this: 

http://www.robtougher.com/servlet/web.writing.show_article?article=version_2_technologies

More more info on XSLT and XPath, read http://www.w3schools.com/xsl/default.asp

On Thu, 6 May 2004, Grzegorz Adam Hankiewicz wrote:

> On 2004-05-06, Karthik Kumar V <f2001832@xxxxxxxxxx> wrote:
> > Hi,
> > 
> > I have a suggestion too.. Is it possible to make a XML + XSLT pair ?
> 
> I don't even know what that is. Care to ellaborate?
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by Sleepycat Software
> Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
> higher performing products faster, at low TCO.
> http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
> 

-- 

Karthik Kumar V
Updated Page -> http://www.geocities.com/kkgoesnuts

A Fortune Cookie :
- ------- ------ -

"Every person can be described as an equilateral triangle of side s, the
vertices representing what (s)he thinks, says and does. For an average
person, s = 10 miles ~ 16000 metres. When s = 0 metres, a person is said to
be a MAHATMA. Everybody should try to make their s get close to 0."





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/