POV-Ray : Newsgroups : povray.unofficial.patches : MegaPOV 1.0 bug ? : Re: MegaPOV 1.0 bug ? Server Time
2 Jul 2024 16:14:25 EDT (-0400)
  Re: MegaPOV 1.0 bug ?  
From: William Pokorny
Date: 5 Jan 2003 13:25:04
Message: <web.3e1876f9f0e8480d5020b6e80@news.povray.org>
OK, I got some time today to look at this and here are my thoughts
and proposed changes. I am set up with a compiler only in the unix
environment. Further I won't be home for another 6 days so my
apologies for any typos.

The work around for the current Mega-POV 1.0 windows release
is to shift drag the window, copy to the command line and then
remove the string "+er1.000000" from the end of the text appended
to the command line BEFORE you start the render. Or of course
you can avoid including the last line in your partial renders....

First, on looking over this code again, I think we should add the
same +ER fix to the +EC flag. In povmsrec.cpp we should change:

   if(POVMSUtil_GetFloat(msg, kPOVAttrib_EndColumn, &f) == 0)
   {
      if(f > 0.0 && f <= 1.0)
      {
         opts.Last_Column = -1;
         opts.Last_Column_Percent = f;
      }
      else
         opts.Last_Column = (int)f;
   }

to:

   if(POVMSUtil_GetFloat(msg, kPOVAttrib_EndColumn, &f) == 0)
   {
      if(f > 0.0 && f
                             #ifdef END_ROW_1_PATCH
                             <
                             #else
                             <=
                             #endif
                             1.0)
      {
         opts.Last_Column = -1;
         opts.Last_Column_Percent = f;
      }
      else
         opts.Last_Column = (int)f;
   }

To fix the windows partial render trouble when the last row
or column is included, in pvengine.c we should change:

sprintf (RegionStr," +sc%f +sr%f +ec%f +er%f",
          (float) x1 / (render_width - 1),
          (float) y1 / (render_height - 1),
          (float) x2 / (render_width - 1),
          (float) y2 / (render_height - 1)) ;

to:

sprintf (RegionStr," +sc%f +sr%f  %s %s",
          (float) x1 / (render_width - 1),
          (float) y1 / (render_height - 1),
          (((float) x2 / (render_width - 1)) < 1.0) ?
sprintf("+ec%f",((float) x2 / (render_width - 1))) : "",
          (((float) y2 / (render_height - 1)) < 1.0) ? sprintf("+er%f",
((float) y2 / (render_height - 1))) : "") ;

And the same change should be made to the sprintf just below which
begins with:

sprintf (TempRegionStr,
                            " +sc%f +sr%f +ec%f +er%f",

I think this all will get us to the place where the end row fix, fixes
what it is supposed to fix without breaking the ability to do partial
renders from the windows GUI.
Regards, Bill P.

>On Fri,  3 Jan 2003 09:24:34 EST, "William Pokorny" <pokorny_attglobal_net>
>wrote:
>> ABX,
>> I think I am the culprit here, not Micha. I am on the road at the moment...
>
>Yes, sorry, my memory failed becouse of other tasks ...
>
>> I'll try and download the windows source off the POV-Ray download page later
>> today and take a look...
>
>Good luck :-)
>
>ABX
>


Post a reply to this message

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