29. Text I

  • 26 views
Uploaded on

 

More in: Education , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
26
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. From last time… • Explored filters, blend modes, and masks! • Wrapped up PImage, Capture, and Movie
  • 2. Iteration 3 & Final • Your final project is 15% of your grade! • Judged independently of your iterations on the following aspects:! 1. Visceral: how does it look and feel? Polished, professional, pleasant?! 2. Functional: is the code clean? Are there bugs, or does it run smoothly?! 3. Reflective: is it fun? Does it give me information? Is it interesting and does it make me think?
  • 3. www.freemusicarchive.org
  • 4. CAP Text I
  • 5. Char’s & String’s • A char is a primitive type for a ‘character’ of text! char myChar = ‘a’; // only single characters • A String can be thought of as an array of char objects! String myStr = “hi!”; // a string of text println(myChar); println(myStr);
  • 6. Basic String Methods charAt(index) equals(“hey”) indexOf(“M”) length() substring(beginInd) OR substring(beginInd, endInd) toLowerCase() toUpperCase()
  • 7. String Manipulation join(list[], separator) split(str, delimiterString) splitTokens(str, delimitersString) trim(str) // removes white space from ends nf(num, digits) nfc() nfp() nfs() // comma, positive, space
  • 8. Display & Loading text(text,x,y) // draws given text to x, y PFont .vlw // font file extension loadFont() // loads existing .vlw createFont() // create a .vlw on the fly Create a vlw: Tools Menu, Create Font…
  • 9. Setting Attributes textFont() // sets the typeface textSize() // sets the size textAlign() // sets the alignment textLeading() // sets the line spacing
  • 10. Getting Attributes textWidth(str) // returns width of line .textAscent() // returns ascender height .textDescent() // returns descender height
  • 11. Text as Image
  • 12. For next time… • Reading: Shiffman, pp. 314–324 (Text II)! • Homework 5: posted online (Text as Image)! • Iteration 3: presentations about 1 week away