|
From: Ethan A M. <sf...@us...> - 2013-07-26 16:51:06
|
On Friday, July 26, 2013 03:42:14 am Christoph Bersch wrote:
> Am 25.07.2013 22:09, schrieb Ethan A Merritt:
> > On Thursday, July 25, 2013 12:35:09 pm Christoph Bersch wrote:
> >>
> >> I think, dashed object borders are not possible.
> >
> > See attached demo and output.
>
> Ok, I see. But it does not work for 'set object', which is what I use
> frequently.
Thanks for the example.
I think there are 2 or 3 factors contributing to the problem.
A satisfactory fix may require changing more than one thing.
Let me summarize how things currently work:
1) When you create a new "set object ..." the linetype for drawing that
object is set to LT_DEFAULT and the fill style is set to FS_DEFAULT.
A previously created object can be returned to this state by saying
"set object N default"
2) If you set an explicit fill color either at the time of creation or
later, this has the side effect of resetting LT_DEFAULT to (-1).
There was a reason for doing this back when only a few terminals
supported RGB color, but I think it is no longer necessary.
Changing this may be part of the solution to your problem.
3) Later on when the object is actually drawn, if the object line type
is still LT_DEFAULT this is replaced by the linetype of the current
plot. If the object is not part of a plot, then instead it is
replaced by the linetype of the fill style border.
Steps (1) and (2) are implemented in the routine set_obj().
Step (3) happens in various places during plotting; they may not all
act identically so this is an area possible bugs or inconsistency.
I agree that the current behavior is not entirely satisfactory.
If you want to experiment with changing it, I suggest trying some
combination of
- Removing or changing step (2) above. It is line 4052 in set.c
this_object->lp_properties.l_type = LT_BLACK; /* Anything but LT_DEFAULT */
- Adding an explicit option "set object ... {linetype N}"
or even "set object ... {dashtype N}"
This would effectively become a step (1A) in set_obj()
- Rethinking when or if the "border" property of a fill style is applied.
For example, should it apply to fillstyle "empty"?
This is currently treated as a special case in several places.
- [your original proposal] re-interpreting the "border" property as a
line type or line style rather than as a color. One problem with this
is that there would then be _two_ line types attached to each object,
one in the top level structure object->lp_properties and a second in
object->fillstyle->border_lt (doesn't currently exist).
Which one is used under what conditions?
I suspect any changes will have unforseen side effects, but that's life :-)
Ethan
|