POV-Ray : Newsgroups : povray.unofficial.patches : Updated patch source available : Re: Updated patch source available Server Time
2 Sep 2024 16:22:13 EDT (-0400)
  Re: Updated patch source available  
From: Chris Huff
Date: 9 Nov 1999 07:35:03
Message: <3828158C.10219C7C@compuserve.com>
I forgot about another feature I added. :-)
I have added text object alignment to the text object. To use it, place
one of these keywords after the text string:
align_left FLOAT_PAGE_WIDTH
align_center FLOAT_PAGE_WIDTH
align_right FLOAT_PAGE_WIDTH

FLOAT_PAGE_WIDTH is 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 is optional and does nothing.
With align_left, the left edge of the text object is aligned with the
left edge of the page.
With align_right, the right edge of the text object is aligned with the
left edge of the page.

In a future release, I will make FLOAT_PAGE_WIDTH optional for all
three, if it is not present, the width of the text object will be used
for the page width. I may someday add line wrapping, but I will have to
study the source more closely.

BTW, do you think it would be useful to have an "auto_center" keyword
which centers the object over the origin? It would take an optional
vector parameter, so auto_center y would center it along the y-axis, and
so on. This would make it easier to understand the code later than
declaring the object and using min_extent and max_extent, but it is
quite easy to do with those keywords, and might be better done as a
macro than a patch.


Post a reply to this message

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