| Insert image as shape [message #1006590] |
Thu, 31 January 2013 22:27  |
Emerson Simbolon Messages: 12 Registered: April 2012 |
Junior Member |
|
|
Hi all, I wonder whether Graphiti supports custom image as shape or not. I want to create components arrangement. Each component already has its own image defined. So, what I need is to arrange those image in Graphiti editor.
Thanks in advance.
Emerson
|
|
|
|
|
|
| Re: Insert image as shape [message #1009976 is a reply to message #1009724] |
Sat, 16 February 2013 01:00   |
Emerson Simbolon Messages: 12 Registered: April 2012 |
Junior Member |
|
|

What I want to achieve is described by picture above. I try to add image instance like this:
Image image = gaService.createImage(containerShape, GraphBTImageProvider.IMG_EREFERENCE);
But nothing happens, even the green box was not drawn. However, I tried to apply the registered image id (GraphBTImageProvider.IMG_EREFERENCE) to a ContextButton and it appeared. I think, the tutorial is not what I looking for (but still essential), or maybe I am mistaken something in using the registered image to a pictogram element.
[Updated on: Sat, 16 February 2013 01:04] Report message to a moderator
|
|
|
|
| Re: Insert image as shape [message #1012018 is a reply to message #1011979] |
Wed, 20 February 2013 12:54   |
Emerson Simbolon Messages: 12 Registered: April 2012 |
Junior Member |
|
|
Thanks Michael, now it works 
However, to make sure I will use the feature, I want to ask, can I add/register the picture at run time. E.g, user just added a picture through a form, then, he opens the Graphiti editor. At that time, the picture shows up in the palette, ready to be included in the canvas. If this is not possible, maybe I will code the feature myself. But, if it is possible, I'll worship Graphiti for make me save my precious hours.
Thanks as always.
Emerson
|
|
|
| Re: Insert image as shape [message #1012910 is a reply to message #1012018] |
Fri, 22 February 2013 07:50  |
Michael Wenz Messages: 1270 Registered: July 2009 Location: Walldorf, Germany |
Senior Member |
|
|
Emerson,
basically, the image provider manages a hash map containing ids and paths
for your images. You should be able to call addImageFilePath also after the
user added the picture. What you would need to care about yourself would be
removal of images in case you want to support that as well.
Michael
|
|
|
Powered by
FUDForum. Page generated in 0.07351 seconds