Found an OfficeDraw file with shapes. Can the shapes be used without continuous copy-and-paste? - shapes

I downloaded an OpenOffice Draw document with shapes I want to use (for drawing Apache Camel diagrams). I'm not very familiar with Draw, but I've used Visio; in Visio, there was a kind of file in which you could find/put shapes, then use to create drawings from those shapes. The shapes appeared in a panel left of and smaller than the drawing, and you could drag a shape from that panel to the drawing to put an instance of that shape on your drawing; the original shape remained on the smaller panel.
I think Visio called the file that held the shapes you could use a "template"; Draw has templates, but I haven't found a reference to them holding shapes to drag onto a drawing. I've tried looking it up, but am hampered by not knowing what terms Draw uses for these things. Can someone tell me whether this is possible in Draw, and what things I should look up help on? I hate to read a whole manual to find out how to use one feature, without even knowing if the feature exists...
--
I'm sorry, I should have done better describing what I have tried. The file holding the shapes is an odg file; it opens fine as a document, and the program allows me to save it as a template, but the behavior of being a collection of shapes that I can drag onto a new drawing repeatedly, without having to copy a shape each time, is not there. That's the feature I'm trying to find.

My version (LO 5.2.3.3/openSuse) allows the creation of a new shape gallery theme (see: View>Clipart Gallery), and the addition of various graphic format files to that theme.
Also, in context meni of a shape, I can edit with external program.
So, I guess, you can save the shape(s) in a file and add it to My Shapes theme.
There will be two new files in ~/.config/libreoffice/5/user/gallery with the shape(s), to backup/restore (to a new installation) or distribution (to other computers).
Edit if your version of the office suite is lacking of that menu options, maybe you can extract the shapes from the *.odg file: unzip it and look for a custom *.sdv and *.thm file in the archive.

Related

Picture Transparency Object in PowerPoint VBA

PowerPoint added native capability for picture transparency (without having to create a shape) in late 2018. See that linked article to see what I mean.
I'm trying to figure out what/if an appropriate VBA object exists for it (there's not much online since it's a fairly new feature). I've tried the traditional FillFormat.Transparency object, as well as a few other analogous attempts. (Basically, have been searching the VBA documentation up and down for an hour or two).
Any thoughts?
Currently, there is no way to set the Picture Transparency directly (without using a Shape Fill). You would notice that the Shape properties are arranged somewhat as it appears on the Picture Tools Pane. For example, the Picture settings are on the last tab (where you have Picture Corrections, Color, Transparency and Crop). These are all accessible with the Shape.PictureFormat object. (The .FillFormat is only applicable when you are filling a shape).
You will notice the .PictureFormat has Properties relating to the aforementioned settings, except for Picture Transparency. The .PictureFormat.TransparencyColor cannot be used to set the degree of transparency.
The PowerPoint VBA object model often lags well behind new features that appear in the user interface, so there's nothing available yet to do what you want.
Just a note, when it appears, transparency will be a property, not an object. The current TransparencyColor and TransparentBackground properties are for the old routine that creates a single picture color that is 100% transparent.

Placing a bitmap into a Powerpoint Add-In

All:
I am writing a PowerPoint add-in that will allow a user to drop specific safety related images onto a map. I've written the code that copies the images and places them on the slide and I would like to place it into an add-in. Unfortunately, I cannot find a way to either:
a) place the images into the add-in
b) reference images if I were able to place them in the add-in
The alternative approach is to require the user to start with a special template that includes all of the images and then load the add-in to get the menu functionality. I would much rather have a single file that contains both the code and bitmap images.
With best regards,
Walt
PPA files contain only code, not presentation content like images. As an alternative, you could distribute a PPT/PPTX that you open invisibly and extract the image you need.
After quite a bit of looking around I found a solution that resolves the problem adequately. Using Microsoft's Custom UI Editor, I created an XML entry in the PowerPoint Presentation that performs the Auto_Open function that would have been part of the Add-In. This allows me to add the menu functions that will be responsible for loading the specific images.
I've added a reference page at the beginning of the presentation that contains instructions on how to use the template... This page also contains all of the images that are used by the visual basic code. The 'Visible' flag on these images are set to False so the user does not see them. As they are copied from the reference page into the presentation, the Visible flag is set to True and they are pasted onto the current slide.
It is not a perfect solution, but it is adequate...

How to get the path coordinates of a shape for use with image-maps?

