POV-Ray : Newsgroups : povray.general : text with background : Re: text with background Server Time
25 Apr 2024 10:47:28 EDT (-0400)
  Re: text with background  
From: Alain
Date: 5 Aug 2019 12:33:30
Message: <5d485a5a$1@news.povray.org>
Le 19-08-04 à 15:00, Kima a écrit :
> I know I can put a text object on a geometrical shape by techniques such as
> "difference", but in this case, I need to know the width of the text to create
> an object with the same size?
> 
> How can I set a background for a text object when I don't know the width/length
> of the text?
> 
> 
> 

I By using min_extent(), max_extent(), you'll get the extent of your 
text object.

In fact, you only need to use max_extent(TextObject).x in the present 
context as text objects start at x=0 and build top the right, or +x 
direction.

(max_extent(TextObject).y - min_extent(TextObject).y) will return the 
height. Using min_extent is needed to take into account the descender of 
some letters :«y», «q», «j» and «g».


Post a reply to this message

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