[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

UrShapes in CVS



Ok folks, the moment you have all been waiting for is here.  Ok, the
moment some of you have been waiting for.  UrShapes is now in cvs at
cvs.con-struct.sourceforge.net/con-struct  in module
dia-0.88.1_urshape_fork.  I tried to create a patch and for some reason
the resulting patch wouldn't patch correctly.  Would someone be wiling
to write up a step by step (from creating the patch to applying it) or
at least point me to the docs?

To compile:

./configure --with-urshapes
make
make install (it needs to be installed to find the libs)

Attached is a dia diagram giving a basic layout of the objects.

What can UrShapes do right now?
Parse a .urshape file and somewhat draw on screen.
All the basic plumbing is there now we need to expand.

TODO:
* Resize infrastructure is there but it needs to be implemented
* SVG right now is flat (no children). I am toying with the idea of
writting a backend for librsvg to support the UrShapes rendering
structure.  If that is not a posibilty all the SVG shapes need to be
parsed as children of the SVG tag.  Right now the SVG tag is ignored and
the shapes are just placed as children of the current container.
* the SAX based state machine needs to be cleaned up (actualy there
realy no states right now) Things like aquiring CDATA from between start
and end tags need to be rethought.  Right now the character data is
accumulated in a buffer and then used and destroyed at the end tag.
Problem is this only works if there is no other tags inbetween the start
and end tag. For example:
<tag> -> init buffer
    #cdata -> place in buffer
</tag> ->use buffer and destroy

<tag> ->init buffer
     #cdata -> place in buffer
     <new tag> -> init buffer; creates a dangling pointer
            #cdata -> place in buffer
     </new tag>->use buffer and destroy
</tag> -> trying to destroy an already destroyed buffer

* Figure out how to display GtkWidgets on the dia canvas
* Load and Save need to be further implemented - perhaps StdProps code
can be used here but I want to also create a new way for getting
properties that allows for multilevel properties (i.e. textbox.text) but
that is the future.

Phase 1 goals:
* To get UrShapes to be able to nicely draw rectangles, lines,
gtktextbox's and the single container while allowing it to be properly
resized and moved around.
* To facilitate saving and loading of UrShapes in .dia documents

Rules for coding:
* interaction between UrShapes and Dia happens only in the urshape.c
file.
* none of Dia's .h files should be found in any of UrShapes .h files
except for urshape.h (with the exception of geometry.h)
* When adding a .c file make sure to add it to the Makefile.am in the
dia/objects/urshapes directory and run automake and ./configure
--with-urshapes at the top level Dia directory
* Add test .urshape files to dia/urshapes/test directory and add it to
the Makefile.am file in the same directory.  You must also add an entry
to the UrShapes.sheet file in the dia/sheets directory. The objects name
must match the id attribute of the <shape> tag within your .urshape
file.  If you failed to provide an id the cdata within the <name> tag is
used for backwards compatability with the custom shapes.

Happy hacking
--J5

urshape_starting_point.dia



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK