tkWinDraw.c - a patch to the Core? 
Author Message
 tkWinDraw.c - a patch to the Core?

In doing some modifications to a Tix widget, I've had to change 2
lines in tkWinDraw.c in the Tk core.  I was wondering if this could be
added to the core, whether anyone has a workaround, or whether this
causes problems I'm not aware of.

The problem is that in tkWinDraw.c it figures out the width and height
of the area to be drawn.  If either dimension is zero my graphic (a
stippled line) doesn't get drawn.  Tix passes in the rectangle coords
of the horizontal or vertical line and computes the
dimensions... Either way, one of the dimensions comes out to be
0. :-(.

I've changed these lines:
width = rect.right - rect.left;
height = rect.bottom -


width = max(rect.right - rect.left,1);
height = max(rect.bottom -,1);

Thus assuring myself at least 1 pixel in either direction.  

I can still draw single pixel lines on a canvas, so I don't know if
I've hosed anything (i.e. nothing seems broken).  Anyone have any
comments one way or the other?  


Bret A. Schuhmacher                Healthdyne Information Enterprises
Software Engineer                            (970) 240-2064

People who claim they don't let little things bother them have never
slept in a room with a single mosquito.

Fri, 11 Aug 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. ruby-core mailing list (was: Re: [Patch] MACROs cleanup 3)

2. Some bugs in the new Trf patch added to the core

3. Dash patch in core?

4. PATCH: Tk4.0b1 canvas core dump

5. gawk FPAT patch: patch to the patch

6. PATCHES: Patch Archive Updated

7. Soft cores/macs vs Hard cores/macs

8. core or core dump file ?

9. _tkinter makes core dump (Re: python links with Tk in OS/2 - but core dumps)

10. To dump core or not to dump core

11. REQ: P3007.ZIP P3007X.ZIP F3007.ZIP PATCH.EXE Clarion for DOS update patches

12. Time to patch the patch?


Powered by phpBB® Forum Software