[PATCH] Avoid overprinting of CCR cylinder pressure labels (2nd attempt)

Willem Ferguson willemferguson at zoology.up.ac.za
Fri Jan 23 11:29:34 PST 2015


Subject: [PATCH] Avoid overprinting of cylinder presssure labels for CCR 
dives (2nd attempt).

This patch takes the cylinder pressures of CCR dives and prints them
in a non-overlapping way. Attached image "before" shows the state
of affairs before this patch. The image "after" shows the result
of this patch. When the dive profile is made taller by dragging the
window or the appropriate slider far down the screen, the labels move
further apart (see attached image "tall" with profile height ~ 1200 px).
When the profle is made flat/shallow by dragging the window edge or
appropriate slider up, the labels get close to each other and start
to overlap (see attached image "flat" with profile height around 700px).
There are quite a few lines of additional code going into the patch. This
is primarily because separate provisions for when po2 > p(diluent) or
vice versa. In addition, I could not determine the size of the text
characters which would allow much more precise placement of text.
This is because the .scale member of the text is private and
not available in the methods involved in printing the labels. However,
the height of the vertical scale of the cylinder pressure graph can be
determined [e.g. vAxis->maximum()]. This helped a lot to get the
positioning of the text more or less correct. While the results of the
patch is not perfect, it contributes significantly to make the profiles
of Poseidon dives more readable.

Signed-off-by: willem ferguson <willemferguson at zoology.up.ac.za>

The labels of non--CCR dives have been preserved. By far the majority
of the extra code is not executed for non-CCR dives.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: labels.jpg
Type: image/jpeg
Size: 16229 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150123/38a6eb51/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Avoid-overprinting-of-cylinder-presssure-labels-for-.patch
Type: text/x-diff
Size: 9938 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150123/38a6eb51/attachment-0001.patch>


More information about the subsurface mailing list