CCreateBevelTrapezoids Class Reference

#include <bevtrap.h>

Inheritance diagram for CCreateBevelTrapezoids:

CCObject SimpleCCObject List of all members.

Public Member Functions

BOOL ProcessTrapsForBevelling (Path *pPath, TrapsList *RetnTraps, INT32 indent, JointType jType, BOOL bOuter)

Static Public Member Functions

static void CalcInnerPoint (TrapEdge *pEdge, INT32 indent, DocCoord *dc, BOOL bOuter)
static BOOL CalculateIntersection (const DocCoord *start1, const NormCoord *dir1, const DocCoord *start2, const NormCoord *dir2, DocCoord *point, double *p, double *q)
 Turns the path into trapezoids which can be used for the bevelling Calculates the intersection between 2 lines.
static void GetPathFromTraps (TrapsList *pTraps, const MILLIPOINT Width, Path *pPath)
static BOOL EliminateMultpilePoints (Path *pSrc, Path *pDest)

Private Member Functions

 CC_DECLARE_DYNCREATE (CCreateBevelTrapezoids)
BOOL IsOuterTurn (NormCoord *nc1, NormCoord *nc2)
BOOL AddEdgeToList (TrapEdgeList *pList, DocCoord *Centre, NormCoord *Normal, double Position, NormCoord *pNormal2=NULL)
BOOL SmoothCorners (TrapsList *pList, TrapsList *RetnList, double Indent, BOOL bOuterBevel)
INT32 AlterIndex (INT32 index, INT32 max, INT32 offset)
BOOL ProcessPath (Path *pPath, TrapsList *RetnTraps, INT32 indent, BOOL bOuter, JointType jType)
void CreateRoundJoin (TrapEdgeList *pList, DocCoord *pCentre, NormCoord *pStartNorm, NormCoord *pEndNorm, INT32 depth=0)
void FlattenInnerPoints (TrapEdgeList *pList, INT32 indent, BOOL bOuter)
void RecursivelyAddEdges (TrapEdgeList *pList, DocCoord *pCentre1, DocCoord *pCentre2, DocCoord *pInnerPoint, double MOneDivIndent, INT32 depth=0)

Detailed Description

Definition at line 105 of file bevtrap.h.


Member Function Documentation

BOOL CCreateBevelTrapezoids::AddEdgeToList TrapEdgeList pList,
DocCoord Centre,
NormCoord Normal,
double  Position,
NormCoord pNormal2 = NULL
[private]
 

INT32 CCreateBevelTrapezoids::AlterIndex INT32  index,
INT32  max,
INT32  offset
[private]
 

static void CCreateBevelTrapezoids::CalcInnerPoint TrapEdge pEdge,
INT32  indent,
DocCoord dc,
BOOL  bOuter
[static]
 

BOOL CCreateBevelTrapezoids::CalculateIntersection const DocCoord start1,
const NormCoord dir1,
const DocCoord start2,
const NormCoord dir2,
DocCoord point,
double *  p,
double *  q
[static]
 

Turns the path into trapezoids which can be used for the bevelling Calculates the intersection between 2 lines.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
24/9/98
Parameters:
Start point and direction of each of the lines [INPUTS]
Returns:
The point in *point and the distance along dir1 from start1 of this point. Also returns FALSE if the lines are in the same direction (i.e. no intersection)
See also:
-

Definition at line 743 of file bevtrap.cpp.

00746 {
00747     // just turning the start points into doubles
00748     NormCoord nStart1;
00749     NormCoord nStart2;
00750         
00751     nStart1.x = start1->x;
00752     nStart1.y = start1->y;
00753 
00754     nStart2.x = start2->x;
00755     nStart2.y = start2->y;
00756 
00757     double div = (dir2->y * dir1->x - dir2->x * dir1->y);
00758     if (div == 0)
00759         return FALSE;
00760     
00761     // find the parametric value for the first line defining the point
00762     double rdiv = 1.0/div;
00763 
00764     double a = dir2->y * (nStart2.x - nStart1.x) + dir2->x * (nStart1.y - nStart2.y);
00765     a *= rdiv;
00766 
00767     point->x = (INT32)(nStart1.x + dir1->x * a);
00768     point->y = (INT32)(nStart1.y + dir1->y * a);
00769 
00770     *p = a;
00771 
00772     a = dir1->y * (nStart2.x - nStart1.x) + dir1->x * (nStart1.y - nStart2.y);
00773     a *= rdiv;
00774 
00775     *q = a;
00776 
00777     return TRUE;
00778 }

CCreateBevelTrapezoids::CC_DECLARE_DYNCREATE CCreateBevelTrapezoids   )  [private]
 

void CCreateBevelTrapezoids::CreateRoundJoin TrapEdgeList pList,
DocCoord pCentre,
NormCoord pStartNorm,
NormCoord pEndNorm,
INT32  depth = 0
[private]
 

static BOOL CCreateBevelTrapezoids::EliminateMultpilePoints Path pSrc,
Path pDest
[static]
 

void CCreateBevelTrapezoids::FlattenInnerPoints TrapEdgeList pList,
INT32  indent,
BOOL  bOuter
[private]
 

static void CCreateBevelTrapezoids::GetPathFromTraps TrapsList pTraps,
const MILLIPOINT  Width,
Path pPath
[static]
 

BOOL CCreateBevelTrapezoids::IsOuterTurn NormCoord nc1,
NormCoord nc2
[private]
 

BOOL CCreateBevelTrapezoids::ProcessPath Path pPath,
TrapsList RetnTraps,
INT32  indent,
BOOL  bOuter,
JointType  jType
[private]
 

BOOL CCreateBevelTrapezoids::ProcessTrapsForBevelling Path pPath,
TrapsList RetnTraps,
INT32  indent,
JointType  jType,
BOOL  bOuter
 

void CCreateBevelTrapezoids::RecursivelyAddEdges TrapEdgeList pList,
DocCoord pCentre1,
DocCoord pCentre2,
DocCoord pInnerPoint,
double  MOneDivIndent,
INT32  depth = 0
[private]
 

BOOL CCreateBevelTrapezoids::SmoothCorners TrapsList pList,
TrapsList RetnList,
double  Indent,
BOOL  bOuterBevel
[private]
 


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:52:11 2007 for Camelot by  doxygen 1.4.4