KiCad PCB EDA Suite
dialog_pad_basicshapes_properties.cpp File Reference

basic shapes for pads crude editor. More...

#include <algorithm>
#include <fctsys.h>
#include <common.h>
#include <confirm.h>
#include <pcbnew.h>
#include <trigo.h>
#include <macros.h>
#include <pcb_base_frame.h>
#include <base_units.h>
#include <widgets/wx_grid.h>
#include <class_board.h>
#include <class_module.h>
#include <dialog_pad_properties.h>
#include <bitmaps.h>

Go to the source code of this file.

Functions

void geom_transf (wxPoint &aCoord, wxPoint &aMove, double aScale, double aRotation)
 

Detailed Description

basic shapes for pads crude editor.

Definition in file dialog_pad_basicshapes_properties.cpp.

Function Documentation

void geom_transf ( wxPoint aCoord,
wxPoint aMove,
double  aScale,
double  aRotation 
)
inline

Definition at line 526 of file dialog_pad_basicshapes_properties.cpp.

References KiROUND(), RotatePoint(), wxPoint::x, and wxPoint::y.

Referenced by DIALOG_PAD_PRIMITIVES_TRANSFORM::Transform().

527 {
528  aCoord.x = KiROUND( aCoord.x * aScale );
529  aCoord.y = KiROUND( aCoord.y * aScale );
530  aCoord += aMove;
531  RotatePoint( &aCoord, aRotation );
532 }
static int KiROUND(double v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: common.h:120
void RotatePoint(int *pX, int *pY, double angle)
Definition: trigo.cpp:216