Posted on by

Note: Graphics 2.0 is now in public beta for all Corona SDK Pro and Enterprise subscribers. Please see Walter’s recent blog piece on the news.

rounded rect with image fill

One of our goals with the new graphics engine is to enable vector graphics in Corona. We’re aiming for Illustrator-level capabilities that are going to give you a new level of expressiveness in app development.

Things get incredibly interesting when you can seamlessly combine vector capabilities and raster imaging features together.

To give you an idea, one thing we’re doing is letting you place images inside vector shapes. To do that we’re adding a new ‘fill’ property to shape objects that lets you easily specify the fill image via a table. Here’s a rounded rectangle with our trusty Fishies background image inside it:

local x,y=display.contentCenterX, display.contentCenterY
local bkgd = display.newRoundedRect( x, y, 160, 160, 20 )
bkgd.fill = { type="image", filename="aquariumbackgroundIPhone.jpg" }
bkgd.strokeWidth = 10
bkgd:setStrokeColor( 255, 255, 0 )

Posted by . Thanks for reading...

29 Responses to “Corona Weekly Update: Vector graphics teaser”

  1. Jacques

    Finally, I just hope it’s not only for standard boxes and such, should at least be for any shape of closed vector shape. And a standard colour fill on these polygon vectors would be appreciated too.

  2. Kerem


    Any updates on the bug-fix focus you blogged about couple weeks ago? We are still struggling with numerous widget bugs and the teasers about Graphics 2.0 are really flying over my head. The only thing I really hope graphics 2.0 will give us is automatic dynamic runtime masking for the widgets. The rest is all fluff to me until key issues with existing Corona SDK functionality are resolved.

    Please get the widget fixes done once and for all. This is all too painful.

    Thank you,

      • Kerem


        Thanks for your kind reply. I read the daily build summaries religiously. As a matter of fact, I go there at least 2 – 3 times a day waiting for my next ‘fix’! :-)

        It would be great if the bug reporting system had a view for us developers to see what is in the queue and what priority has been allocated etc. Not trying to mess with how you do your work but not knowing what will get fixed when is affecting the planning process for many of us. Do you think you might consider opening up the bug reporting queue for registered developer read-only access?

        Thanks & best regards,

  3. alexf


    Are there specific problems you run into with the widget framework? Could you please post a thread with them at the widget forum so that i can have a look at the issues? Or did you already submit case reports with them, in which case please start a thread and let’s continue the conversation there…


  4. krystian

    I wish I could test that :)
    I’ve signed for beta over a month ago but still no response ;)

    This seems like a killer feature! Finally, vector graphics!

  5. Wilson

    Is this feature beneficial to building a tiled-map engine? I really hope so.

  6. Chris Leyton

    @Wilson – I’m intrigued by what else you need for a Tiled-Map engine that isn’t already here? Have you seen Dyson’s awe-inspiring work on MTE? The finest bit of code I’ve seen from Corona.

  7. Mark

    Will SVG files be supported then? Drawing vectors by hand in code will be a pain…:) That or a Corona “paint” program would be cool.

    • Tony

      Am also hoping to see SVG support added, as this would save me a bunch of space and would make graphics cleaner.

  8. LB

    Walter, great to hear touch-event-capable irregular-shape hot spots will be available. How many points are allowed to define the perimeter for each custom polygon?

  9. Mark

    Is there any way you can solidify the naming conventions in the future?
    E.g., setStrokeWidth() and setStrokeColor()

    Or is there a specific reason why you differentiate the two?
    Thanks !

  10. greg

    Hi Walter,

    I’ve currently got to re-address my whole approach for graphics usage (texture memory & size of app) for my scrolling game. I’ve posted a question here asking for clarification:

    Q1 – Will the new Vector Graphics version potentially affect my whole approach? That is, for scrolling games that are say 3-6 screens wide, will we be able define the boundaries for ground/earth (for tunnels) via point and get Corona to put in a nice “pattern” to fill?

    Q2 – Any support for Photoshop to export shapes from here so you can copy/paste it directly into a LUA file?

  11. Yew Chong

    will this be fixed?

    •Currently display.newLine() objects do not support touch events (case #3803).


Leave a Reply

  • (Will Not Be Published)