<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>
		<title>Cycling 74  &#187;  Topic: jtextlayout_set and overflowing</title>
		<atom:link href="http://cycling74.com/forums/topic/jtextlayout_set-and-overflowing/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/jtextlayout_set-and-overflowing/feed</link>
		<description></description>
		<pubDate>Wed, 19 Jun 2013 21:58:32 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/jtextlayout_set-and-overflowing/#post-58246</guid>
					<title><![CDATA[jtextlayout_set and overflowing]]></title>
					<link>http://cycling74.com/forums/topic/jtextlayout_set-and-overflowing/#post-58246</link>
					<pubDate>Sun, 31 Jul 2011 00:01:24 +0000</pubDate>
					<dc:creator>danieleghisi</dc:creator>

					<description>
						<![CDATA[
						<p>Hello,</p>
<p>I&#8217;m using jtextlayout_set (with no particular justification flag), setting the text rectangle to have a certain width and a certain height. </p>
<p>Yet, if I give &#8220;too much text&#8221;, the text overflows the given height, and continues adding lines on lines, whereas I&#8217;d like only to have text within the rectangle I have given (even though this won&#8217;t be the whole text).</p>
<p>Is there a way I achieve this? Or am I the only one having this issue?</p>
<p>Thanks,<br />
Daniele</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/jtextlayout_set-and-overflowing/#post-209270</guid>
					<title><![CDATA[Re: jtextlayout_set and overflowing]]></title>
					<link>http://cycling74.com/forums/topic/jtextlayout_set-and-overflowing/#post-209270</link>
					<pubDate>Sun, 31 Jul 2011 05:27:02 +0000</pubDate>
					<dc:creator>nicolas danet</dc:creator>

					<description>
						<![CDATA[
						<p>Hello,</p>
<p>Have you tried with JGRAPHICS_TEXTLAYOUT_USEELLIPSIS flag ?</p>
<p>For instance sample code :</p>
<pre><code>t_jgraphics_textlayout_flags flags = (t_jgraphics_textlayout_flags)
        (JGRAPHICS_TEXTLAYOUT_NOWRAP | JGRAPHICS_TEXTLAYOUT_USEELLIPSIS); 

...

jtextlayout_set (x->textLayers[i], textCell, font,
	x->textPosition[i],
	(rect.height - (fontSize + TEXT_CELL_SPACE)),
	(rect.width - k),
	fontSize,
	(t_jgraphics_text_justification) (JGRAPHICS_TEXT_JUSTIFICATION_LEFT), flags);</code></pre><p>HTH.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/jtextlayout_set-and-overflowing/#post-209271</guid>
					<title><![CDATA[Re: jtextlayout_set and overflowing]]></title>
					<link>http://cycling74.com/forums/topic/jtextlayout_set-and-overflowing/#post-209271</link>
					<pubDate>Fri, 05 Aug 2011 23:10:52 +0000</pubDate>
					<dc:creator>danieleghisi</dc:creator>

					<description>
						<![CDATA[
						<p>Hi vanille béchamel, thanks.</p>
<p>My problem is that JGRAPHICS_TEXTLAYOUT_USEELLIPSIS unfortunately automatically implies JGRAPHICS_TEXTLAYOUT_NOWRAP, so your code (I might be wrong) seems to be ok for 1-line-texts. </p>
<p>Can&#8217;t use ellipsis AND use multiple lines at the same time?<br />
And even if I can&#8217;t use proper ellipsis, I&#8217;d just like to have the text on multiple lines, but with no text painted outside the rectangle I give&#8230;</p>
<p>But maybe I misunderstood your suggestion?</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/jtextlayout_set-and-overflowing/#post-209272</guid>
					<title><![CDATA[Re: jtextlayout_set and overflowing]]></title>
					<link>http://cycling74.com/forums/topic/jtextlayout_set-and-overflowing/#post-209272</link>
					<pubDate>Sat, 06 Aug 2011 05:49:07 +0000</pubDate>
					<dc:creator>nicolas danet</dc:creator>

					<description>
						<![CDATA[
						<p>Hello, </p>
<p>i never used multiple lines, but after investigations, i think i see/have the problem ; i don&#8217;t know if it is a normal behaviour, text is paint outside the rect, you are right.</p>
<p> A way should to use multiple <code>jtextlayout</code> with ELLIPSIS flag, and manually cut the string according to <code>jtextlayout_measure</code> ; not very funny &#8230; </p>
<p>Anybody have a better suggestion ? I would be happy to know it.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/jtextlayout_set-and-overflowing/#post-209273</guid>
					<title><![CDATA[Re: jtextlayout_set and overflowing]]></title>
					<link>http://cycling74.com/forums/topic/jtextlayout_set-and-overflowing/#post-209273</link>
					<pubDate>Sat, 06 Aug 2011 10:50:41 +0000</pubDate>
					<dc:creator>danieleghisi</dc:creator>

					<description>
						<![CDATA[
						<p>Gosh! Cutting by hand the string is definitely possible, but not very funny.<br />
Firstly because the textfields automatically do what I need (but I cannot use a textfield): thus, I suppose there might be a chance to achieve it by API. Secondly because as a general principle, it would be advisable that nothing is drawn outside the given boxes (otherwise, there&#8217;s no real need to give a height to the box)&#8230;</p>
<p>If anybody has a suggestion, we would both be happy people then! :-)</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

