This change comprehensively replaces the use of Microsoft-standard integer
and boolean types with their C99/C++ standard equivalents, as the latter is
more appropriate for a cross-platform application. With matter-of-course
exceptions in the Win32-specific code, the types/values have been converted
as follows:
QWORD --> uint64_t
SQWORD --> int64_t
DWORD --> uint32_t
SDWORD --> int32_t
WORD --> uint16_t
SWORD --> int16_t
BYTE --> uint8_t
BOOL --> bool
TRUE --> true
FALSE --> false
The following related changes are also included:
* Added C99 integer type definitions for Windows, as stdint.h is not
available prior to Visual Studio 2010
* Changed types of some variables in the SolveSpace class from 'int' to
'bool', as they actually represent boolean settings
* Implemented new Cnf{Freeze,Thaw}Bool() functions to support boolean
variables in the Registry
* Cnf{Freeze,Thaw}DWORD() are now Cnf{Freeze,Thaw}Int()
* TtfFont::Get{WORD,DWORD}() are now TtfFont::Get{USHORT,ULONG}() (names
inspired by the OpenType spec)
* RGB colors are packed into an integer of type uint32_t (nee DWORD), but
in a few places, these were represented by an int; these have been
corrected to uint32_t
FLTK's Fl_Input widget, instantiated as {Graphics,Text}EditControl, returns
a 'const char *' string. In order to handle this properly, several of
SolveSpace's internal routines needed to gain a "const" qualifier on the
edit-control string argument.
The compiler gets nervous when we (for example) pass in a size_t as an int
parameter, or assign an int to a char, or assign -1 to an unsigned type. By
adding appropriate casts, we inform the compiler that, yes, we know what
we're doing.
This change also upgrades a va_arg() type from char to int, as char is
always promoted to int when passed through '...'.
after decimal) current value of the dimension, not the value
truncated to the same number of digits that are usually displayed.
And make the paste transformed screen accept expressions, not
just integers, for the count, angle, and scale.
[git-p4: depot-paths = "//depot/solvespace/": change = 2181]
in the text window. This means that I can move the conversion from
half-row and column to (x, y) into the platform-independent code,
and that I'll be ready to add my color picker.
[git-p4: depot-paths = "//depot/solvespace/": change = 2171]
an in-plane rotation of the view, or of a set of entities) would
remain on screen after the action was over.
[git-p4: depot-paths = "//depot/solvespace/": change = 2142]
just those that actually have associated dimensions. Amazing how
long that bug's been sitting there.
[git-p4: depot-paths = "//depot/solvespace/": change = 2099]
rotation. Also clean up the handling of units, by putting the
conversion factors in only one place, and clean up the
expression-parsing but removing all the copies of the same error
message.
[git-p4: depot-paths = "//depot/solvespace/": change = 2093]
left-clicking always selects, and there's a special context menu
item to deselect. Also streamline the right-click behavior by
making that select the hovered item, and making all the context
menu items work on the selection.
[git-p4: depot-paths = "//depot/solvespace/": change = 2091]
selected entities, but cleared after dragging an unselected entity.
Marquee selection is select-only (not toggle), and "Select All"
replaces "Invert Selection". Left-click on nothing will clear the
selection.
Also add context menu entries for cut, copy, and paste.
[git-p4: depot-paths = "//depot/solvespace/": change = 2089]
does that, and adds a scale factor to that transformation (instead
of just mirroring, as before), but also:
* Replace the "import mirrored" mechanism with a scale factor,
which if negative corresponds to a reflection as well.
* Fix self-intersection checker to report a meaningful point
when edges are collinear.
* Don't blow an assertion on some types of invalid file;
instead provide a nice error message to the user.
* Clear the naked edges before each regen.
* Don't create zero-length line segments by snapping a line
segment's end to its beginning.
[git-p4: depot-paths = "//depot/solvespace/": change = 2086]
only in a workplane; but this means that plane sketches are
conveniently transformed from one plane to another.
Also tweak snap to grid to ignore unsnappable entities instead of
triggering an error, and to remove arbitrary limit on the number of
entities / comments that will be snapped.
[git-p4: depot-paths = "//depot/solvespace/": change = 2084]
because it can't be C2 continuous after splitting (since I'm
doing uniform splines only, and the parametrization changes). So
just knock everything down to cubic Beziers.
Also draw lines to indicate angle and origin when Ctrl+dragging to
rotate in plane of screen.
[git-p4: depot-paths = "//depot/solvespace/": change = 2075]
load it as a texture, and show it instead of a flat-color
background. Includes user interface to specify scale and
translation of image, but the rotation is always aligned to the
view.
[git-p4: depot-paths = "//depot/solvespace/": change = 2071]
everything even partially within that rectangle gets selected when
I release.
Also make deselecting a point deselect all coincident points too;
otherwise there now exist ways to select both coincident points,
which meant that it was impossible to deselect the lower one.
And fix text window to show selection info even if just constraints
are selected, seems more consistent.
[git-p4: depot-paths = "//depot/solvespace/": change = 2066]
which can't be selected with the mouse and would otherwise have to
get deleted by selecting it in the text window.
[git-p4: depot-paths = "//depot/solvespace/": change = 2065]
one point to be dragged simultaneously. So now a dragged point
drags all the selected points and entities, and a dragged entity
drags its points (except for circles, which drag the radius).
This means that the number of forced points for the solver must now
be unlimited, and it is.
Also add commands to invert the selection within the active group,
and to select an edge chain starting from the current selection.
And redo the context menus a bit; still not great, but less
cluttered and more systematic.
[git-p4: depot-paths = "//depot/solvespace/": change = 2064]
to assemble Beziers into outer and inner loops, and find those
loops made up of entities with filled styles. The open paths are
maintained in a separate list, and we assemble as many closed paths
as possible even when open paths exist.
This changes many things. The coplanar check is now performed on
the Beziers, not the resulting polygon. The way that the polygon is
used to determine loop directions is also modified.
Also fix the mouse behavior when dragging a point: drop it when the
mouse is released, even if it is released outside the window, but
don't drop it if the pointer is dragged out of and then back into
our window.
Also special-case SSurface::ClosestPointTo() for planes, for speed.
[git-p4: depot-paths = "//depot/solvespace/": change = 2058]
loop), and open-ended splines, with their tangents specified at
their endpoints.
Also change constraint solver matrix size to 1024, on the theory
that a power of two will generate better array indexing, and
replace fabs() with my own function that for some reason is
faster.
[git-p4: depot-paths = "//depot/solvespace/": change = 2055]
point-coincident constraints and the entity- or group-generated
constraints. Also fix a bug where a dragged point was not released
when the mouse pointer left the window.
[git-p4: depot-paths = "//depot/solvespace/": change = 2045]