![]() | ![]() | IFSgr Library Reference Manual | ![]() |
---|
file — Read and write IFS files.
IFS* ifs_read_by_name (FILE *fh, const char *name); IFS* ifs_read_fdesign (FILE *fh); IFS** ifs_read_file (FILE *fh, size_t *nifs); IFSCTrans* ifs_read_ifscompose (FILE *fh, PointXY *center, size_t *ntrans); IFS* ifs_read_next (FILE *fh); void ifs_write_ifs (const IFS *ifs, FILE *fh); void ifs_export_ifscompose (const IFS *ifs, FILE *fh);
IFS* ifs_read_by_name (FILE *fh, const char *name);
Read one complete Fractint 2D IFS from filehandle fh.
fh: | A stdio filehandle open for read. |
name: | Name of the IFS to find, case-insensitive. |
Returns : | A newly allocated IFS on success, NULL on failure. |
IFS* ifs_read_fdesign (FILE *fh);
Read a IFS from FDESIGN TRN file.
fh: | A stdio filehandle open for read (better in binary mode). |
Returns : | A newly allocated iterated function system structure. If the read fails, NULL is returned. |
IFS** ifs_read_file (FILE *fh, size_t *nifs);
Read all 2D IFSes from Fractint IFS file.
fh: | A stdio filehandle open for read. |
nifs: | Where the number of reads IFSes should be stored. |
Returns : | A newly allocated array of nifs IFSes. If nothing is read, NULL is returned. |
IFSCTrans* ifs_read_ifscompose (FILE *fh, PointXY *center, size_t *ntrans);
Read a GIMP IFS Compose style IFS from file.
fh: | A stdio filehandle open for read. |
center: | Where the IFS `center' shoud be stored. |
ntrans: | Where the number of trasformations in the IFS should be stored. |
Returns : | A newly allocated GIMP IFS Compose style iterated function system description. If the read fails, NULL is returned. |
IFS* ifs_read_next (FILE *fh);
Read next 2D IFS from Fractint IFS file.
fh: | A stdio filehandle open for read. |
Returns : | A newly allocated IFS on success, NULL on failure. |
void ifs_write_ifs (const IFS *ifs, FILE *fh);
Write ifs in Fractint IFS format to fh.
ifs: | An iterated function system. |
fh: | A file handle open for writing to write the IFS to. |
void ifs_export_ifscompose (const IFS *ifs, FILE *fh);
Write ifs in Gimp IFS Compose format to fh.
ifs: | An iterated function system. |
fh: | A file handle open for writing to write the converted IFS to. |
<< trans | draw >> |