|
From: Mojca M. <moj...@gm...> - 2006-02-12 15:20:40
|
On 2/8/06, Petr Mikulik wrote: > > This makes the grid "finer", but not smooth. > > > > PostScript (and PDF) support smooth shading, which means that you can > > only define a color in the corners and PostScript will take care for > > "pixels" in the middle. > > Wasn't this question discussion during the OpenGL driver? It is a bit > similar (colors for vertices). Aha, not the question here, since we are i= n > 2D projections, not in 3D coordinats. > > It would need to add > float r,g,b; > into the definition of gpiPoint. > > Then there are these possibilities: > 1. Add also > int fade_color > into gpiPoint. Then > void XX_filled_polygon (int points, gpiPoint *corners) > won't change. > 2. Change > void XX_filled_polygon (int points, gpiPoint *corners, t_fade *f= ade) > The last new param will be ignored by most terminals. > 3. As term->set_color() is called before each term->filled_polygon(), > the fading option could be passed at this point. > > It is probably not difficult to implement. You can have a nice play. The proper color should probably be calculated first for each point as well= . Thans a lot for the guidelines. If nobody else is willing to investigate, I'll try to finish the new terminal first before starting to dig into this, so that I get some experience first. However, exactly at this point (filled_polygon, trickery with palettes, ...) proper documentation for current functionality is missing. ConTeXt is able to do many things (not "grestore" however, but this can be done in many other ways), but I'm a bit lost. PostScript terminal uses some "cryptic code" for patterns, palettes, ... that is not documented anywhere else. For example, there's exactly only one place where "previous_palette" is called. PostScript does only "grestore" and the source states that the command could probably be dropped since no other terminal is using it. Is PostScript "the" reference of how the functions are to be implemented in other terminals? Or who could help me with further suggestions what the "fill_polygon" and palette switching functions are supposed to do exactly? (sorry for going off-topic in this thread) Mojca |