POV-Ray : Newsgroups : povray.unofficial.patches : Text object alignment patch Server Time
2 Nov 2024 13:20:54 EDT (-0400)
  Text object alignment patch (Message 1 to 3 of 3)  
From: Chris Huff
Subject: Text object alignment patch
Date: 6 Nov 1999 19:03:46
Message: <3824C282.7D6BD943@compuserve.com>
I think I remember hearing about someone who made a patch which allowed
you to align the text object.(left, right, center, etc) Does anyone else
know about this?
I have just done a patch which adds the keywords align_left,
align_right, and align_center. I could post the source if anyone is
interested.(all it required was the three tokens in PARSE.H and
TOKENIZE.C, and a short bit of code in PARSE.C)

Oh, and I do know about min_extent and max_extent. :-) They can be used
to do the same thing, but I think it is nice to have this kind of thing
built into the text object.


Post a reply to this message

From: TonyB
Subject: Re: Text object alignment patch
Date: 6 Nov 1999 19:11:00
Message: <3824c394@news.povray.org>
There's just no end to the ammount of stuff you can add to POV, huh? This is
great. Now I won't have to use my center() macro on text anymore... so much
less typing... and now left and right? Phew! This is good. How about
'justified'? ;)


Post a reply to this message

From: Chris Huff
Subject: Re: Text object alignment patch
Date: 18 Nov 1999 06:56:56
Message: <3833EA39.39198360@compuserve.com>
I just found some information about that other text alignment patch. It
was written by Jamis Buck and Noel Bundy, and is included in the
Smellenbergh Unofficial version(which is Mac only).
Their syntax uses the keyword position followed by a number:
0 - default (left justified)
1 - centered
2 - right justified
So you would add "position 1" to center the object.

I personally like my syntax better, but there are probably people
already using their patch. The syntax for my latest version:
align_left FLOAT_PAGE_WIDTH
align_center FLOAT_PAGE_WIDTH
align_right FLOAT_PAGE_WIDTH

FLOAT_PAGE_WIDTH is optional, and specifies the width of the "page" that
the text object is
aligned to. The page is actually just a boundary along the x-axis to
align the text object against. The patch does not protect against having
the text object run off the edge of the page
.
With align_center, FLOAT_PAGE_WIDTH does nothing, the text object is
centered on the x-axis.
With align_left, the left edge of the text object is aligned with the
left edge of the page. If the page width is unspecified, the right edge
of the object is aligned with x=0.
With align_right, the right edge of the text object is aligned with the
right edge of the page. If the page width is unspecified, the left edge
of the object is aligned with x=0.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.