realbasic-nug
[Top] [All Lists]

Re: Drawing string in Canvas

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Drawing string in Canvas
From: Jan Erik Moström <lists at mostrom dot pp dot se>
Date: Sun, 1 Aug 2004 00:07:21 +0200
Delivered-to: realbasic-nug at lists dot realsoftware dot com
On 2004-07-31 22:45, tjmac at tolisgroup dot com wrote:

> You'll need to add your line height to the current y value if the text
lines 
> are to be in normal paragraph layout.  However, your comment about the "two 
> columns" implies that you really meant the x value.  If that is the case, 
> decide where you want the column split to occur and set the new x value to 
> this number.

No I mean the vertical position, I want to write a number of string pairs
like this

pair1_a         pair1_b
pair2_a         pair2_b pair2_b pair2_b pair2_b pair2_b 
                pair2_b pair2_b pair2_b pair2_b pair2_b 
                pair2_b pair2_b pair2_b pair2_b pair2_b
pair3_a         pair3_b pair3_b pair3_b pair3_b pair3_b
                pair3_b pair3_b pair3_b pair3_b

I can easily add the height when each of the pairs is one line only (pair1)
but if I have a string that is more than one line (most common case) it seems
sensible to use the string width to get the text formatted like in pair2_b
but when I want to write pair3 I need to know the vertical position. And I
can't figure out where I can get it after having used the string width.

I'm sure there is somewhere I can find this out (because otherwise I have to
write a duplicate of the formatting in drawstring just figure out the height
... and it seems silly) but I can't find it.


                jem
-- 
Jan Erik Moström   www.mostrom.pp.se
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>