|
Author |
Topic: deprecated Bfont methods ?? (Read 320 times) |
|
Magwitch
|
deprecated Bfont methods ??
« on: Dec 5th, 2003, 3:31am » |
|
Have just stumbled across Processing (excellent stuff). I'm still learning by examining example code. This one might be more for arielm. Have tried running babel_fish_tower examples from http://www.chronotext.org - all apparently written using Processing. All run OK from browser but.. when copied into Sketch they don't compile due to unknown Bfont methods 'setSize' 'charWidth' 'drawChar' These do not appear to be custom methods by the author but default methods for Bfont. Are these deprecated methods ? Are the general methods textSize(), width() and text() the new equivalents ? Thanks
|
|
|
|
arielm
|
Re: deprecated Bfont methods ??
« Reply #1 on: Dec 5th, 2003, 12:58pm » |
|
yes, indeed the syntax has changed, mainly since version 060: http://proce55ing.net/discourse/yabb/board_BugFixes_action_disp_lay_num_1064682304.html - BFont.textSize() --> BFont.size() - BFont.stringWidth() and BFont.charWidth() --> BFont.width() and finally (since in some situations it's more effective to draw text char-by-char): - BFont.drawChar('a', 100, 50) --> BFont.text('a', 100, 50, g) (where g is a mysterious processing inner variable) concerning the typography sketches you're mentioning: i went over babel_fish_tower_3 and updated the code (to be posted soon at chronotext.org) it's on my todo list for a while to update the other pieces of code (all made with processing like you guessed...) let me know if you need some more help, a
|
« Last Edit: Dec 5th, 2003, 1:11pm by arielm » |
|
Ariel Malka | www.chronotext.org
|
|
|
|