2011-06-12 14:04:25 -04:00
<!DOCTYPE html>
< html >
< head >
2011-08-01 07:05:06 -04:00
< meta charset = "UTF-8" >
2011-06-12 14:04:25 -04:00
< title > ParagraphStyle< / title >
< base target = "classFrame" >
< link rel = "stylesheet" href = "../resources/css/reference.css" type = "text/css" >
< link rel = "stylesheet" href = "../resources/css/style.css" type = "text/css" >
< link rel = "stylesheet" href = "../resources/css/paperscript.css" type = "text/css" >
< link rel = "stylesheet" href = "../resources/css/codemirror.css" type = "text/css" >
< script src = "../resources/js/bootstrap.js" type = "text/javascript" > < / script >
< script src = "../resources/js/paper.js" type = "text/javascript" > < / script >
< script src = "../resources/js/codemirror.js" type = "text/javascript" > < / script >
< script src = "../resources/js/reference.js" type = "text/javascript" > < / script >
< / head >
< body class = "reference" >
< div class = "reference-class" >
< h1 > ParagraphStyle< / h1 >
< p > The ParagraphStyle object represents the paragraph style of a text
item (< a href = "../classes/TextItem.html#paragraphstyle" > < tt > textItem.paragraphStyle< / tt > < / a > ).< / p >
< p > Currently, the ParagraphStyle object may seem a bit empty, with just the
< a href = "../classes/ParagraphStyle.html#justification" onclick = "return toggleMember('justification', true);" > < tt > justification< / tt > < / a > property. Yet, we have lots in store for Paper.js
when it comes to typography. Please stay tuned.< / p >
2011-06-22 19:02:40 -04:00
< p >
< b > Example< / b >
< / p >
< pre class = "code" > var text = new PointText(new Point(0,0));
2011-06-12 14:04:25 -04:00
text.fillColor = 'black';
text.content = 'Hello world.';
2011-06-22 19:02:40 -04:00
text.paragraphStyle.justification = 'center';< / pre >
2011-06-17 06:41:47 -04:00
2011-06-12 14:04:25 -04:00
< / div >
< div class = "reference-members" > < h2 > Properties< / h2 >
< div id = "justification-member" class = "member" >
< div id = "justification-link" class = "member-link" >
< a name = "justification" href = "#" onClick = "return toggleMember('justification', false);" > < tt > < b > justification< / b > < / tt > < / a >
< / div >
< div id = "justification-description" class = "member-description hidden" >
< div class = "member-header" >
< div class = "member-title" >
< div class = "member-link" >
< a href = "#" onClick = "return toggleMember('justification', false);" > < tt > < b > justification< / b > < / tt > < / a >
< / div >
< / div >
< div class = "member-close" > < input type = "button" value = "Close" onClick = "toggleMember('justification', false);" > < / div >
< div class = "clear" > < / div >
< / div >
< div class = "member-text" >
< p > The justification of the paragraph.< / p >
< ul > < b > Default:< / b >
< li >
< tt > 'left'< / tt >
< / li >
< / ul >
< ul > < b > Type:< / b >
< li >
2011-06-17 06:41:47 -04:00
< tt > String('left', 'right', 'center')< / tt >
2011-06-12 14:04:25 -04:00
< / li >
< / ul >
< / div >
< / div >
< / div >
< / div >
<!-- =========================== copyright notice ========================= -->
2011-06-17 06:41:47 -04:00
< p class = "footer" > Copyright © 2011 < a href = "http://www.lehni.org" target = "_blank" > Jü rg Lehni< / a > & < a href = "http://www.jonathanpuckey.com" target = "_blank" > Jonathan Puckey< / a > . All Rights Reserved.< / p >
< div class = "content-end" > < / div >
2011-06-12 14:04:25 -04:00
< / body >