This is required as the OpenGL GAL doesn't support mirrored
text, and if the state is not cleared after painting other mirrored
text, this is what is attempted.
Fixes: lp:1677210
* https://bugs.launchpad.net/kicad/+bug/1677210
The zone creation in DRAWING_TOOL was a complex event loop whici
simultaneously managed the event handling, construction of the preview
polygon and the creation and commiting of the zone, all in the same
scope. This has been broken into several pieces:
* POLYGON_ITEM preview item, used to preview the polygon in progress
* POLYGON_GEOM_MANAGER is a class that collects points from user input
and used them to describe a polygon's geometry, including calculation
of 45-degree constrained leader lines
* ZONE_CREATE_HELPER is a class which deals with creating zones based on
geometry from a geometry manager and parameters from the DRAWING_TOOL
* The (much simpler) event loop in DRAWING_TOOL drives the
POLYGON_GEOM_MANAGER. With a minor refactor, this loop can be reused
in future for other polygonal tools if wanted.
The polygon preview now has a translucent fill which makes it easier to
visualise the zone.
This also adds the Close Zone Outline and Delete Last Corner actions as
part of the new event loop.
Fixes: lp:1663885
* https://bugs.launchpad.net/kicad/+bug/1663885
Fixes: lp:1667885
* https://bugs.launchpad.net/kicad/+bug/1667885
This uses the two-point geometry manager to split the logic of the ruler
geometry and the preview item display. This allows the ruler to use that
manager's angle snap feature.
This adds the microwave tools to GAL in Pcbnew as a new tool:
MICROWAVE_TOOL.
Some new preview items are introduced to support this:
* TWO_POINT_GEOM_MANAGER for managing construction of two-point
geometries, such as that used to construct the inductor.
* CENTRELINE_RECT_ITEM a preview item to draw ractangle with a given
aspect ratio along a line (specified using a TWO_POINT_GEOM_MANAGER)
PCB_TOOL gets a generic event loops which should be useful for more
than just microwave tools:
* doInteractiveItemPlacement() - handles event loops that wait for a
click, create an item on click and then allow moving it
around/flipping, etc.
Fixes: lp:1531323
* https://bugs.launchpad.net/kicad/+bug/1531323
This adds a richer overlay to the arc-by-three-points tool in Pcbnew,
including more guide-lines and a live display of radius and angle.
Also included is ability to go back to the previous step (if setting end
angle, you can go back to setting start point, etc) using Backspace, and
Ctrl snaps the start/end angles to 45 degree multiples.
This adds new classes
* MULTISTEP_GEOM_MANAGER: represents a generic "geometry manager" that
builds up some geometrical construction based on a sequence of points.
Used by:
* ARC_GEOM_MANAGER: handles the logical flow of constructing an
arc by centre-point, set radius, set angle. This moves the logic out
of the Pcbnew DRAWING_TOOL event loop in drawArc().
* ARC_ASSISTANT: graphical overlay to communicate current arc shape to
the user during the drawing process
This allows to measure between features on a PCB. It uses a preview
EDA_ITEM in common, but due to the use of the IDs, it's currently
Pcbnew/Modedit only.
This also adds several "utils" for graphical functons useful when
drawing preview items on GAL canvases.
Fixes: lp:1467313
* https://bugs.launchpad.net/kicad/+bug/1467313
This simplifies the (already simple) SELECTION_AREA class. It is also
moved into KIGFX::PREVIEW and put in the common library, where it can be
reused by other GAL-aware tools (not just in Pcbnew) in future.
This introduces SIMPLE_OVERLAT_ITEM, which is an abstract EDA_ITEM,
designed for use as an overlay for assisting interactive tools.
The item is drawn only on the GP_OVERLAY layer, and sets the fill,
stroke and line properties before calling a virtual function to draw the
shape, which will depend on the implementaiton of the derived class.
The motivation here is to simplify and unify basic overlays used when
in interactive tools. It is not designed to be the base class of all
possible overlays - more complex ones would be more clearly represented
as their own derivative of EDA_ITEM.
Applications of this class can include: zoom/select rectangles, zone
polygon previews, geometric shape helpers, and so on.