This example found in the ‘antiryadgx/workspaces/fractal/’ directory show how to display pixel on screen by drawing a fractal using the Gel language.
To run this example, launch Antiryad Gx, run the ‘Tools/Execute Gel’ menu and select the file ‘antiryadgx/workspaces/fractal/fractal.gel’.
An other way is to launch the ‘Tools/Text editor’ menu, load the file ‘antiryadgx/workspaces/fractal/fractal.gel’ then launch the ‘Gel/Run’ menu.
Here is the Gel source code of the program (init.gel):

        /* ======================================================================= */
        /* Fractal example - Copyright (c) Antoine Guillon from Arkham Development */
        /* ======================================================================= */
        class fractal
        import antiryadgx.gx_screen
        import antiryadgx.gx_keyboard
        import antiryadgx.gx_bitmap
        declarefunction nothing,main,nothing
        /* ---- */
        /* main */
        /* ---- */
        function main
          dim x,y,sizex,sizey,iteration,int
          dim cr,ci,zr,zi,oldzr,float
          dim winrm,winrn,winim,winin,winr,wini,float
          dim deltax,deltay,counterx,countery,float
          dim zoom,float
        /* Infinite frame loop, break when escape key is pressed */
        /* Y lines loop */
        /* X pixels loop */
        /* Iterations loop, 32 maximum */
        /* Draw one pixel result to screen, 2d color format are in 16 bits rrrrrggggggbbbbb */
        /* Here, we use only 5 bits of color component (32 values maximum) */
        /* Flush video buffer to screen once per 8 lines drawn */

agxcreatefractal.txt · Last modified: 2014/10/12 16:23 by pyro
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki