www.delorie.com/gnu/docs/xaos/xaos_13.html   search  
 
Buy GNU books!


An fast realtime interactive fractal zoomer

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.1.7 Palette functions

XaoS has small problems with restoring of palette. I had two goals in save/replay mechanizm - to replay animations as exactly as possible and to replay animation in highest possible quality (even higher then when they was recorded). This two goals can not be solved in following situation: XaoS uses palette as large as possible(approx 250 in 8bpp, 65536 in truecolor etc...). So when palette is saved in truecolor mode and replayed in 8bpp it has to be shorter and when it is saved in 8bpp and replayed in 65536 it is bigger. So do not rely on palette much. First 200 entries should be OK but later ones should be different. Another problem is color cycling. Since on slower computers image recaluclation takes longer time and color cycling is asymchronous process, replay can not be exact. So after you stop cycling, palette should be shifted differently than when recorded. Please DO NOT RELY ON ROTATED PALETTES.

Following functions are provided:

Function: (defaultpalette integer) (* -- do not recaluclate in most of 8bpp modes)

Sets the default palette. The parameter says how much is palette shifted (by preious cycling). Should be 0 in the most cases.

Function: (palette integer integer integer)

Generates random palette. First number specifies algorithm. It should be usefull for possible future improvements and must be 1 for now. Next parameter is random seed for palette. And the last one specifies shift like in (defaultpalette)

Function: (cycling boolean)

Enables/disables color cycling. Note that on devices, where color cycling is impossible this command is ignored.

Function: (cyclingspeed integer)

Sets cycling speed(how many shifts per second). Numbers lower than zero inverses direction of cycling


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003