Graphics.drawGraphicsData() method but we are not able to query the graphic data from an existing DisplayObject. If we had a method like Graphics.getGraphicsData(), we would be able to very easily extract at runtime data from vectors drawn in the IDE or programatically and do whatever we want with it.

I am thinking about three things especially :

  • Inject graphics data in a PDF with some parsing (Flash Player Graphics Data to SVG for instance). Even if SVG specification does not contain all the drawing api Flash Player features, these would be some good first steps. This would be the dreaming feature for AlivePDF. What would be more than awesome would be an Adobe Reader FXG compatible but this is another topic.
  • This way we could also store easily a DisplayObject anywehere (database, shared object, etc.).
  • Developers would be able to manipulate any vectors drawn by designers on the timeline much more easily and interact with them.

Come on guys ! We raised our voice for FileReference, if you would be happy having such a feature, vote for it !

Comments (9)

  1. sakri wrote::

    Would be really cool if this would extract vector data from text characters!

    Thursday, August 28, 2008 at 1:32 pm #
  2. Tek wrote::

    I vote for this feature!

    I often use “print as PDF” from Flash to get vector results of what I have displayed on the screen. Many vector information are available (many aren’t too, as effects, bitmapdata, etc…).

    A way to have all those vector information at runtime would be great. Good idea to ask for Thibault, many thanks from the community.

    Are you sure that the key feature of Graphics.drawGraphicsData() is not that vector are rendered immediately (to bitmap so) and that it cannot be accessed as vector anymore ?

    This can be implemented elsewhere and differently anyway.

    Thursday, August 28, 2008 at 2:23 pm #
  3. Thibault Imbert wrote::

    Hi Tek,

    The idea behin Graphics.drawGraphicsData() is to simplify drawing operations. As soon as you pass a vector full of IGraphicsData objects you then have your Shape object created.

    The key is that if you did not saved the data you used to create it, you will not be able to retrieve them. More than that, having such a feature would allow us to retrieve graphics data from existing Displayobject’s created in the IDE.

    Thibault

    Thursday, August 28, 2008 at 4:46 pm #
  4. jeanphilippe wrote::

    Hi Thibault,
    What do you mean really by Query Graphics Data ?
    Are you thinking about FXG 1.0 graphic format like in Flex 4 ?
    JP

    Friday, August 29, 2008 at 7:48 am #
  5. ynk wrote::

    Hi there

    it might be optimized and may need a rebuild, but i’m currently working on some classes which allows people to play with curves, just as u said. Feel free to contact me if u wanna know more about :)

    Friday, August 29, 2008 at 11:56 am #
  6. mama wrote::

    getGraphicsData() is certainly one of the things I’m really waiting since a long time. At the moment, it’s impossible to simply change the color of a shape or a stroke, with this method it could be possible.
    But if it is added in Flash player 11, it’s really important that the shapes and stroke are considered as independants in the swf as in the IDE and not as a big an unique shape that we cannot use.

    Friday, September 5, 2008 at 1:51 pm #
  7. Pedro wrote::

    Certainly a very good idea. I wonted this feature since when i started using flash 2 years ago. I still often have problems to draw things with as3, would be nice to just click “copy drawing to as3″ or sth similar.

    Monday, November 3, 2008 at 10:16 pm #
  8. personman wrote::

    If nothing else, I would like to see some Cubic Bezier curve support. What’s two more parameters to the curveTo() method?

    Friday, June 19, 2009 at 11:32 pm #
  9. Dave wrote::

    I second that… the lack of cubic bezier support is a huge thorn in the side of developers.

    Thursday, December 24, 2009 at 6:00 pm #