Loading ...
Sorry, an error occurred while loading the content.

RE: [cc2-dev-l] Re: FCW format and existing FCW->SVG code

Expand Messages
  • Joseph Slayton
    The FCW definition header file in the SVG converter is woefully incomplete. There is an XP development kit that has all of the definitions in it. The
    Message 1 of 10 , Feb 20, 2012
    • 0 Attachment
      The FCW definition header file in the SVG converter is woefully incomplete. There is an XP development kit that has all of the definitions in it. The ProFantasy web site should have more information on the development kit.
       
      Anyhow, the following definitions should help:
       
      // from _geometry.h
      typedef struct
      {
       short Font;
       GPOINT2 Origin;
       float Hght;
       float XScl;
       float BAng;
       float Spacing;
       short TFlags;
       short DFlags;
       short Just;
       char TData[];
      } GTEXT2;

      // from _estruc.h
      typedef struct
      {
       CSTUFF CStuff;  // entity properties
       GTEXT2 Text;
      }TXT2;

      The CSTUFF definition is listed as Common in the header.h in the SVG converter.
       
      > To: cc2-dev-l@yahoogroups.com
      > From: yahoo@...
      > Date: Mon, 20 Feb 2012 21:15:42 +0000
      > Subject: [cc2-dev-l] Re: FCW format and existing FCW->SVG code
      >
      > > I have another question: the existing code doesn't support [for
      > > some] block types. I've noticed type 5 (which appears to be the
      > > type for text labels) and type 0x81 (metadata?). Does anyone
      > > know the structure for these types?
      >
      > I've looked into "reverse engineering" the format for the text labels, and figured out this much:
      >
      > 0x00 - 0x1B : standard block header
      > 0x1C - 0x1D : ??
      > 0x1E - 0x25 : Coordinate
      > 0x26 - 0x3A : ??
      > 0x3B - varies : null-terminated String text
      >
      > I'm sure I can figure out the reference to font id and font size.
      >
      > Supporting text introduces a new weirdness, however. CC3's coordinate system is different from SVG's. CC3 uses a "natural" coordinate system, with the largest numbers in the upper right hand corner. SVG uses the (horrible, icky) coordinate system where the largest numbers are in the bottom right hand corner. You'd think it'd be easy to just transform (flip) the entire SVG group, except that makes the text appear upside-down. Le sigh.
      >
      > BC
      >
      >
      >
      >
      > ------------------------------------
      >
      > To Post a message, send it to: cc2-dev-l@...
      > To Unsubscribe, send a blank message to: cc2-dev-l-unsubscribe@...! Groups Links
      >
      > <*> To visit your group on the web, go to:
      > http://groups.yahoo.com/group/cc2-dev-l/
      >
      > <*> Your email settings:
      > Individual Email | Traditional
      >
      > <*> To change settings online go to:
      > http://groups.yahoo.com/group/cc2-dev-l/join
      > (Yahoo! ID required)
      >
      > <*> To change settings via email:
      > cc2-dev-l-digest@yahoogroups.com
      > cc2-dev-l-fullfeatured@yahoogroups.com
      >
      > <*> To unsubscribe from this group, send an email to:
      > cc2-dev-l-unsubscribe@yahoogroups.com
      >
      > <*> Your use of Yahoo! Groups is subject to:
      > http://docs.yahoo.com/info/terms/
      >
    • L. Lee Saunders
      The latest XP development Kit code (for CC3) is available for download on Peter Olsen s site: http://www.pkdata.se/xp/download/xpdev-cc3.zip This should give
      Message 2 of 10 , Feb 20, 2012
      • 0 Attachment
        The latest XP development Kit code (for CC3) is available for download on Peter Olsen's site:
         
        http://www.pkdata.se/xp/download/xpdev-cc3.zip

        This should give you a complete "view" into the file format.

        L. Lee Saunders
         
        "It was only a partial solution, of course, as solutions usually are, and addressed only one specific problem, as solutions usually do. But, as was often also true, it opened the door—if only a crack—for the multitude of solutions to follow." 
        1632 - Eric Flint
         
        my blog: http://oldschooldotnet.blogspot.com
        Taking Dot Net "Old School" - Playing with old ideas/concepts using the newest tools!
         
         


         

        To: cc2-dev-l@yahoogroups.com
        From: waldronate@...
        Date: Mon, 20 Feb 2012 14:22:16 -0800
        Subject: RE: [cc2-dev-l] Re: FCW format and existing FCW->SVG code

         
        The FCW definition header file in the SVG converter is woefully incomplete. There is an XP development kit that has all of the definitions in it. The ProFantasy web site should have more information on the development kit.
         
        Anyhow, the following definitions should help:
         
        // from _geometry.h
        typedef struct
        {
         short Font;
         GPOINT2 Origin;
         float Hght;
         float XScl;
         float BAng;
         float Spacing;
         short TFlags;
         short DFlags;
         short Just;
         char TData[];
        } GTEXT2;

        // from _estruc.h
        typedef struct
        {
         CSTUFF CStuff;  // entity properties
         GTEXT2 Text;
        }TXT2;

        The CSTUFF definition is listed as Common in the header.h in the SVG converter.
         
        > To: cc2-dev-l@yahoogroups.com
        > From: yahoo@...
        > Date: Mon, 20 Feb 2012 21:15:42 +0000
        > Subject: [cc2-dev-l] Re: FCW format and existing FCW->SVG code
        >
        > > I have another question: the existing code doesn't support [for
        > > some] block types. I've noticed type 5 (which appears to be the
        > > type for text labels) and type 0x81 (metadata?). Does anyone
        > > know the structure for these types?
        >
        > I've looked into "reverse engineering" the format for the text labels, and figured out this much:
        >
        > 0x00 - 0x1B : standard block header
        > 0x1C - 0x1D : ??
        > 0x1E - 0x25 : Coordinate
        > 0x26 - 0x3A : ??
        > 0x3B - varies : null-terminated String text
        >
        > I'm sure I can figure out the reference to font id and font size.
        >
        > Supporting text introduces a new weirdness, however. CC3's coordinate system is different from SVG's. CC3 uses a "natural" coordinate system, with the largest numbers in the upper right hand corner. SVG uses the (horrible, icky) coordinate system where the largest numbers are in the bottom right hand corner. You'd think it'd be easy to just transform (flip) the entire SVG group, except that makes the text appear upside-down. Le sigh.
        >
        > BC
        >
        >
        >
        >
        > ------------------------------------
        >
        > To Post a message, send it to: cc2-dev-l@...
        > To Unsubscribe, send a blank message to: cc2-dev-l-unsubscribe@...! Groups Links
        >
        > <*> To visit your group on the web, go to:
        > http://groups.yahoo.com/group/cc2-dev-l/
        >
        > <*> Your email settings:
        > Individual Email | Traditional
        >
        > <*> To change settings online go to:
        > http://groups.yahoo.com/group/cc2-dev-l/join
        > (Yahoo! ID required)
        >
        > <*> To change settings via email:
        > cc2-dev-l-digest@yahoogroups.com
        > cc2-dev-l-fullfeatured@yahoogroups.com
        >
        > <*> To unsubscribe from this group, send an email to:
        > cc2-dev-l-unsubscribe@yahoogroups.com
        >
        > <*> Your use of Yahoo! Groups is subject to:
        > http://docs.yahoo.com/info/terms/
        >


      • BC Holmes
        ... [...] ... Oh, awesomecakes! That s tremendously helpful! I ll poke around on the web site for the XP development kit. BCing you -- B.C. Holmes
        Message 3 of 10 , Feb 20, 2012
        • 0 Attachment
          On 12-02-20 5:22 PM, Joseph Slayton wrote:
          >
          > {
          > short Font;
          > GPOINT2 Origin;
          > float Hght;
          [...]
          > }TXT2;

          Oh, awesomecakes! That's tremendously helpful!

          I'll poke around on the web site for the XP development kit.

          BCing you
          --
          B.C. Holmes \u2625 http://www.bcholmes.org/
          "All my life I've wanted to be somebody; I guess I should've been
          more specific." -- Lily Tomlin
        • BC Holmes
          ... Thanks bunches! I wasn t having much luck finding the kit on the ProFantasy site. BCing you -- B.C. Holmes u2625
          Message 4 of 10 , Feb 20, 2012
          • 0 Attachment
            On 12-02-20 5:35 PM, L. Lee Saunders wrote:
            >
            > The latest XP development Kit code (for CC3) is available for
            > download on Peter Olsen's site:

            Thanks bunches! I wasn't having much luck finding the kit on the
            ProFantasy site.

            BCing you
            --
            B.C. Holmes \u2625 http://www.bcholmes.org/
            "All my life I've wanted to be somebody; I guess I should've been
            more specific." -- Lily Tomlin
          • BC Holmes
            Thanks for all the help, guys. I ve made some progress, and the XP development kit headers have done a lot to clarify the file structure. I m currently
            Message 5 of 10 , Feb 20, 2012
            • 0 Attachment
              Thanks for all the help, guys. I've made some progress, and the XP
              development kit headers have done a lot to clarify the file structure.

              I'm currently pulling my hair out trying to figure out how I'm going to
              handle brush pattern fill styles, but it's been a fun learning experience.

              BCing you
              --
              B.C. Holmes \u2625 http://www.bcholmes.org/
              "All my life I've wanted to be somebody; I guess I should've been
              more specific." -- Lily Tomlin
            • Simon Rogers
              Mike can t post via yahoo groups, so he asked me to forward this: Entity type 5 is 2d Text. The as built reference is the ESTRUC.CPY file in the XP toolkit.
              Message 6 of 10 , Feb 21, 2012
              • 0 Attachment
                Mike can't post via yahoo groups, so he asked me to forward this:

                Entity type 5 is 2d Text. The "as built" reference is the ESTRUC.CPY file in
                the XP toolkit.
                ESTRUCO.CPY describes some older version entity structures.

                Reading assembly data structures is not very different from C structures -
                real4 for float, real8 for double, dword for int/unsigned int, word for
                short, and byte for char/unsigned char.

                Type 0x80 contains plot assembly data, and type 0x81 is the NOTE entity
                structure Types 0x80 and above are non-drawing entities.

                Brush fills are part of the Fill Style InfoBlock (See FSTYIB.CPY and
                FSTYLES.CPY).
                There is no direct service for adding a fill style from a program - you will
                need to understand and modify the Fill Style InfoBlock record. (EType = 0)
                (IBType = 7).

                Mike

                -----Original Message-----
                From: cc2-dev-l@yahoogroups.com [mailto:cc2-dev-l@yahoogroups.com] On Behalf
                Of BC Holmes
                Sent: 21 February 2012 04:26
                To: cc2-dev-l@yahoogroups.com
                Subject: Re: [cc2-dev-l] Re: FCW format and existing FCW->SVG code


                Thanks for all the help, guys. I've made some progress, and the XP
                development kit headers have done a lot to clarify the file structure.

                I'm currently pulling my hair out trying to figure out how I'm going to
                handle brush pattern fill styles, but it's been a fun learning experience.

                BCing you
                --
                B.C. Holmes \u2625 http://www.bcholmes.org/
                "All my life I've wanted to be somebody; I guess I should've been more
                specific." -- Lily Tomlin


                ------------------------------------

                To Post a message, send it to: cc2-dev-l@...
                To Unsubscribe, send a blank message to:
                cc2-dev-l-unsubscribe@...! Groups Links
              Your message has been successfully submitted and would be delivered to recipients shortly.