Me n My Programming

If Only I Have TIme

Marama Code 108 ~ How to create a marama shape from code

I know that we can create shape by just using the drag n drop facilities in marama. But this code is use (mostly for programmer) to create a shape whenever an event is invoke (like load file, create shape based on it). Here are the snippets:

final MaramaShape stateShape = createNewShape(shapeType, 100, 100, 150, 150); // this create the shape
stateShape.setPropertyValue(“name”, shapeName); // this set the shape name property

You can set more property using setPropertyValue method. Just make sure you have the right shape.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


This entry was posted on August 19, 2010 by in Life on Marama.
%d bloggers like this: