[PythonCAD] Repo update with text scaling

Art Haas ahaas at airmail.net
Mon Aug 30 22:23:19 CEST 2004


The repo has been updated with my latest text scaling work. I've found a
workable approach to adjusting the font size given the current view of a
drawing, and while not perfect it is better than what existed before. A
suggestion or two from the PyGTK mailing list helped, so my thanks to
the people who responed to my posting there.

The code to scale the text is in the Interface/Gtk/gtktext.py file; look
for the set_textblock_bounds() function at the top of the file if you
are curious.

The text sizes are still (by default) very small, so I'm going to work
on improving the ability to adjust the text size for both TextBlocks and
Dimensions. Also, the new text drawing stuff simplifies a bit of the
drawing of Dimension text strings as an added bonus. Code reuse is good.

There are also a number of other fixes in this set of changes. I made a
change to the Quadtree class dealing with how and when in splits a node
in the tree. Also, a number of changes to various entity inRegion()
methods were made as to define the entity falling within the region of
interest if the entity had an endpoint/keypoint fall on the edge.
Previously a point on the edge of the boundary was not considered in the
region, but now it will be. This change came about after finding some
odd behavior in Quadtree storage with horizontal and vertical
construction lines. The inRegion() change fixed this odd behavior, as
led to a few modifications to some of the getNodes() methods in the
various Quadtree subclasses.

Onward and upward ...

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