POV-Ray : Newsgroups : povray.general : Centring a text object declaring a directive : Centring a text object declaring a directive Server Time
29 Feb 2024 22:26:58 EST (-0500)
  Centring a text object declaring a directive  
From: Kima
Date: 19 Apr 2023 07:40:00
Message: <web.643fd2662f53e92c65103170d427f3e5@news.povray.org>
I align a text object as

local MyText=text {ttf "timrom.ttf", "Some text",1,0 }

object { MyText
   translate -(min_extent(MyText) + max_extent(MyText)) / 2
}

`Center_Trans` in transforms.inc is also based on the same approach.

I wonder if there is a way to do so without defining the directive of `MyText`.

I mean something like `min_extent()` of the current object.


Post a reply to this message

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