Blt 2.3: One Bug, One Feature, Two Solutions :) 
Author Message
 Blt 2.3: One Bug, One Feature, Two Solutions :)

The following script demonstrates a bug in the postscript output for
multi-line text markers - currently only the first line is output.  

This is caused by the reuse of the variable 'i' in the function
Blt_PrintText()  in bltGrPs.c - there are two nested for loops each
using 'i' as a counter. I changed the inner loop to use 'j' as the
control var (no surprises there !) and this seems to fix the problem.
#  create a graph

graph .g
pack .g

# create a multiline text marker

.g marker create text \
    -name thing \
    -text "Line 1\nLine 2\nLine 3" \
    -coords {0.5 0.5}

# generate a postscript file

.g postscript output


That's the bug. Now for the feature.

I've hijacked Dr O's arrow drawing code and created a tcl version for
use with Blt Graph markers (it just draws the arrow head at the end of
the line not at both ends). Slow but works.  When printing out lines
with arrows the arrow polygon is not being filled.

By looking at the Blt source code it seems that a two colour list must
be supplied to the -fill option

.g marker create polygon ... -fill {red red}

Is this correct beviour ? Since there is also an -outline switch I
can't see the need for the fg,bg pair for -fill, or is this necessary
when stipples are used... Either way a tweak to the man page would
make things clear.

I've noticed over the months the occasional patch for blt2.3.  Is a
2.4 which sweeps these up likely before the new year ? Is there a site
where all 'known' patches can be found - I might have missed some.

Hope the above helps and thanks as ever for your efforts


I've also posted this to the news group in case it helps anyone.
Julian H J Loaring

One more dried frog pill won't hurt, they're not at all {*filter*}ive

Sat, 08 Apr 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Two One bug, one RFE in Tk4.0

2. How to replace one or two words with one word with one line of awk code

3. One and One doesn't equal two It equals 1 - The Who

4. One and One doesn't equal two It equals 1 - The Who

5. Problem with two Pipes, one for STDOUT and one for STDERR

6. BUG: BLT 2.3 needs prodding to see vectors

7. BLT 2.3: Vector bug fix

8. Serious BLT 2.3 bug (long)

9. See one, do one, teach one...

10. one minor bug, two minor problems

11. US Postal BarCodes template solution, is there one?

12. Sorting a Browsebox, one solution


Powered by phpBB® Forum Software