Re: User Data in .pfb files

New Message Reply Date view Thread view Subject view Author view

Benedikt Kessler (bjk++at++munich.sgi.com)
Tue, 26 Oct 1999 09:27:19 +0200


Paul Berridge wrote:
>
> *** Help Wanted ***
>
> I'm loading a file in one format (Multigen .flt) and trying to save it
> in a .pfb format file with my own user data.
>
> As recommended by the pfb man page, I set up the callback functions
> before calling pfdStoreFile_pfb with
>
> my_data_slot = pfGetNamedUserDataSlot("my_slot");

Make it more simple: after alocating a NamedUserDataSlot (as you did
already), just attach your data using pfUserDataSlot(pfObject *obj, int
slot, void *data);

my_data = pfMalloc(sizeof(...), pfGetSharedArena());

Store your data in my_data...

pfUserDataSlot(pfObject *obj, my_data_slot, my_data);

Then simply save it.

Bye! Benedikt

-- 
+---------------------------------+----------------------------------+
|Benedikt J. Kessler              | Silicon Graphics GmbH            |
|Professional Services            | Am Hochacker 3 - Technopark      |
|SGI                              | 85630 Grasbrunn-Neukeferloh, FRG |
|    ---  __o       ,__o          |                                  |
| ------_ \<,_    _-\_<,          | Phone: (+int) 89 46108-366 or -0 |
|----- (*)/ (*)  (*)/'(*)         | Fax:   (+int) 89 46107-366       |
+---------------------------------+----------------------------------+
|E-Mail: bjk++at++sgi.com    Web (private): http://reality.sgi.com/bjk    |
|   Web: http://www.sgi.de/dienstleistungen/                         |
+--------------------------------------------------------------------+

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Tue Oct 26 1999 - 00:28:02 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.