Menu

Any questions?

Rik Roots
2013-08-20
2013-12-06
  • Rik Roots

    Rik Roots - 2013-08-20

    If anyone has questions about Scrawl.js, or want to report bugs and glitches ... I'm more than happy to help. Post questions/bugs and stuff here and I'll answer them as quickly as I can.

    I'm also contactable on Twitter - @RikRoots

     
  • James Sheffer

    James Sheffer - 2013-12-04

    Hello-
    I'm new to using canvas and found scrawl via Stack Overflow.
    I have a project that matches a demo that was posted there (http://jsfiddle.net/KaliedaRik/VWFhb/). I imagine I'll be doing more and more using canvas and in all honesty was looking at some of the more popular frameworks out there (I guess more for "ease of mind", knowing I can expand my knowledge more without having to change frameworks later on and the "assumption" that they can do more). Your example, however, does exactly what I need (and most of the type of work I foresee in the future). You also have a long list of examples that are awesome!

    Most of the work I'll be doing with canvass will entail text manipulation on top of graphics (think allowing users to add text/logos to an existing image for print).
    The "Penguin" demo you posted on jsfiddle does almost exactly what I need - I especially like the immediate change of text when typing into the form text field!

    Just now learning about canvas (and being a neophyte in regards to javascripting), I have a few questions:

    1. I've seen where text added to a "text box" (scrawl.newPhrase) can "wrap" when it hit's the size limit(width) of the box size. Is there a way to do this (or a demo)?

    2. I haven't gotten to it yet but I assume I can create multiple "phrases" to use on top of an image in different locations by naming them differently, correct?

    Thank you for creating Scrawl and offering it to people like me!

     
  • Rik Roots

    Rik Roots - 2013-12-05

    Hi, James.

    Congratulations on being the first person ever to ask me a question about Scrawl.js!

    1. At the moment, automatic text wrapping is not part of Scrawl's core functionality. Multiline 'Phrase' sprites can be created by using the newline '\n' escape character within the sprite's text attribute where linebreaks are required. I do have some thoughts on how we could write a procedure for automating wrapping for a given width ... I'll make the experiment my next demo. and report back, 'kay?

    2. Yes. You can create as many (multiline) Phrase sprites as you need and stamp them on whichever cell you like. Each Phrase object will be stored at scrawl.sprite.PHRASENAME for easy access. Check out the Poetry Advent Calendar for an example of excessive use of Phrase sprites ... http://www.rikweb.org.uk/advent2013/

    Best wishes,

    Rik.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.