The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniGraffle General (http://forums.omnigroup.com/forumdisplay.php?f=10)
-   -   Making my own arrowhead (http://forums.omnigroup.com/showthread.php?t=11779)

jem 2009-03-30 12:57 PM

Making my own arrowhead
 
I (= my wife) need an arrow head that isn't defined in OG. I started to search for info to do this and found [url]http://forums.omnigroup.com/showthread.php?t=856[/url]. Unfortunately I can't even find the shapes file so I guess that this only works for some previous version of OG.

Does anyone know how to create my own arrowheads in OG?

Joel 2009-03-30 03:11 PM

There isn't an existing .graffleshapes file, however if you follow the linked tutorial, then save that file as [filename].graffleshapes in ~/Library/Application Support/OmniGraffle/Shapes/ (you will have to create this directory in the Finder), then it should show up in OmniGraffle afterwards.

Joel 2009-03-30 03:16 PM

Also, a bit more discussion about using the .graffleshapes format over at [URL="http://forums.omnigroup.com/showthread.php?t=11283"]this thread[/URL].

Chris 2009-03-31 05:57 AM

Joel's statement that there isn't an existing .graffleshapes file isn't .... 100% accurate. To find the existing graffleshapes file, go to your Applications folder (or wherever you've installed OG) and right-click on OG (or control-click, if you don't have right-click enabled). Choose "Show Package Contents" from the popup menu. This will bring up a Finder window with a single folder in it called "Contents". Go into that folder and then into the "Resources" folder. The .graffleshapes file is in there; it's called "shapes.graffleshapes". I'd suggest making a copy somewhere else to look at. You can open it in text edit; it's just a plain text file. All the shapes are in there, including the arrowhead shapes for the lines. Just search for "arrowheads" to find them. I've never played around with the arrowhead shapes, so I can't guide you from here. But I would guess you can add new arrowhead shapes by adding them to this file.

Just make sure you keep a copy of the original shapes.graffleshapes file around in case you screw up (you will, if you play around) so that you can revert to factory conditions.

Hoff 2009-04-09 03:01 PM

Arrowhead with symbol inside?
 
I'm reading through the shapes threads, and would love it if someone wiser than I could tell me if what I'm trying to do is possible before I study too much longer.

I'd like to make arrowheads with + and - symbols inside them. It could be a filled triangle with white symbol, or unfilled with black. I just need this one symbol at the end of a connector, and would like to do away with fiddling with the line labels.

Thanks for any insight!

Chris 2009-04-10 06:55 AM

[QUOTE=Hoff;58247]I'm reading through the shapes threads, and would love it if someone wiser than I could tell me if what I'm trying to do is possible before I study too much longer.

I'd like to make arrowheads with + and - symbols inside them. It could be a filled triangle with white symbol, or unfilled with black. I just need this one symbol at the end of a connector, and would like to do away with fiddling with the line labels.

Thanks for any insight![/QUOTE]

I think the answer is yes, at least for the unfilled with black. If you open up shapes.graffleshapes in TextEdit or BBEdit or TextWrangler and search for "arrowheads" you'll see all the arrowhead definitions. [BTW, in my OG Pro 5.11, I found this file in Contents:Frameworks:GraffleShapes.framework:Versions:A:Resources, not where I said above.] Scroll down and you'll see an arrowhead named "Box". I would guess that's the most promising for something like what you want. Its definition is:

[CODE]{
Gap = 0;
LineGap = 0.5;
Name = Box;
OldIndex = 8;
Path = {
elements = (
{element = MOVETO; point = "{0, -3}"; },
{element = LINETO; point = "{0, 3}"; },
{element = LINETO; point = "{6, 3}"; },
{element = LINETO; point = "{6, -3}"; },
{element = CLOSE; }
);
};
Width = 6;
},[/CODE]

You can modify it. The lines above draw the square. I'm not sure what the coordinate system is; it seems different from the regular shape coordinate system. My guess would be that the coordinates above give the corners of the box, so the x coord runs from 0 to 6 and the y coord from -3 to 3. If I were to do it, I would start by adding something like the four lines:

[CODE]
{element = MOVETO; point = "{3, -1.5}"; },
{element = LINETO; point = "{3, 1.5}"; },
{element = MOVETO; point = "{1.5, 0}"; },
{element = LINETO; point = "{4.5, 0}"; },
[/CODE]

immediately before the line with the first MOVETO in it. I think this should add a plus sign inside the box.

You can also duplicate the definition and change its name so that you'll still have the original box arrowhead available as well. (I would probably remove the "OldIndex = 8;" line if I did that.)

Of course, always work on a copy!

Hoff 2009-04-14 10:41 AM

Fantastic - Thanks!

I succeeded in making my open arrow with a plus sign in it, thusly:

{
Gap = 0.5;
LineGap = 1.4;
Name = PlusArrow;
Path = {
elements = (
{element = MOVETO; point = "{0, 0}"; },
{element = LINETO; point = "{8, 4}"; },
{element = LINETO; point = "{8, -4}"; },
{element = CLOSE; },
{element = MOVETO; point = "{3, 0}"; },
{element = LINETO; point = "{7, 0}"; },
{element = MOVETO; point = "{5, -2}"; },
{element = LINETO; point = "{5, 2}"; },
);
};
Width = 8;
},

But the plus sign is a little anemic looking (i.e. line is a little thin). So I tried an outline of the plus sign:

{
Gap = 0.5;
LineGap = 1.4;
Name = PlusArrowThick;
Path = {
elements = (
{element = MOVETO; point = "{0, 0}"; },
{element = LINETO; point = "{8, 4}"; },
{element = LINETO; point = "{8, -4}"; },
{element = CLOSE; },
{element = MOVETO; point = "{3, -.5}"; },
{element = LINETO; point = "{3, .5}"; },
{element = LINETO; point = "{4.5, .5}"; },
{element = LINETO; point = "{4.5, 2}"; },
{element = LINETO; point = "{5.5, 2}"; },
{element = LINETO; point = "{5.5, .5}"; },
{element = LINETO; point = "{7, .5}"; },
{element = LINETO; point = "{7, -.5}"; },
{element = LINETO; point = "{5.5, -.5}"; },
{element = LINETO; point = "{5.5, -2}"; },
{element = LINETO; point = "{4.5, -2}"; },
{element = LINETO; point = "{4.5, -.5}"; },
{element = CLOSE; }
);
};
Width = 8;
},

Now - is there any way to combine a filled shape with a non-filled shape? I'd like to fill in the plus sign.


All times are GMT -8. The time now is 05:26 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.