#include <brpress.h>
Inheritance diagram for TimeStampBrushPoint:
Public Member Functions | |
TimeStampBrushPoint () | |
Default Constuctor for TimeStampBrushPoint. | |
TimeStampBrushPoint (CPathPointInfo PointInfo) | |
Constuctor for TimeStampBrushPoint. | |
TimeStampBrushPoint (DocCoord Point, double Tangent, MILLIPOINT Distance) | |
Constuctor for TimeStampBrushPoint. | |
TimeStampBrushPoint (CPathPointInfo PointInfo, MILLIPOINT Distance) | |
Constuctor for TimeStampBrushPoint. | |
void | WorkOutProportion (MILLIPOINT PathLength) |
calculates how far along the path we are and sets the member variable | |
BOOL | WriteNative (CXaraFileRecord *pRecord) |
Writes out a record of this TSBP to the record supplied. Note that because TSBPs are generally part of a larger object they do not have their own tag etc. This function is merely a convenience function. | |
TimeStampBrushPoint | operator= (TimeStampBrushPoint OtherPoint) |
assignment operator | |
Static Public Member Functions | |
static INT32 | ComparePointInfo (const void *Point1, const void *Point2) |
Compares the two points by their distances, note that they are specified as void* so that I can supply this fn.to qsort. | |
Public Attributes | |
MILLIPOINT | m_Distance |
double | m_Proportion |
Definition at line 208 of file brpress.h.
|
Default Constuctor for TimeStampBrushPoint.
Definition at line 306 of file brpress.cpp. 00306 : BrushPointInfo() 00307 { 00308 m_Distance = -1; 00309 m_Proportion = -1; 00310 }
|
|
Constuctor for TimeStampBrushPoint.
Definition at line 325 of file brpress.cpp. 00326 { 00327 m_Point = PathInfo.m_Point; 00328 m_Tangent = PathInfo.m_Tangent; 00329 m_Distance = -1; 00330 m_Proportion = -1; 00331 }
|
|
Constuctor for TimeStampBrushPoint.
Definition at line 366 of file brpress.cpp. 00367 { 00368 m_Point = Point; 00369 m_Tangent = Tangent; 00370 m_Distance = Distance; 00371 }
|
|
Constuctor for TimeStampBrushPoint.
Definition at line 345 of file brpress.cpp. 00346 { 00347 m_Point = PathInfo.m_Point; 00348 m_Tangent = PathInfo.m_Tangent; 00349 m_Distance = Distance; 00350 m_Proportion = -1; 00351 }
|
|
Compares the two points by their distances, note that they are specified as void* so that I can supply this fn.to qsort.
Definition at line 438 of file brpress.cpp. 00439 { 00440 TimeStampBrushPoint* pPoint1 = (TimeStampBrushPoint*)Point1; 00441 TimeStampBrushPoint* pPoint2 = (TimeStampBrushPoint*)Point2; 00442 00443 if (pPoint1->m_Distance < pPoint2->m_Distance) 00444 return -1; 00445 if (pPoint1->m_Distance > pPoint2->m_Distance) 00446 return 1; 00447 00448 return 0; 00449 }
|
|
assignment operator
Definition at line 384 of file brpress.cpp. 00385 { 00386 m_Point = Other.m_Point; 00387 m_Tangent = Other.m_Tangent; 00388 m_Distance = Other.m_Distance; 00389 m_Proportion = Other.m_Proportion; 00390 00391 return *this; 00392 }
|
|
calculates how far along the path we are and sets the member variable
Definition at line 406 of file brpress.cpp. 00407 { 00408 if (m_Distance < 0 || m_Distance > PathLength) 00409 { 00410 // ERROR3("Attempting to calculate proportional distance with invalid data"); 00411 TRACEUSER( "Diccon", _T("Invalid distance: %d, Path Length: %d\n"), m_Distance, PathLength ); 00412 m_Proportion = 1.0; 00413 return; 00414 } 00415 m_Proportion = (double)((double)m_Distance / (double)PathLength); 00416 //if (m_Proportion < 0) 00417 // TRACEUSER( "Diccon", _T("Proportion: %f\n"), m_Proportion); 00418 00419 }
|
|
Writes out a record of this TSBP to the record supplied. Note that because TSBPs are generally part of a larger object they do not have their own tag etc. This function is merely a convenience function.
Definition at line 469 of file brpress.cpp. 00470 { 00471 ERROR2IF(pRecord == NULL, FALSE, "Record is NULL in TimeStampBrushPoint::WriteNative"); 00472 00473 BOOL ok = pRecord->WriteCoord(m_Point); 00474 TRACEUSER( "Diccon", _T("Wrote Point %d, %d\n"), m_Point.x, m_Point.y ); 00475 if (ok) ok = pRecord->WriteDOUBLE(m_Tangent); 00476 if (ok) ok = pRecord->WriteDOUBLE(m_Proportion); 00477 if (ok) ok = pRecord->WriteINT32(m_Distance); 00478 00479 return ok; 00480 }
|
|
|
|
|