Opened 12 years ago

Last modified 6 years ago

#1907 new defect

ps.map does not respect the drawing order of objects

Reported by: Nikos Alexandris Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: Ps.map Version: unspecified
Keywords: ps.map, border, rectangle, drawing, displaying, order Cc:
CPU: Unspecified Platform: Unspecified

Description

Consider a ps.map script including a regular map frame with a visible border, and on top of that a custom rectangle which crosses the map's border.

Expected is to see the rectangle (whether it is color-filled or not, it does not matter) overlapping the map's border. It seems however that ps.map does not respect the order of drawing first the map's border and second the rectangle. The border of the map (frame) is visible through the rectangle (color-filled or not) which means it is drawn on top of the rectangle even though it was instructed first.

This can be confirmed by producing two identical, regarding the structure, PS maps, though with different colors. I.e.:

Produce a PS map with a grey map border and a black-filled rectangle (with grey border)

--%<--- border

color grey width 0.01i end

rectangle 77% 90% 142% 14%

fcolor 0:0:0 color grey width 0.1 end

end --->%--

and a PS map with a blue border and a green-filled rectangle:

--%<--- border

color blue width 0.01i end

rectangle 77% 90% 142% 14%

fcolor 0:255:0 color grey width 0.1 end

end --->%--

In both cases the map's border is visible there where it is "supposed" to be covered by the rectangle. Comparing the two PS files, one can identify that the rectangle is always drawn first and the map border second. Hand-crafting a PS file so as to first draw the map frame and then the rectangle, is a prove that it's only a matter of drawing/displaying order. In this test-case, editing a PS file in order to change the drawing order is done by changing (below shown are only the relevant bits, in the end of the PS file):

--%<--- grestore NP

399.7 478.2 M 706.7 478.2 LN 706.7 135.2 LN 399.7 135.2 LN CP

0.000 1.000 0.000 C

F

0.502 0.502 0.502 C 0.10000000 W

D

0.000 0.000 1.000 C 0.72000000 W 36.5 72.5 507.8 522.8 B D showpage --->%--

to

--%<--- grestore 0.000 0.000 1.000 C 0.72000000 W 36.5 72.5 507.8 522.8 B D NP

399.7 478.2 M 706.7 478.2 LN 706.7 135.2 LN 399.7 135.2 LN CP

0.000 1.000 0.000 C

F

0.502 0.502 0.502 C 0.10000000 W

D

showpage --->%--

Why does ps.map not respect the instructions order?

Change History (5)

comment:1 by Nikos Alexandris, 12 years ago

Summary: ps.map does not (always) respect the drawing order of objectsps.map does not respect the drawing order of objects

comment:2 by martinl, 9 years ago

Milestone: 7.0.07.0.5

comment:3 by neteler, 8 years ago

Milestone: 7.0.57.0.6

comment:4 by neteler, 7 years ago

Milestone: 7.0.67.0.7

comment:5 by martinl, 6 years ago

Milestone: 7.0.77.6.2
Note: See TracTickets for help on using tickets.