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

Re: [AutoTrace] shared library

Expand Messages
  • Wolfgang Glunz
    ... One could even think of making each (or a set of) export filter(s) an own shared library working as plug-in . This way it get s first a bit easier to
    Message 1 of 11 , Jul 1, 2000
    • 0 Attachment
      Bernhard Herzog wrote:
      >
      > "Masatake YAMATO" <masata-y@...-nara.ac.jp> writes:
      >
      > > The library should contain current version of autotrace - main()
      > > - command line option parser. In other word, almost all code of
      > > autotrace should be in the shared library, I think.
      >
      > I think it would be worthwhile to put the export filters either into the
      > main program or into a separate shared library. An extension of Sketch
      > that uses the autotrace library wouldn't need all those export filters
      > because it would be creating Sketch-objects directly.

      One could even think of making each (or a set of) export filter(s)
      an own shared library working as "plug-in". This way it get's first a bit
      easier to add-in new filters and second it is easier to configure a lean
      autotrace that contains just the filters needed. Further it is easier
      to handle platform dependent filters.
      I applied this approach in my program - pstoedit. I used the pattern
      of "self-registering objects". But this relies on using C++ which I
      would recommend anyway. I could help you appling this pattern if
      you want.

      >
      > > What I'd like to do n
      > > (1) add functions that free allocated memory in autotrace.

      This might be easier again if C++ were used due to destructors.

      Wolfgang

      --
      Wolfgang Glunz
    • Bernhard Herzog
      ... The same applies to the import filters for the raster images. ... It doesn t exist yet. I was just giving an example of why it would be a good idea not to
      Message 2 of 11 , Jul 3, 2000
      • 0 Attachment
        "Masatake YAMATO" <masata-y@...-nara.ac.jp> writes:

        > > I think it would be worthwhile to put the export filters either into the
        > > main program or into a separate shared library.

        The same applies to the import filters for the raster images.

        > An extension of Sketch
        > > that uses the autotrace library wouldn't need all those export filters
        > > because it would be creating Sketch-objects directly.
        > It seems that I should split autotrace two or three shared libraries.
        > Where could I get the extension? It is part of Sketch it self?

        It doesn't exist yet. I was just giving an example of why it would be a
        good idea not to put the import/export filters into the core
        autolibrary.

        > I did't looked at the code closely. I've just looked at the code
        > again. I've found there are free functions for each data
        > structures.

        Yes, but their behavior is quite inconsistent.

        Take for instance the spline_list_type struct in spline.[ch]. The
        function new_spline_list() allocates a new struct initializes the
        pointers in the struct to NULL and returns a pointer to it.
        free_spline_list OTOH, only free()s the data contained in the
        spline_list_struct, not the struct itself. This is a very strange
        approach, IMO.

        And even worse, all structs seem to have different semantics for their
        *_init/*_new/*_free functions which is very confusing and many of the
        memory leaks were a result of this confusion, AFAICT.


        > So I don't have to do (1). The biggest question is that
        > where I can get the latest code that you worked. I'm using version 0.23.

        I have no idea when Martin will release the next version. For the time
        being it would probably be best to ask Martin to send you his current
        version by mail.

        Martin, I also think a CVS repository at SourceForge or at least more
        frequent releases of development versions would be good.

        --
        Bernhard Herzog | Sketch, a drawing program for Unix
        herzog@... | http://sketch.sourceforge.net/
      • Masatake YAMATO
        ... I see. External bitmap format - internal bitmap format: libautotrace_bitmap.so Internal bitmap format- internal vector format: libautotrace_core.so
        Message 3 of 11 , Jul 3, 2000
        • 0 Attachment
          >
          > It doesn't exist yet. I was just giving an example of why it would be a
          > good idea not to put the import/export filters into the core
          > autolibrary.
          >
          I see.

          External bitmap format -> internal bitmap format: libautotrace_bitmap.so
          Internal bitmap format->internal vector format: libautotrace_core.so
          Internal vector format->eternal vector format: libautotrace_vector.so

          example of usage:)
          gimp->libautotrace_core->sketch
          gimp->libautotrace_core->gyve
          gimp->libautotrace_core->killustrator
          OK?

          > I have no idea when Martin will release the next version. For the time
          > being it would probably be best to ask Martin to send you his current
          > version by mail.
          >
          > Martin, I also think a CVS repository at SourceForge or at least more
          > frequent releases of development versions would be good.

          At least I'd like to know policy of development and works you have done.

          Masatake
        • Masatake YAMATO
          ... I d like to know about self-registering objects more. Any reference or web page? Or should I read the source files of pstoedit? I cannot find it in a
          Message 4 of 11 , Jul 3, 2000
          • 0 Attachment
            > I applied this approach in my program - pstoedit. I used the pattern
            > of "self-registering objects". But this relies on using C++ which I
            > would recommend anyway. I could help you appling this pattern if
            > you want.

            I'd like to know about "self-registering objects" more. Any reference
            or web page? Or should I read the source files of pstoedit?
            I cannot find it in a book written by Erich Gamma.

            Masatake
          • Glunz Wolfgang
            It s also known as pluggable factories (http://www.creport.com/archive/9910/html/from_pages/index.shtml) An old article that is quite nice to read and fits
            Message 5 of 11 , Jul 4, 2000
            • 0 Attachment
              It's also known as "pluggable factories"
              (http://www.creport.com/archive/9910/html/from_pages/index.shtml)

              An old article that is quite nice to read and fits quite well to the autotrace
              context is:
              J. Beveridge: "Self-Registering Objects in C++", Dr. Dobb's Journal, August 1998.

              Wolfgang

              > -----Original Message-----
              > From: Masatake YAMATO [SMTP:masata-y@...-nara.ac.jp]
              > Sent: Monday, July 03, 2000 11:56 PM
              > To: autotrace@egroups.com
              > Subject: Re: [AutoTrace] shared library
              >
              > > I applied this approach in my program - pstoedit. I used the pattern
              > > of "self-registering objects". But this relies on using C++ which I
              > > would recommend anyway. I could help you appling this pattern if
              > > you want.
              >
              > I'd like to know about "self-registering objects" more. Any reference
              > or web page? Or should I read the source files of pstoedit?
              > I cannot find it in a book written by Erich Gamma.
              >
              > Masatake
              >
              > ------------------------------------------------------------------------
              > Special eGroups Offer: Save On Long Distance Today!
              > http://click.egroups.com/1/5073/11/_/124451/_/962661425/
              > ------------------------------------------------------------------------
              >
            • Martin Weber
              Why not use a plugin concept like in GIMP (www.gimp.org)? ... -- Sent through GMX FreeMail - http://www.gmx.net
              Message 6 of 11 , Jul 4, 2000
              • 0 Attachment
                Why not use a plugin concept like in GIMP (www.gimp.org)?

                > It's also known as "pluggable factories"
                > (http://www.creport.com/archive/9910/html/from_pages/index.shtml)
                >
                > An old article that is quite nice to read and fits quite well to the
                > autotrace
                > context is:
                > J. Beveridge: "Self-Registering Objects in C++", Dr. Dobb's Journal,
                > August 1998.
                >
                > Wolfgang
                >
                > > -----Original Message-----
                > > From: Masatake YAMATO [SMTP:masata-y@...-nara.ac.jp]
                > > Sent: Monday, July 03, 2000 11:56 PM
                > > To: autotrace@egroups.com
                > > Subject: Re: [AutoTrace] shared library
                > >
                > > > I applied this approach in my program - pstoedit. I used the pattern
                > > > of "self-registering objects". But this relies on using C++ which I
                > > > would recommend anyway. I could help you appling this pattern if
                > > > you want.
                > >
                > > I'd like to know about "self-registering objects" more. Any reference
                > > or web page? Or should I read the source files of pstoedit?
                > > I cannot find it in a book written by Erich Gamma.
                > >
                > > Masatake
                > >
                > >
                > ------------------------------------------------------------------------
                > > Special eGroups Offer: Save On Long Distance Today!
                > > http://click.egroups.com/1/5073/11/_/124451/_/962661425/
                > >
                > ------------------------------------------------------------------------
                > >
                >
                > ------------------------------------------------------------------------
                > Savings + service + convenience = beMANY!
                > http://click.egroups.com/1/4116/11/_/124451/_/962713567/
                > ------------------------------------------------------------------------
                >
                >

                --
                Sent through GMX FreeMail - http://www.gmx.net
              • Glunz Wolfgang
                ... [Glunz Wolfgang] See http://www.ddj.com/articles/1998/9808/9808toc.htm There you also find some source code. Wolfgang
                Message 7 of 11 , Jul 4, 2000
                • 0 Attachment
                  > -----Original Message-----
                  > From: Glunz Wolfgang [SMTP:Wolfgang.Glunz@...]
                  > Sent: Tuesday, July 04, 2000 2:29 PM
                  > To: 'autotrace@egroups.com'
                  > Subject: RE: [AutoTrace] shared library
                  >
                  > It's also known as "pluggable factories"
                  > (http://www.creport.com/archive/9910/html/from_pages/index.shtml)
                  >
                  > An old article that is quite nice to read and fits quite well to the autotrace
                  > context is:
                  > J. Beveridge: "Self-Registering Objects in C++", Dr. Dobb's Journal, August 1998.
                  [Glunz Wolfgang]
                  See
                  http://www.ddj.com/articles/1998/9808/9808toc.htm
                  There you also find some source code.

                  Wolfgang


                  > Wolfgang
                  >
                  > > -----Original Message-----
                  > > From: Masatake YAMATO [SMTP:masata-y@...-nara.ac.jp]
                  > > Sent: Monday, July 03, 2000 11:56 PM
                  > > To: autotrace@egroups.com
                  > > Subject: Re: [AutoTrace] shared library
                  > >
                  > > > I applied this approach in my program - pstoedit. I used the pattern
                  > > > of "self-registering objects". But this relies on using C++ which I
                  > > > would recommend anyway. I could help you appling this pattern if
                  > > > you want.
                  > >
                  > > I'd like to know about "self-registering objects" more. Any reference
                  > > or web page? Or should I read the source files of pstoedit?
                  > > I cannot find it in a book written by Erich Gamma.
                  > >
                  > > Masatake
                  > >
                  > > ------------------------------------------------------------------------
                  > > Special eGroups Offer: Save On Long Distance Today!
                  > > http://click.egroups.com/1/5073/11/_/124451/_/962661425/
                  > > ------------------------------------------------------------------------
                  > >
                  >
                  > ------------------------------------------------------------------------
                  > Savings + service + convenience = beMANY!
                  > http://click.egroups.com/1/4116/11/_/124451/_/962713567/
                  > ------------------------------------------------------------------------
                  >
                Your message has been successfully submitted and would be delivered to recipients shortly.