POV-Ray : Newsgroups : povray.animations : Rotating text around center? : Re: Rotating text around center? Server Time
28 Jul 2024 16:27:50 EDT (-0400)
  Re: Rotating text around center?  
From: TonyB
Date: 19 Jun 1999 10:13:56
Message: <376B9741.97DE5AD6@panama.phoenix.net>
If you're willing to try out the SuperPatch, then your problems are solved.

This is what you would write to center the text:

#declare String = text {ttf "yourfont.ttf", "yourstring", 2, 0}

object {String rotate whatever translate
-(min_extent(String)+max_extent(String))/2}

//or using my center() macro

#macro center(obj)
 translate -(min_extent(obj)+max_extent(obj))/2
#end

#declare String = ...

object {String rotate whatever center(String)}

It's just that simple. Go out and get that patch today!

--
Anthony L. Bennett
http://welcome.to/TonyB

Graphics rendered
by the Dreamachine.


Post a reply to this message

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