Old fashion design for PC-104
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

94 lines
1.8 KiB

//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright © 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 06/02/2002
// PROJECT:
// SUBSYSTEM:
// FILE: LgPolygon.cpp
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Source file of LgPolygon.cpp
//----------------------------------------------------------------------------
#include "stdafx.h"
#include "..\LgLib\Version.h"
#include "LgPolygon.h"
CLgPolygon::CLgPolygon()
{
m_pPoint = NULL;
m_nCount = 0;
}
CLgPolygon::~CLgPolygon()
{
RemoveAll();
}
BOOL CLgPolygon::Add( CLgDPoint &dp )
{
m_pPoint = (CLgDPoint*)realloc( m_pPoint, sizeof(CLgDPoint) * ( m_nCount + 1 ) );
if( !m_pPoint )
{
m_nCount = 0;
return FALSE;
}
m_pPoint[m_nCount++] = dp;
return TRUE;
}
void CLgPolygon::RemoveAll()
{
if( m_pPoint )
{
free( m_pPoint );
m_pPoint = NULL;
}
m_nCount = 0;
}
//--------------------------------
CLgPolyPolygon::CLgPolyPolygon()
{
}
CLgPolyPolygon::~CLgPolyPolygon()
{
}
/*
typedef enum
{
LGCPPCPT_GET_COUNT, // get number of points in polygon
LGCPPCPT_GET_POINT, // get exact point in poligon
LGCPPCPT_SET_LINE // return line segment
}LGCPPCPT;
typedef struct
{
LGCPPCPT nType;
// used with LGCPPCPT_GET_COUNT and LGCPPCPT_GET_POINT
INT nPolygon;
INT nCount;
INT nPoint;
double X;
double Y;
// used with LGCPPCPT_SET_LINE
INT nLine;
double R1;
double R2;
}LGCPPCPARAM, *PLGCPPCPARAM;
typedef BOOL (PLGCUTPOLYPOLYGONCALLBACK)( PLGCPPCPARAM );
BOOL LgCutPolyPolygon( INT nLines, INT nPolyCount, INT **ppCounts, double **ppPoints, )
BOOL LgCutPolyPolygon( INT nLines, INT nPolyCount, PLGCUTPOLYPOLYGONCALLBACK pCallback )
{
}
*/