I am creating an image map using ImageMapster from here.
I have created a photoshop image with several images that I have cut out from the original photographs. Each image is on a separate layer.
Now, I need to get the path coordinates of each object, and I don't want to hover over every corner and manually write down each coordinate.
Is there an automated way to get this path?
Maybe there is some application or web service whence I can send my image and get the path in return?
I have tried exporting each layer separately and then importing them into illustrator and vectorizing the shape (it keeps the shape in its original position), but I can't figure out how to get the coordinate path as text. I can export it to svg, but that isn't the same simple code needed for the css image map.
Ah! After googling image-map, much thanks to Sven for the idea (he got my +1), I found this thread here on Stack Overflow.
So here is my process.
Prepare the image in Photoshop with each object on a separate layer with a transparent background (this will make it easy for you when you do the tracing).
Save your photoshop file.
Open the Photoshop file in Illustrator using File...Open (works in CS4 and CS5) and make sure to allow the option to import Photoshop's layers as separate objects. After you open the file, make sure NOT to move any of the objects around - you need them to be in the exact same place as they were in the photoshop file so they can superimpose each other when rendered to the imagemap.
Use the Live Trace with custom settings. Use the black & white mode with the threshold all the up (255). This will produce a black silhouette of the shape. (You can also use "ignore white"). Push the Trace button. If you have many layers, you can save this new tracing pattern as a preset - I called mine, Silhouette. Now, I just click on a layer and choose Silhouette from the tracing buttons' dropdown menu.
Expand the shape and make sure it consists of only a single flat shape:
you can use the blob brush in illustrator to blacken over any unwanted white areas
no groups
no compound shapes (or it won't work) - which means you can't create cutouts.
You can tell the shapes are right when you click on them - you should be able to see the path itself with no "other" shapes involved (perhaps the blob brush additions) - just a single path. An easy method is this:
select the shape
ungroup if necessary
release compound path
unite (shape mode merges all shapes into one)
Don't crop your image - you want your shape to be in the same place in the image's area as in your original photoshop image.
Don't join all the shapes together, either.
The shapes should all be individual whole shapes, all in their original locations, each on a separate layer.
Now, open Illustrator's Attributes panel, and make sure to "show options".
Select your shape and in the "Attributes" panel, switch the "Image Map" combo box from None to Polygon. Make sure to add a url (it doesn't matter what you put; you can change it later - I just put "#" and the name of the shape so I can tell which one it belongs to in the image map code)
Do this for each of the objects.
Now, in the File menu, go to "Save for Web and Devices". Skip all the settings here and just push "Save".
In the "Save As" (the title of the window is "Save Optimized As") dialogue box, use "Save As type:" and select HTML Only(*.html) if you just want the code, or HTML and Images if you want the sillouhuette, too (they will appear in a folder called "images") - and note your save location.
Now go open that html file in notepad!
Voila! All the shapes will be rendered for you as a pre-made image-map - points path and even html code. Here is what it looks like when you open in notepad the html file you just created: For this demo, I chose a particularly complicated image - one which you would never want to estimate by hand, nor have to do twice!
Don't forget to place the actual image file somewhere in your site's images folder. You can save the psd file for later and add more "stuff" if you want, and repeat the process.
I was able to create the image map this way for my photoshop picture in just a brief couple of minutes. After you do it once, it gets easier for next time.
This has been bugging me for so long and I don't have Illustrator to be able to use the solution proposed by BGM, that I created my own Photoshop addon.
You can get it here: https://creative.adobe.com/addons/products/2389
It writes all your paths' points' coordinates to a text file.
Should work for CS6 and above.
The way I use it is I create a marquee, right click -> make work path, rename my path, [repeat], then just export coords via my addon.
If anyone's interested in the scripts behind it, you can have a look here: http://pastebin.com/8ugcAV3j
In case you make any improvements, please post them here so that other people may use them as well.
Hope this helps someone.
EDIT: added link to source script (was only in comments before)
I used this to find the co-ordinates of the outline of a shape to make image hotspots for links in dreamweaver. If you have something else in mind, then you'll have to ignore some of it. This works on a single layer so you may want to make a "flattened copy first", but I don't see why it wouldn't work on a multi layered image.
Use wand to highlight area you want. This will be different for different images.
Right click and hit Make Work Path. Use a suitable tollerance which is found by trial and error. I just use the most sensitive.
Do this for all areas in all of your images creating separate paths for each.
Click edit then export paths to illustrator and save file in sensible place.
Open the saved file in word. Ignore the bumf the the top and use replace to remove ALL LETTERS. Don’t worry about the paragraph characters.
Note that all of the work paths are exported in the same file separated by a blank line so must copied and pasted separately to be used for each hotspot.
After inserting your image. Start making a map in dreamweaver with a couple of co-ordinates then simply replace these in the with information from the illustrator file for each of the map areas to be produced.
I add my updated answer I had to find since adobe has eliminated HTML output in many instances, I work mostly with photoshop (CS4) and this is a perfect solution:
1) download following file: https://github.com/andyhawkes/ps-paths-to-imagemap
2) open your image in photoshop and select the form with the magic wand
3) right click and select 'make work path' (the lesser the px, to more accurate)
4) go to File -> Scripts -> Browse ... and select the script from the first step
that's it !! this script will open your texteditor with the coordinates ...
Something like this may be useful;
http://code.google.com/p/imagemap/
Copy your image into position, then plot.
creating an image map is really simple.
First we need to look at the syntax of the code
Let's create a div.If we want to position it at the right side of our page,we can just begin by writing
<div align="right">
After that, we import the image that we are gonna map.
<img src="" alt="" width="" height="" usemap="#nameofmap" />
Now we have to define the map structure.First lets assume that you want a rectangular portion of an image to act like a hyperlink.
<map name="nameofmap">
<area href="wherever I wanna take that.com" alt="" title=""
shape=rect coords="A,B,C,D"></map>
Now we close the div.
</div>
If the shape is circular,we use the syntax
shape=circle coords="x,y,radius"
If shape is polygonal, we use
**shape=poly coords="a,b,c,d,e,f,gh"
Now comes the big part:How to find the image map coords.
Very simple.Go to
http://www.image-maps.com
Browse your image file,click "Start Mapping your image",then you proceed, and then on the next page,click "Import Old mapping Code" on the right.then you get the coords.
After that, you can use FIREBUG to change the coords according to your specifications,because image-maps only hyperlinks the whole image,so use firebug to change the coords and adjust according to your requirements.
Have fun.

