27#ifndef __DRAWING_TOOL_H
28#define __DRAWING_TOOL_H
90 bool aDrawNow,
VECTOR2I* tablesize );
95 bool aDrawNow,
VECTOR2I* tablesize );
195 std::vector<BOARD_ITEM*>& aItems,
196 std::vector<BOARD_ITEM*>& aPreview,
LSET* aLayers );
233 std::optional<VECTOR2D> aStartingPoint );
244 std::optional<VECTOR2D> aStartingPoint );
286 typedef std::numeric_limits<int> coord_limits;
287 const int guardValue = 1;
294 if( xDiff > maxDiff )
296 if( yDiff > maxDiff )
299 if( xDiff < -maxDiff )
301 if( yDiff < -maxDiff )
304 return aOrigin +
VECTOR2I(
int( xDiff ),
int( yDiff ) );
316 typedef std::numeric_limits<int> coord_limits;
317 const int guardValue = 10;
322 double maxRadius = coord_limits::max() / 2 - guardValue;
323 double radius = std::hypot( xDiff, yDiff );
325 if( radius > maxRadius )
327 double scaleFactor = maxRadius / radius;
329 xDiff = KiROUND<double, int>( xDiff * scaleFactor );
330 yDiff = KiROUND<double, int>( yDiff * scaleFactor );
333 return aOrigin +
VECTOR2I(
int( xDiff ),
int( yDiff ) );
Information pertinent to a Pcbnew printed circuit board.
Represent basic circle geometry with utility geometry functions.
Manage an 8-bit channel image.
An interface for classes handling user events controlling the view behavior such as zooming,...
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
LSET is a set of PCB_LAYER_IDs.
Common, abstract interface for edit frames.
Class that handles the drawing of a polygon, including management of last corner deletion and drawing...
Simple container to manage line stroke parameters.
VECTOR2_TRAITS< int >::extended_type extended_type
An adjunct helper to the DRAWING_TOOL interactive tool, which handles incoming geometry changes from ...
Handle a list of polygons defining a copper zone.
PCB_LAYER_ID
A quick note on layer IDs:
The Cairo implementation of the graphics abstraction layer.