Commit f94b274
committed
Make crossed quadrilaterals fill only the region containing the fill point.
This is to fix a comment I placed in the code about filling
quadrilaterals, and the comment made by @Alex-Jordan in
#1191 (comment).
The code implemented in #1191 fills the entire interior of a
quadrilateral even if it is a crossed quadrilateral (that is a
quadrilateral with two edges that intersect). That is inconsistent with
all of the other graph tool objects in some sense. To be more
consistent only the region inside the quadrilateral that satisfies the
same inequalities relative to the borders should be filled. So that is
what this does.
I also was doing some benchmarking of the TikZ fill code used for
generating hardcopy and noticed that some things were rather slow. The
slow down it turns out was using MathObject Reals in computations. There
is no need for the MathObject structure in those computations, so all of
the fill code now uses the perl values instead. It isn't even funny how
much faster computations are with pure perl numbers versus MathObject
Reals. The difference is rather extreme. Performing something like 10000
basic arithmetic operations with MathObject Reals takes more than five
seconds, but with pure perl numbers it takes less than 20 milliseconds.1 parent 8613565 commit f94b274
File tree
3 files changed
+181
-88
lines changed- htdocs/js/GraphTool
- macros/graph
3 files changed
+181
-88
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | 68 | | |
71 | 69 | | |
72 | | - | |
| 70 | + | |
73 | 71 | | |
74 | 72 | | |
75 | 73 | | |
| |||
89 | 87 | | |
90 | 88 | | |
91 | 89 | | |
92 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
| |||
143 | 147 | | |
144 | 148 | | |
145 | 149 | | |
| 150 | + | |
| 151 | + | |
146 | 152 | | |
147 | 153 | | |
148 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
0 commit comments