Results 1 to 2 of 2

Thread: Draw pictures with getCommandsFromString()

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    May 2011
    Vote Rating

  2. I will need to verify (I didn't write that sample), but I'm pretty sure this is a SVG path. The getCommandsFromString private method parses out this string as SVG would, and turns it into a PathSprite that can be drawn in either SVG or VML. This idea can be used to generate SVG paths in your preferred vector graphics program, and have them display consistently in all browsers.

    This doesn't support full SVG xml, just the path spec. But yes, using this you can draw your own paths in a cross browser way. This would be especially handy for graphics that must be scalable, or are very simple to represent as SVG but need to draw large. Beyond that, you may find it easier to build an image file and display that in your app (either using ImageResource to process the file in your codebase, or with a String url from elsewhere in your app).

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts