[GRASS-dev] vector display clipping

Anna Petrášová kratochanna at gmail.com
Tue Sep 16 09:14:30 PDT 2014


Hi,

thanks for reply,

On Tue, Sep 16, 2014 at 7:59 AM, Glynn Clements <glynn at gclements.plus.com>
wrote:

>
> Anna Petrášová wrote:
>
> > can anyone explain the difference between grass64 and 7 in clipping
> vector
> > data for display? I attached 2 pictures created with d.mon png and cairo
> > driver
>
> Which is png and which is cairo?
>

the map70.png is cairo, the other one is png.

>
> > (to avoid influences from GUI) and you can see that in 64 the lines
> > are clipped to match computational region while in grass7 it seems to
> > display all vector features which have at least part in the region. Is
> this
> > bug or feature? I couldn't find any discussion on this topic...
>
> In 7.0, there are two distinct sets of clipping operations.
>
> D_set_clip_mode, D_set_clip and D_clip_to_map control clipping which
> is performed within the display library. The default is no clipping.
>
> Using this functionality for graphical clipping is problematic if you
> use thick lines, as clipped lines will be capped at the point where
> they're clipped. It would also affect the dash offset for dashed lines
> (although that isn't implemented yet).
>

Is there any way to set different default mode without modifying the code?

>
> Additionally, the driver's Set_window function establishes a clip
> region (e.g. via cairo_clip() for the cairo driver). This defaults to
> the entire "screen", but can be overridden by setting the environment
> variable GRASS_FRAME.
>
> Arguably, the code which sets up the coordinate system so that the
> current region just fits the display (D_setup) should also set the
> clip region to fit the current region.
>
> However, this is complicated slightly be the fact that there's no
> distinction between the display "frame" (either the screen or the
> frame set by GRASS_FRAME) and the current clip region, so setting a
> clip region would lose the only record of the frame.
>

I still don't understand if the current behavior in 7 is intended and if
so, why no vector clipping is better?

Anna

>
> --
> Glynn Clements <glynn at gclements.plus.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20140916/e6c14656/attachment.html>


More information about the grass-dev mailing list