|
From: Ethan M. <merritt@u.washington.edu> - 2007-06-28 19:55:22
|
On Thursday 28 June 2007 12:32, Hans-Bernhard Br=F6ker wrote: > Ethan Merritt wrote: >=20 > > If this is a problem, I suggest that the proper answer is to move the g= rid > > settings out of (struct axis) into a new self-contained structure. I m= ay > > be overlooking something, but I don't see why the grid needs to be a > > property of the axis at all. >=20 > The grid effectively is a property of the axis, as can clearly be seen=20 > by the way we control it: the majority of grid options have a reference=20 > to some axis in their command syntax. >=20 > We grid based on tics, which are elements obviously linked to an axis.=20 > As it is, drawing the grid needs a reference to the axis' tic=20 > definitions, its terminal mapping and lots of other things. In other=20 > words, it needs almost the entire axis struct. Clearly one needs to refer to the axis structure in order to know _where_ to draw the grid lines. But the issue Petr raised is the simpler question of whether to draw the grid lines at all. One doesn't need to know anything about the axis or tics in order to track that requirement. =46rom a user perspective, toggling the grid on/off from an interactive display seems much more akin to toggling the ruler than to changing the axis or tic properties. > The axis struct is designed around the existing usage. Redraw is new,=20 > and poses new requirements. The axis struct will have to learn new=20 > tricks. Splitting it up into separate sub-structs for range, tics and=20 > grid options would be the right step to start with. That way, 'zoom'=20 > and friend can save/restore just the range, but leave grid settings alone. I take your point, but I am not sure I follow what issue you are trying address. Are you thinking that a change to, say, the minitic spacing while zoomed should, or should not, be retained after unzoom? I have no objection to such sub-structures. But before carving the axis structure into pieces, we would need to decide which pieces are to persist across zooming and which ones are not. Anyhow, these issues are relatively minor compared to getting the refresh mechanism to work at all. Let me finish getting a working prototyp= e; then we can decide what aspects may need to be tweaked. =2D-=20 Ethan A Merritt |