mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Formatting
This commit is contained in:
parent
dd428b3d5a
commit
f6c17001e4
@ -22,20 +22,19 @@
|
||||
*/
|
||||
|
||||
#include <preview_items/two_point_assistant.h>
|
||||
|
||||
#include <preview_items/draw_context.h>
|
||||
#include <preview_items/preview_utils.h>
|
||||
|
||||
#include <view/view.h>
|
||||
|
||||
#include <common.h>
|
||||
#include <pcb_painter.h>
|
||||
|
||||
using namespace KIGFX::PREVIEW;
|
||||
|
||||
TWO_POINT_ASSISTANT::TWO_POINT_ASSISTANT(
|
||||
const TWO_POINT_GEOMETRY_MANAGER& aManager, EDA_UNITS aUnits, GEOM_SHAPE aShape )
|
||||
: EDA_ITEM( NOT_USED ), m_constructMan( aManager ), m_units( aUnits ), m_shape( aShape )
|
||||
TWO_POINT_ASSISTANT::TWO_POINT_ASSISTANT( const TWO_POINT_GEOMETRY_MANAGER& aManager,
|
||||
EDA_UNITS aUnits, GEOM_SHAPE aShape ) :
|
||||
EDA_ITEM( NOT_USED ),
|
||||
m_constructMan( aManager ),
|
||||
m_units( aUnits ),
|
||||
m_shape( aShape )
|
||||
{
|
||||
}
|
||||
|
||||
@ -94,6 +93,5 @@ void TWO_POINT_ASSISTANT::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const
|
||||
}
|
||||
|
||||
// place the text next to cursor, on opposite side from drawing
|
||||
DrawTextNextToCursor( aView, end, origin - end, cursorStrings,
|
||||
aLayer == LAYER_SELECT_OVERLAY );
|
||||
DrawTextNextToCursor( aView, end, origin - end, cursorStrings, aLayer == LAYER_SELECT_OVERLAY );
|
||||
}
|
@ -33,25 +33,25 @@ namespace KIGFX
|
||||
namespace PREVIEW
|
||||
{
|
||||
|
||||
// TODO: required until PCB_SHAPE_TYPE_T is moved into commons or a better approach is found
|
||||
enum class GEOM_SHAPE
|
||||
{
|
||||
// TODO: required until PCB_SHAPE_TYPE_T is moved into commons or a better approach is found
|
||||
enum class GEOM_SHAPE
|
||||
{
|
||||
SEGMENT = 0,
|
||||
RECT,
|
||||
ARC,
|
||||
CIRCLE,
|
||||
POLYGON,
|
||||
CURVE
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
/**
|
||||
* Represents an assistant draw when interactively drawing a line or circle on a canvas.
|
||||
*/
|
||||
class TWO_POINT_ASSISTANT : public EDA_ITEM
|
||||
{
|
||||
public:
|
||||
TWO_POINT_ASSISTANT(
|
||||
const TWO_POINT_GEOMETRY_MANAGER& aManager, EDA_UNITS aUnits, GEOM_SHAPE aShape );
|
||||
class TWO_POINT_ASSISTANT : public EDA_ITEM
|
||||
{
|
||||
public:
|
||||
TWO_POINT_ASSISTANT( const TWO_POINT_GEOMETRY_MANAGER& aManager, EDA_UNITS aUnits,
|
||||
GEOM_SHAPE aShape );
|
||||
|
||||
const BOX2I ViewBBox() const override;
|
||||
|
||||
@ -82,11 +82,12 @@ namespace PREVIEW
|
||||
return "TWO_POINT_ASSISTANT";
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
const TWO_POINT_GEOMETRY_MANAGER& m_constructMan;
|
||||
EDA_UNITS m_units;
|
||||
GEOM_SHAPE m_shape;
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace PREVIEW
|
||||
} // namespace KIGFX
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user