Hi guys, I repost the posting below. I have posted it last friday, but unfortunately it failed due to size limitations. The reason it failed was because I included patches as an attachment. The repost has exactly the same text as the original, but I have left out the attachments, they can be found at the URIs below:
http://krnl.nl/custom_lines_plugin_for_dia_0.96.1.patch.gz http://krnl.nl/custom_lines_plugin_for_dia_0.96.1_demo_lines_and_sheet.tgz Okay, now on to the original posting: ---------- Forwarded message ---------- From: Marcel Toele <[EMAIL PROTECTED]> Date: 12 okt. 2007 15:28 Subject: Custom lines plugin for dia 0.96.1 (including patch+demo line shapes/sheet) To: [email protected] Hi guys, I have written an objects/shapes plugin for dia called custom_lines. It is similar to the custom_objects plugin and allows users to define "line shapes" with preconfigured settings for start/end arrow, line style, thickness, color, etc. using simple XML. E.g.: <?xml version="1.0"?> <line> <name>Demo, Custom Lines - Association</name> <icon>Association.png </icon> <!-- if type is All .png is replaced by _Zigzagline.png, _Bezierline.png and _P olyline.png --> <type>All</type> <!-- Zigzagline | Polyline | Bezierline | All? --> <line-style>Solid</line-style> <!-- Solid | Dashed | Dash-Dot | Dash-Dot-Dot | Dotted --> <dash-length>0.5</dash-length> <!-- floating-point value --> <line-width>0.1</line-width> <!-- floating-point value --> <corner-radius>0.0</corner-radius> <!- floating-point value --> <arrows> <start> <type>None</type> <!-- None | Lines | Hollow-Triangle | Filled-Triangle | Hollow-Dia mond | Filled-Diamond | Half-Head | Slashed-Cross | Filled-Ellipse | Hollow-Ellipse | Double-Hollow-Triangle | Double-Filled-Triangle | Unfilled-Triangle | Filled-Dot | Dimension-Origin | Blanked-Dot | Filled-Box | B lanked-Box | Slash-Arrow | Integral-Symbol | Crow-Foot | Cross | Filled-Concave | Blanked-Concave | Rounded | Half-Diamond | Open-Rounded | Filled-Dot-N-Triangle | One-Or-Many | None-Or-Many | One-Or-None | One-Exact ly | Backslash | Three-Dots --> <length></length> <!-- floating-point value --> <width></width> <!-- floating-point value --> </start> <end> <type>Lines</type> <length>0.5</length> <!-- floating-point value --> <width> 0.5</width> <!-- floating-point value --> </end> </arrows> <line-color> <red></red> <!-- floating-point value --> <green></green> <!-- floating-point value --> <blue></blue> <!-- floating-point value --> </line-color> </line> This is very useful, because quite a few diagram languages use several distinct line types/styles to connect various shapes. Consider for instance the ArchiMate Relations: https://doc.telin.nl/dsweb/Get/Document-52048/ArchiMate%20Quick%20Reference.pdf It's both a nuisance and not clean to having to configure the right line style. It's true, you can just copy an existing line of the right type, but it's much easier if it were available at the click of a button. And with the custom_lines plugin it works exactly like that, just like the *.shapes. The *.line files are stored in the directory lines/ next to the directory shapes/ that serves the same goal, but with *.shape files. The created line shapes can be intermixed with ordinary shapes on a sheet. I have prepared and included a patch against dia version 0.96.1. Also included is a set of demonstration line "shapes" (e.g. the Relations from the ArchiMate diagram language) and a demonstration sheet: Demo, Custom Lines. The icons for these lines have been automatically generated by a small ruby script (not included in the patch), I'll submit it at a later date. For those who just want a quick peek at what it looks like check this uri: http://krnl.nl/custom_lines_plugin_for_dia_0.96.1_screenshot.png (Remember, it is not mandatory to have all three linetype shapes for every relation (like in the screenshot). Also remember that, since the lines are just dia shapes, they can be mixed with ordinary shapes on a single sheet). For those who want to actually see the plugin in action, download dia version 0.96.1 and patch with the provided patch. Don't forget to run autogen.sh after patching. have fun! Marcel Toele
_______________________________________________ Dia-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/dia-list FAQ at http://live.gnome.org/Dia/Faq Main page at http://live.gnome.org/Dia
