[PythonCAD] New drawing routines now in use

Art Haas ahaas at airmail.net
Thu Apr 7 18:34:01 CEST 2005


The new draw() methods I've been working on are now in play thanks to
revamping the redraw() method in the gtkimage.py file. At long last the
abominable draw_layer() function is gone, replaced by a much smaller,
clearer drawLayer() method in the GTKImage class, and it is drawLayer()
that invokes the newly added draw() methods. The program still redraws
all the entities each time one is added or deleted, and that shortcoming
will be addressed in upcoming work. Also, I want to start adding code
utilizing the UIManager routines to build the interface, as that
approach seems much better and more flexible than the current setup.

One difference that the new drawing code makes is in regards to
displaying text. The text is larger than had been shown in the past, and
I believe that the new way is correct as I found several "odd" bits of
code in sizing the text, where the new code is much clearer and easier
to follow. Also, a long-standing bug in displaying text is fixed -
TextBlocks and Dimensions have not been drawn in the inactive layer
color if they were in such a layer. Now they are draw the same color as
the other entities in that layer.

I'd like to make a release at the end of April, and with the various
improvements in the drawing code I think a release is warranted.

Comments and suggestions regarding the new display code welcomed, as
well as any reports of errors.

Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.

-Thomas Jefferson to James Smith, 1822

More information about the PythonCAD mailing list