Is there a quick way to change the underlying image in a .snag Snagit file?

I'm using Snagit for user guide screenshots. (New to it, but so far it's great!). I save the screenshot as a layered .snag file, then export .png files for putting into the document. The layers in the .snag file consist of the underlying raster image (the background) plus a layer of annotations and callouts on top.
Doing it this way lets me move and edit the annotations and callouts with ease, then export a replacement .png file. But what if I have a bunch of callouts on a screenshot and the screen itself changes?
Is there a way to replace the raster layer (background) with a new one, while keeping the callouts in place, so I don't have to create a new .snag file? (I want to avoid copying and pasting the callouts from the existing file into a newly created one...)
Thx!
Yes, that is possible, as long as your annotations and callouts are still vector objects. Here's what you need to do:
Delete the existing screenshot.
Make a new screenshot and paste it into the snag file.
Select the screenshot and use the Send to Back function to move it to the bottom layer.
If required, adjust the positions of your annotations.

Is it possible to reference a photoshop file or layer comp from within another photoshop file?

Creating all the art for a large website often involves a couple dozen 50+mb photoshop files. Frequently, a given module may appear in more than one file.
Is there a way to reference an oft-used module from another file?
For instance -
"site-section-2.psd" references "common-module-h.psd", and "site-section-6.psd" also references "common-module-h.psd", so that any time updates are made to "common-module-h.psd", the updates appear in both files which reference it.
Possible?
(maybe with photoshop javascript?)
I've checked the JSX Photoshop Object Model, and you can access LayerComps, but there is no magic function to save from one file to another. Something like this could be written to disk, from file1.psd for example, then loaded into file2.psd.
It's a bit of a long shot and I don't know if it's worth the trouble.
For web prototyping I use Fireworks and and I'm pretty happy. You can easily create symbols (much like in Flash and Illustrator) and even save them to a Common Library, which means it will be easy peasy to keep your navigation items for example up to date, for all the files using it. You can even import PSD files into Fireworks, only not all the filters will be supported.
Don't know if you can keep most of the eye-candy in Photoshop and then assemble reamble versions with ease using Fireworks.
You can try converting all the layers into one smart object and then drag the smart object layer into the new .psd file.
Go to the Layers palette: Window > Layers(F7).
LMB SINGLE CLICK the top layer.
Scroll down Layer palette until you get to the bottom.
SHIFT + LMB SINGLE CLICK. At this point all the layers should be hilighted.
RMB SINGLE CLICK any of Layer "Titles".
You should see a menu pop up so use the mouse to scroll until you find "Convert to Smart Object". LMB SINGLE CLICK to convert all the layers into one smart object. The smart object can be edited by double clicking it in the Layers palette. You can also drag a smart object from one .PSD into another .PSD. I usually just open both .PSD files and drag the smart object form one Layers palette to the other Layers palette.