Vector graphics formats

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
FrankR
Posts: 28
Joined: Mon Apr 10, 2006 2:10 pm

Vector graphics formats

Post by FrankR » Mon Apr 30, 2012 2:07 pm

I'm having difficulty finding out what is available to me from LiveCode for vector graphics.
I am new to LC, but I am an experienced programmer. We are going to build something needing
sizable vector graphics. Can the graphics artist develop them using the tool of her choice, or must
we develop them inside LiveCode? Please tell me what options are available. Thank you.

Frank

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Vector graphics formats

Post by Klaus » Mon Apr 30, 2012 3:01 pm

Hi Frank,

sorry, you might need to use LiveCodes internal (poor) drawing capabilities!
External vector formats (AI, EPS etc..) are not supported

Here are some stacks that handle importing "vector" data (check everything that stats with "Bezier", "EPS" and "SVG"):
http://andregarzia.on-rev.com/alejandro/stacks/

But they are experimental and might not work with ALL files you try!


Best

Klaus

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1236
Joined: Sat Apr 08, 2006 1:10 pm
Location: Zurich
Contact:

Re: Vector graphics formats

Post by BvG » Mon Apr 30, 2012 4:02 pm

if you use a vector input, it's best to go with the points of one or several graphics who'se style is set to "line" or "polygon". Note that every point you add is almost as if you add a new object, and large "polygon" style graphics that have their markers set are especially bad in that. So you are limited in the amount of points you can actually set in a sensible time, and might experience slowdown when you resize them (for example if you implement a fake zoom feature).

My experience is that for animation the maximum points is at the high 10'000 end with markers, while static images can go into the 100'000 points if no markers are used.

Note that the grid in LC has it's zero points at the topleft, and that you can use empty lines in the points to produce gaps.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

FrankR
Posts: 28
Joined: Mon Apr 10, 2006 2:10 pm

Re: Vector graphics formats

Post by FrankR » Mon Apr 30, 2012 4:25 pm

Thank you both.

The only reason we were talking about vector graphics was to be able to easily resize them without degradation.

Can I resize GIFs and PNGs fairly easily? In an early tutorial, I see everything on the stack/screen resizing
automatically - including controls - just by resizing the window. Will I still have that available with a non-vector
image?

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1236
Joined: Sat Apr 08, 2006 1:10 pm
Location: Zurich
Contact:

Re: Vector graphics formats

Post by BvG » Tue May 01, 2012 2:06 pm

yes, you can just import any image and resize it whenever and however you want. I suggest not to use the geometry manager, and code resizing yourself, as doing that allows for more control and less chances of surprises. For example:

Code: Select all

on resizeStack newX, newY --build in message
  set the rectangle of image 1 to 0,0,newX,newY
end resizeStack
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

Post Reply

Return to “Multimedia”