On Sat, Apr 20, 2024 at 10:41:39AM +0800, Qian Yun wrote:
> Also the calculation of rgb and print of "setrgbcolor"
> should be made into a separate function, because the
> 2D PS output will need this as well.

Yes.  The patches looks good.  As I mentioned, since you keep
finding new things it makes sense to collect them in bigger
change.

> - Qian
> 
> On 4/19/24 19:10, Qian Yun wrote:
> > I'd like to also include the following in this patch.
> > 
> > You will notice that the ps output has a strange gray background.
> > 
> > The following code snippet is responsible for setting color.
> > 
> > #define psShadeMax      17.0    /* same as XShadeMax */
> > #define psShadeMul      (1.0/(psShadeMax-1.0))  /* white and 16 gray
> > shades */
> > 
> > It makes no sense to compute a constant grey color and use it.
> > (I guess it was mono color so put a grey background there?)
> > 
> > Let's simply have a white background instead.
> > 
> > - Qian
> > 
> > diff --git a/src/graph/view3D/smoothShade3d.c
> > b/src/graph/view3D/smoothShade3d.c
> > index 7e80157a..432a0f98 100644
> > --- a/src/graph/view3D/smoothShade3d.c
> > +++ b/src/graph/view3D/smoothShade3d.c
> > @@ -567,8 +567,7 @@ scanLines(int dFlag)
> >       XFillRectangle(dsply,viewport->viewWindow,trashGC,0,0,
> >                      vwInfo.width,vwInfo.height);
> >     } else {
> > -    GSetForeground(GC9991,
> > - 1.0-(float)((int)(psShadeMax-0.3*psShadeMax)-1)*psShadeMul,dFlag);
> > +    GSetForeground(GC9991, psWhite, dFlag);
> >       quadMesh[0].x = 0;  quadMesh[0].y = 0;
> >       quadMesh[1].x = graphWindowAttrib.width+2;
> >       quadMesh[1].y = 0;
> > 
> > 
> > On 4/18/24 17:57, Qian Yun wrote:
> > > Currently we get mono color in postscript output of "smooth" style
> > > 3D drawings.
> > > 
> > > That's caused by "GSetForeground" before "GDrawPoint".
> > > "GSetForeground" can only set gray scale.
> > > 
> > > Luckily the all four usage of "GDrawPoint" are all for the purpose
> > > of generating "smooth" style image.  So this change will not break
> > > anywhere else.
> > > 
> > > So I decode color and use "setrgbcolor" for it and remove
> > > "installGC" from "drawpoint.ps" because that's responsible for
> > > setting the grey color.
> > > 
> > > - Qian
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to fricas-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/fricas-devel/0e864821-510e-4880-89af-312fc1c94fd3%40gmail.com.

-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/ZiVK4TnL5KB1_XUX%40fricas.org.

Reply via email to