Context Free Art

Include directive

From Context Free Art

Jump to: navigation, search

Include Directives

An include directive inserts another CFDG file into the input stream right after the directive. Context Free/CFDG can handle included files including other files in turn with no real limit on inclusion depth. An include directive looks like the word include followed by the name of the CFDG file to include. This name can either be one of the items in the Examples menu or a file on your hard disk. For files on your hard disk you supply the relative path from the directory where the including CFDG file resides. This means that if a new CFDG file includes another CFDG file (not an example) then you need to save it to disk first so that Context Free/CFDG knows where to base the relative path.

startshape TITLES
include i_pix.cfdg   // from the Examples menu
 
rule TITLES {
        TITLE1 { x 0 y 4.5 }
        TITLE2 { x 0 y 3 }
        TITLE3 { x 0 y 1.5 }
        TITLE4 { x 0 y 0 }
}
rule TITLE1 {
        O_5by5 { x 0 }
        N_5by5 { x 1.2 }
        E_5by5 { x 2.4 }
}
rule TITLE2 {
        T_5by5 { x 0 }
        W_5by5 { x 1.2 }
        O_5by5 { x 2.4 }
}
rule TITLE3 {
        T_5by5 { x 0 }
        H_5by5 { x 1.2 }
        R_5by5 { x 2.4 }
        E_5by5 { x 3.6 }
        E_5by5 { x 4.8 }
}
rule TITLE4 {
        F_5by5 { x 0 }
        O_5by5 { x 1.2 }
        U_5by5 { x 2.4 }
        R_5by5 { x 3.6 }
}

produces:


Image:Onetwothreefour.png


Views
Personal tools
Navigation
Toolbox
MediaWiki
Attribution-Share Alike 2.5
book coverSee our new book:
Community of Variation