2007-12-09 12:59:06 +00:00
|
|
|
/**********************************/
|
|
|
|
/* classes to handle copper zones */
|
|
|
|
/**********************************/
|
|
|
|
|
|
|
|
#ifndef CLASS_ZONE_H
|
|
|
|
#define CLASS_ZONE_H
|
|
|
|
|
2008-09-26 19:51:36 +00:00
|
|
|
#include <vector>
|
2009-01-29 14:26:20 +00:00
|
|
|
#include "gr_basic.h"
|
2007-12-29 19:15:58 +00:00
|
|
|
#include "PolyLine.h"
|
2011-01-14 17:43:30 +00:00
|
|
|
#include "richio.h"
|
2007-12-29 19:15:58 +00:00
|
|
|
|
2009-08-06 18:30:46 +00:00
|
|
|
/* a small class used when filling areas with segments */
|
|
|
|
class SEGMENT
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxPoint m_Start; // starting point of a segment
|
|
|
|
wxPoint m_End; // ending point of a segment
|
|
|
|
public:
|
|
|
|
SEGMENT() {}
|
|
|
|
SEGMENT( const wxPoint & aStart, const wxPoint & aEnd)
|
|
|
|
{
|
|
|
|
m_Start = aStart;
|
|
|
|
m_End = aEnd;
|
|
|
|
}
|
|
|
|
};
|
2008-10-23 10:26:06 +00:00
|
|
|
|
2007-12-09 12:59:06 +00:00
|
|
|
/************************/
|
|
|
|
/* class ZONE_CONTAINER */
|
|
|
|
/************************/
|
2008-01-23 22:39:09 +00:00
|
|
|
|
2007-12-09 12:59:06 +00:00
|
|
|
/* handle a list of polygons delimiting a copper zone
|
|
|
|
* a zone is described by a main polygon, a time stamp, a layer and a net name.
|
|
|
|
* others polygons inside this main polygon are holes.
|
2008-01-23 22:39:09 +00:00
|
|
|
*/
|
2007-12-09 12:59:06 +00:00
|
|
|
|
2009-10-21 19:16:25 +00:00
|
|
|
class ZONE_CONTAINER : public BOARD_CONNECTED_ITEM
|
2007-12-09 12:59:06 +00:00
|
|
|
{
|
|
|
|
public:
|
2008-10-17 06:17:48 +00:00
|
|
|
wxString m_Netname; // Net Name
|
|
|
|
CPolyLine* m_Poly; // outlines
|
|
|
|
int m_CornerSelection; // For corner moving, corner index to drag, or -1 if no selection
|
|
|
|
int m_ZoneClearance; // clearance value
|
2008-11-22 20:50:30 +00:00
|
|
|
int m_ZoneMinThickness; // Min thickness value in filled areas
|
2010-11-13 19:21:16 +00:00
|
|
|
int m_FillMode; // How to fill areas: 0 = use filled polygons, != 0 fill with segments
|
2010-01-12 13:15:13 +00:00
|
|
|
int m_ArcToSegmentsCount; // number of segments to convert a circle to a polygon
|
|
|
|
// (uses ARC_APPROX_SEGMENTS_COUNT_LOW_DEF or ARC_APPROX_SEGMENTS_COUNT_HIGHT_DEF)
|
2008-10-23 10:26:06 +00:00
|
|
|
int m_PadOption; //
|
2008-10-17 06:17:48 +00:00
|
|
|
int m_ThermalReliefGapValue; // tickness of the gap in thermal reliefs
|
|
|
|
int m_ThermalReliefCopperBridgeValue; // tickness of the copper bridge in thermal reliefs
|
|
|
|
int utility, utility2; // flags used in polygon calculations
|
2009-08-06 18:30:46 +00:00
|
|
|
bool m_IsFilled; // true when a zone was filled, false after deleting the filled areas
|
2008-09-26 19:51:36 +00:00
|
|
|
std::vector <CPolyPt> m_FilledPolysList; /* set of filled polygons used to draw a zone as a filled area.
|
|
|
|
* from outlines (m_Poly) but unlike m_Poly these filled polygons have no hole (they are all in one piece)
|
|
|
|
* In very simple cases m_FilledPolysList is same as m_Poly
|
|
|
|
* In less simple cases (when m_Poly has holes) m_FilledPolysList is a polygon equivalent to m_Poly, without holes
|
2009-09-10 13:04:04 +00:00
|
|
|
* but with extra outline segment connecting "holes" with external main outline
|
2008-09-26 19:51:36 +00:00
|
|
|
* In complex cases an ouline decribed by m_Poly can have many filled areas
|
|
|
|
*/
|
2009-08-06 18:30:46 +00:00
|
|
|
std::vector <SEGMENT> m_FillSegmList; /* set of segments used to fill area, when fill zone by segment is used.
|
|
|
|
* ( m_FillMode == 1 )
|
|
|
|
* in this case segments have m_ZoneMinThickness width
|
|
|
|
*/
|
2007-12-09 12:59:06 +00:00
|
|
|
|
|
|
|
public:
|
2008-09-26 19:51:36 +00:00
|
|
|
ZONE_CONTAINER( BOARD* parent );
|
2008-01-23 22:39:09 +00:00
|
|
|
~ZONE_CONTAINER();
|
|
|
|
|
2009-08-06 18:30:46 +00:00
|
|
|
bool Save( FILE* aFile ) const;
|
2011-01-14 17:43:30 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function ReadDescr
|
|
|
|
* reads the data structures for this object from a LINE_READER in "*.brd" format.
|
|
|
|
* @param aReader is a pointer to a LINE_READER to read from.
|
|
|
|
* @return int - 1 if success, 0 if not.
|
|
|
|
*/
|
|
|
|
int ReadDescr( LINE_READER* aReader );
|
2008-01-23 22:39:09 +00:00
|
|
|
|
2008-10-29 15:26:53 +00:00
|
|
|
/** virtual function GetPosition
|
2009-08-06 18:30:46 +00:00
|
|
|
* @return a wxPoint, position of the first point of the outline
|
|
|
|
*/
|
2008-10-29 15:26:53 +00:00
|
|
|
wxPoint& GetPosition();
|
2008-09-26 19:51:36 +00:00
|
|
|
|
2008-01-23 22:39:09 +00:00
|
|
|
|
2008-04-01 05:21:50 +00:00
|
|
|
/**
|
2008-01-23 22:39:09 +00:00
|
|
|
* Function copy
|
|
|
|
* copy usefull data from the source.
|
|
|
|
* flags and linked list pointers are NOT copied
|
|
|
|
*/
|
2009-08-06 18:30:46 +00:00
|
|
|
void Copy( ZONE_CONTAINER* src );
|
2008-01-23 22:39:09 +00:00
|
|
|
|
2009-08-06 18:30:46 +00:00
|
|
|
void DisplayInfo( WinEDA_DrawFrame* frame );
|
2008-01-23 22:39:09 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function Draw
|
|
|
|
* Draws the zone outline.
|
|
|
|
* @param panel = current Draw Panel
|
|
|
|
* @param DC = current Device Context
|
2008-04-01 05:21:50 +00:00
|
|
|
* @param aDrawMode = GR_OR, GR_XOR, GR_COPY ..
|
2010-12-14 15:56:30 +00:00
|
|
|
* @param offset = Draw offset (usually wxPoint(0,0))
|
2008-01-23 22:39:09 +00:00
|
|
|
*/
|
2009-08-06 18:30:46 +00:00
|
|
|
void Draw( WinEDA_DrawPanel* panel,
|
|
|
|
wxDC* DC,
|
|
|
|
int aDrawMode,
|
|
|
|
const wxPoint& offset = ZeroOffset );
|
2008-01-23 22:39:09 +00:00
|
|
|
|
2008-09-26 19:51:36 +00:00
|
|
|
/**
|
|
|
|
* Function DrawDrawFilledArea
|
|
|
|
* Draws the filled area for this zone (polygon list .m_FilledPolysList)
|
|
|
|
* @param panel = current Draw Panel
|
|
|
|
* @param DC = current Device Context
|
|
|
|
* @param offset = Draw offset (usually wxPoint(0,0))
|
|
|
|
* @param aDrawMode = GR_OR, GR_XOR, GR_COPY ..
|
|
|
|
*/
|
2009-08-06 18:30:46 +00:00
|
|
|
void DrawFilledArea( WinEDA_DrawPanel* panel,
|
|
|
|
wxDC* DC,
|
|
|
|
int aDrawMode,
|
|
|
|
const wxPoint& offset = ZeroOffset );
|
2008-01-31 20:53:44 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function DrawWhileCreateOutline
|
|
|
|
* Draws the zone outline when ir is created.
|
2008-04-01 05:21:50 +00:00
|
|
|
* The moving edges are in XOR graphic mode, old segment in draw_mode graphic mode (usually GR_OR)
|
|
|
|
* The closing edge has its owm shape
|
2008-01-31 20:53:44 +00:00
|
|
|
* @param panel = current Draw Panel
|
|
|
|
* @param DC = current Device Context
|
|
|
|
* @param draw_mode = draw mode: OR, XOR ..
|
|
|
|
*/
|
2008-10-17 06:17:48 +00:00
|
|
|
void DrawWhileCreateOutline( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode = GR_OR );
|
2008-09-26 19:51:36 +00:00
|
|
|
|
|
|
|
|
2008-11-18 18:13:55 +00:00
|
|
|
/* Function GetBoundingBox
|
|
|
|
* @return an EDA_Rect that is the bounding box of the zone outline
|
|
|
|
*/
|
2010-12-10 19:47:44 +00:00
|
|
|
EDA_Rect GetBoundingBox() const;
|
2008-11-18 18:13:55 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function Test_For_Copper_Island_And_Remove__Insulated_Islands
|
|
|
|
* Remove insulated copper islands found in m_FilledPolysList.
|
|
|
|
* @param aPcb = the board to analyse
|
|
|
|
*/
|
2009-08-06 18:30:46 +00:00
|
|
|
void Test_For_Copper_Island_And_Remove_Insulated_Islands( BOARD* aPcb );
|
2008-11-18 18:13:55 +00:00
|
|
|
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
|
|
|
* Function CalculateSubAreaBoundaryBox
|
2008-11-18 18:13:55 +00:00
|
|
|
* Calculates the bounding box of a a filled area ( list of CPolyPt )
|
|
|
|
* use m_FilledPolysList as list of CPolyPt (that are the corners of one or more polygons or filled areas )
|
|
|
|
* @return an EDA_Rect as bounding box
|
|
|
|
* @param aIndexStart = index of the first corner of a polygon (filled area) in m_FilledPolysList
|
|
|
|
* @param aIndexEnd = index of the last corner of a polygon in m_FilledPolysList
|
|
|
|
*/
|
|
|
|
EDA_Rect CalculateSubAreaBoundaryBox( int aIndexStart, int aIndexEnd );
|
|
|
|
|
2008-09-26 19:51:36 +00:00
|
|
|
/**
|
|
|
|
* Function IsOnCopperLayer
|
|
|
|
* @return true if this zone is on a copper layer, false if on a technical layer
|
|
|
|
*/
|
|
|
|
bool IsOnCopperLayer( void )
|
|
|
|
{
|
|
|
|
return ( GetLayer() < FIRST_NO_COPPER_LAYER ) ? true : false;
|
|
|
|
}
|
2008-01-31 20:53:44 +00:00
|
|
|
|
2009-10-21 19:16:25 +00:00
|
|
|
virtual void SetNet( int anet_code );
|
2008-01-23 22:39:09 +00:00
|
|
|
|
2008-10-23 10:26:06 +00:00
|
|
|
/**
|
|
|
|
* Function SetNetNameFromNetCode
|
|
|
|
* Fin the nat name corresponding to the net code.
|
|
|
|
* @return bool - true if net found, else false
|
|
|
|
*/
|
2009-08-06 18:30:46 +00:00
|
|
|
bool SetNetNameFromNetCode( void );
|
2008-10-23 10:26:06 +00:00
|
|
|
|
2008-01-23 22:39:09 +00:00
|
|
|
/**
|
|
|
|
* Function HitTest
|
|
|
|
* tests if the given wxPoint is within the bounds of this object.
|
2008-11-27 10:12:46 +00:00
|
|
|
* For zones, this means near an ouline segment
|
2008-01-23 22:39:09 +00:00
|
|
|
* @param refPos A wxPoint to test
|
|
|
|
* @return bool - true if a hit, else false
|
|
|
|
*/
|
2008-10-17 06:17:48 +00:00
|
|
|
bool HitTest( const wxPoint& refPos );
|
2008-09-26 19:51:36 +00:00
|
|
|
|
2008-11-27 10:12:46 +00:00
|
|
|
/**
|
|
|
|
* Function HitTestFilledArea
|
|
|
|
* tests if the given wxPoint is within the bounds of a filled area of this zone.
|
|
|
|
* @param aRefPos A wxPoint to test
|
|
|
|
* @return bool - true if a hit, else false
|
|
|
|
*/
|
2009-08-06 18:30:46 +00:00
|
|
|
bool HitTestFilledArea( const wxPoint& aRefPos );
|
2008-11-27 10:12:46 +00:00
|
|
|
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
|
|
|
* Function BuildFilledPolysListData
|
2008-09-26 19:51:36 +00:00
|
|
|
* Build m_FilledPolysList data from real outlines (m_Poly)
|
|
|
|
* in order to have drawable (and plottable) filled polygons
|
|
|
|
* drawable filled polygons are polygons without hole
|
2008-10-02 13:24:31 +00:00
|
|
|
* @param aPcb: the current board (can be NULL for non copper zones)
|
2008-09-26 19:51:36 +00:00
|
|
|
* @return number of polygons
|
2008-10-02 13:24:31 +00:00
|
|
|
* This function does not add holes for pads and tracks but calls
|
|
|
|
* AddClearanceAreasPolygonsToPolysList() to do that for copper layers
|
2008-09-26 19:51:36 +00:00
|
|
|
*/
|
2008-10-17 06:17:48 +00:00
|
|
|
int BuildFilledPolysListData( BOARD* aPcb );
|
2008-10-02 13:24:31 +00:00
|
|
|
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
|
|
|
* Function AddClearanceAreasPolygonsToPolysList
|
2008-10-02 13:24:31 +00:00
|
|
|
* Add non copper areas polygons (pads and tracks with clearence)
|
|
|
|
* to a filled copper area
|
|
|
|
* used in BuildFilledPolysListData when calculating filled areas in a zone
|
|
|
|
* Non copper areas are pads and track and their clearance area
|
|
|
|
* The filled copper area must be computed before
|
2008-10-11 19:27:43 +00:00
|
|
|
* BuildFilledPolysListData() call this function just after creating the
|
2008-10-02 13:24:31 +00:00
|
|
|
* filled copper area polygon (without clearence areas
|
|
|
|
* @param aPcb: the current board
|
|
|
|
*/
|
2008-10-17 06:17:48 +00:00
|
|
|
void AddClearanceAreasPolygonsToPolysList( BOARD* aPcb );
|
2008-01-23 22:39:09 +00:00
|
|
|
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
|
|
|
* Function CopyPolygonsFromBoolengineToFilledPolysList
|
2008-11-23 17:43:53 +00:00
|
|
|
* Copy (Add) polygons created by kbool (after Do_Operation) to m_FilledPolysList
|
|
|
|
* @param aBoolengine = the kbool engine used in Do_Operation
|
|
|
|
* @return the corner count
|
2009-08-06 18:30:46 +00:00
|
|
|
*/
|
|
|
|
int CopyPolygonsFromBoolengineToFilledPolysList( Bool_Engine* aBoolengine );
|
2008-11-23 17:43:53 +00:00
|
|
|
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
|
|
|
* Function CopyPolygonsFromFilledPolysListToBoolengine
|
2008-11-23 17:43:53 +00:00
|
|
|
* Copy (Add) polygons created by kbool (after Do_Operation) to m_FilledPolysList
|
|
|
|
* @param aBoolengine = kbool engine
|
|
|
|
* @param aGroup = group in kbool engine (GROUP_A or GROUP_B only)
|
|
|
|
* @return the corner count
|
2009-08-06 18:30:46 +00:00
|
|
|
*/
|
|
|
|
int CopyPolygonsFromFilledPolysListToBoolengine( Bool_Engine* aBoolengine,
|
|
|
|
GroupType aGroup = GROUP_A );
|
2008-11-23 17:43:53 +00:00
|
|
|
|
2009-08-06 18:30:46 +00:00
|
|
|
/**
|
2008-01-23 22:39:09 +00:00
|
|
|
* Function HitTestForCorner
|
|
|
|
* tests if the given wxPoint near a corner, or near the segment define by 2 corners.
|
2010-12-14 15:56:30 +00:00
|
|
|
* @return -1 if none, corner index in .corner <vector>
|
2008-01-23 22:39:09 +00:00
|
|
|
* @param refPos : A wxPoint to test
|
|
|
|
*/
|
2008-10-17 06:17:48 +00:00
|
|
|
int HitTestForCorner( const wxPoint& refPos );
|
2008-01-23 22:39:09 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function HitTestForEdge
|
|
|
|
* tests if the given wxPoint near a corner, or near the segment define by 2 corners.
|
2010-12-14 15:56:30 +00:00
|
|
|
* @return -1 if none, or index of the starting corner in .corner <vector>
|
2008-01-23 22:39:09 +00:00
|
|
|
* @param refPos : A wxPoint to test
|
|
|
|
*/
|
2008-10-17 06:17:48 +00:00
|
|
|
int HitTestForEdge( const wxPoint& refPos );
|
2008-01-23 22:39:09 +00:00
|
|
|
|
2008-01-06 12:43:57 +00:00
|
|
|
/**
|
|
|
|
* Function HitTest (overlayed)
|
|
|
|
* tests if the given EDA_Rect contains the bounds of this object.
|
|
|
|
* @param refArea : the given EDA_Rect
|
|
|
|
* @return bool - true if a hit, else false
|
|
|
|
*/
|
2008-10-17 06:17:48 +00:00
|
|
|
bool HitTest( EDA_Rect& refArea );
|
2008-01-06 12:43:57 +00:00
|
|
|
|
2008-01-23 22:39:09 +00:00
|
|
|
/**
|
2010-11-12 16:59:16 +00:00
|
|
|
* Function Fill_Zone
|
2008-01-23 22:39:09 +00:00
|
|
|
* Calculate the zone filling
|
|
|
|
* The zone outline is a frontier, and can be complex (with holes)
|
|
|
|
* The filling starts from starting points like pads, tracks.
|
|
|
|
* If exists the old filling is removed
|
|
|
|
* @param frame = reference to the main frame
|
|
|
|
* @param DC = current Device Context
|
|
|
|
* @param verbose = true to show error messages
|
|
|
|
* @return error level (0 = no error)
|
|
|
|
*/
|
2008-10-17 06:17:48 +00:00
|
|
|
int Fill_Zone( WinEDA_PcbFrame* frame, wxDC* DC, bool verbose = TRUE );
|
2008-01-23 22:39:09 +00:00
|
|
|
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
2010-11-12 16:59:16 +00:00
|
|
|
* Function Fill_Zone_Areas_With_Segments
|
2008-12-03 10:32:53 +00:00
|
|
|
* Fill sub areas in a zone with segments with m_ZoneMinThickness width
|
|
|
|
* A scan is made line per line, on the whole filled areas, with a step of m_ZoneMinThickness.
|
|
|
|
* all intersecting points with the horizontal infinite line and polygons to fill are calculated
|
|
|
|
* a list of SEGZONE items is built, line per line
|
|
|
|
* @return number of segments created
|
|
|
|
*/
|
2010-12-14 15:56:30 +00:00
|
|
|
int Fill_Zone_Areas_With_Segments();
|
2008-12-03 10:32:53 +00:00
|
|
|
|
|
|
|
|
2008-01-23 22:39:09 +00:00
|
|
|
/* Geometric transformations: */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Function Move
|
|
|
|
* Move the outlines
|
|
|
|
* @param offset = moving vector
|
|
|
|
*/
|
2009-08-06 18:30:46 +00:00
|
|
|
void Move( const wxPoint& offset );
|
2008-01-23 22:39:09 +00:00
|
|
|
|
|
|
|
/**
|
2008-02-01 21:30:45 +00:00
|
|
|
* Function MoveEdge
|
|
|
|
* Move the outline Edge. m_CornerSelection is the start point of the outline edge
|
|
|
|
* @param offset = moving vector
|
|
|
|
*/
|
2009-08-06 18:30:46 +00:00
|
|
|
void MoveEdge( const wxPoint& offset );
|
2008-02-01 21:30:45 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function Rotate
|
2008-01-23 22:39:09 +00:00
|
|
|
* Move the outlines
|
|
|
|
* @param centre = rot centre
|
|
|
|
* @param angle = in 0.1 degree
|
|
|
|
*/
|
2009-08-06 18:30:46 +00:00
|
|
|
void Rotate( const wxPoint& centre, int angle );
|
2008-01-23 22:39:09 +00:00
|
|
|
|
2009-08-01 19:26:05 +00:00
|
|
|
/**
|
|
|
|
* Function Flip
|
|
|
|
* Flip this object, i.e. change the board side for this object
|
|
|
|
* (like Mirror() but changes layer)
|
2010-12-14 15:56:30 +00:00
|
|
|
* @param aCentre - the rotation point.
|
2009-08-01 19:26:05 +00:00
|
|
|
*/
|
2009-08-06 18:30:46 +00:00
|
|
|
virtual void Flip( const wxPoint& aCentre );
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2008-01-23 22:39:09 +00:00
|
|
|
/**
|
|
|
|
* Function Mirror
|
|
|
|
* Mirror the outlines , relative to a given horizontal axis
|
|
|
|
* the layer is not changed
|
|
|
|
* @param mirror_ref = vertical axis position
|
|
|
|
*/
|
2009-08-06 18:30:46 +00:00
|
|
|
void Mirror( const wxPoint& mirror_ref );
|
2008-04-01 05:21:50 +00:00
|
|
|
|
2008-01-23 22:39:09 +00:00
|
|
|
/**
|
|
|
|
* Function GetClass
|
|
|
|
* returns the class name.
|
|
|
|
* @return wxString
|
|
|
|
*/
|
|
|
|
wxString GetClass() const
|
|
|
|
{
|
|
|
|
return wxT( "ZONE_CONTAINER" );
|
|
|
|
}
|
2008-04-01 05:21:50 +00:00
|
|
|
|
2008-09-26 19:51:36 +00:00
|
|
|
|
2008-04-01 05:21:50 +00:00
|
|
|
/** Acces to m_Poly parameters
|
2008-09-26 19:51:36 +00:00
|
|
|
*/
|
2008-04-01 05:21:50 +00:00
|
|
|
|
2010-12-10 19:47:44 +00:00
|
|
|
int GetNumCorners( void ) const
|
2008-04-01 05:21:50 +00:00
|
|
|
{
|
|
|
|
return m_Poly->GetNumCorners();
|
|
|
|
}
|
|
|
|
|
2008-09-26 19:51:36 +00:00
|
|
|
|
|
|
|
void RemoveAllContours( void )
|
2008-04-01 05:21:50 +00:00
|
|
|
{
|
|
|
|
m_Poly->RemoveAllContours();
|
|
|
|
}
|
|
|
|
|
2008-09-26 19:51:36 +00:00
|
|
|
|
2010-12-10 19:47:44 +00:00
|
|
|
wxPoint GetCornerPosition( int aCornerIndex ) const
|
2008-04-01 05:21:50 +00:00
|
|
|
{
|
2008-09-26 19:51:36 +00:00
|
|
|
return wxPoint( m_Poly->GetX( aCornerIndex ), m_Poly->GetY( aCornerIndex ) );
|
2008-04-01 05:21:50 +00:00
|
|
|
}
|
|
|
|
|
2008-09-26 19:51:36 +00:00
|
|
|
|
|
|
|
void SetCornerPosition( int aCornerIndex, wxPoint new_pos )
|
2008-04-01 05:21:50 +00:00
|
|
|
{
|
2008-09-26 19:51:36 +00:00
|
|
|
m_Poly->SetX( aCornerIndex, new_pos.x );
|
|
|
|
m_Poly->SetY( aCornerIndex, new_pos.y );
|
2008-04-01 05:21:50 +00:00
|
|
|
}
|
|
|
|
|
2008-09-26 19:51:36 +00:00
|
|
|
|
2008-04-01 05:21:50 +00:00
|
|
|
void AppendCorner( wxPoint position )
|
|
|
|
{
|
|
|
|
m_Poly->AppendCorner( position.x, position.y );
|
|
|
|
}
|
2008-10-23 10:26:06 +00:00
|
|
|
|
2009-08-06 18:30:46 +00:00
|
|
|
|
2008-10-23 10:26:06 +00:00
|
|
|
int GetHatchStyle() const
|
|
|
|
{
|
|
|
|
return m_Poly->GetHatchStyle();
|
|
|
|
}
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
2010-11-12 16:59:16 +00:00
|
|
|
* Function IsSame
|
2009-08-23 15:22:44 +00:00
|
|
|
* test is 2 zones are equivalent:
|
|
|
|
* 2 zones are equivalent if they have same parameters and same outlines
|
|
|
|
* info relative to filling is not take in account
|
|
|
|
* @param aZoneToCompare = zone to compare with "this"
|
|
|
|
*/
|
|
|
|
bool IsSame( const ZONE_CONTAINER &aZoneToCompare);
|
2007-12-09 12:59:06 +00:00
|
|
|
};
|
|
|
|
|
2008-01-23 22:39:09 +00:00
|
|
|
|
|
|
|
#endif // #ifndef CLASS_ZONE_H
|