POV-Ray : Newsgroups : povray.general : Strange result: text is cut : Re: Strange result: text is cut Server Time
5 Aug 2024 20:18:45 EDT (-0400)
  Re: Strange result: text is cut  
From: Philippe Lhoste
Date: 2 Aug 2002 11:31:16
Message: <3d4aa5c4$1@news.povray.org>
Send to fast :-(

> -------8<------------------------------------
> #macro CenterText(txt)
>   #local minTxt = min_extent(txt);
>   #local maxTxt = max_extent(txt);
>   translate -(minTxt + (maxTxt - minTxt) / 2)
> #end
>
> #macro CenterText(txt)

Make it:
#macro GetCenterOfText(txt)

>   #local minTxt = min_extent(txt);
>   #local maxTxt = max_extent(txt);
>   (minTxt + (maxTxt - minTxt) / 2)
> #end
>
> difference
> {
>   // Planet
>   cylinder
>   {
>     0, -logoThickness*y, 1
>     rotate 90*x
>   }
>   object
>   {
>     logoText
> //    CenterText(logoText)
>     translate <-CenterText(logoText).x, -0.5, -logoThickness>

Make it:
    translate <-GetCenterOfText(logoText).x, -0.5, -logoThickness>

>   }
>   pigment { color logoColor }
> }
> ------------------------------------8<-------

Sorry.


Post a reply to this message

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