#include <pathops.h>
Inheritance diagram for OpMakeSegmentsLines:
Public Member Functions | |
OpMakeSegmentsLines () | |
OpMakeSegmentsLines constructor - does nothing itself. | |
Static Public Member Functions | |
static BOOL | Init () |
OpMakeSegmentsLines initialiser method. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
Protected Member Functions | |
virtual INT32 | GetProcessPathType () |
virtual INT32 | GetPathType () |
BOOL | ProcessSegment (NodePath *pPath, INT32 *Index, INT32 PrevIndex) |
Performs the make selected segments into lines operation. |
Definition at line 157 of file pathops.h.
|
OpMakeSegmentsLines constructor - does nothing itself.
Definition at line 424 of file pathops.cpp.
|
|
Reimplemented from OpBaseConvertPathSegment. Definition at line 168 of file pathops.h. 00168 {return PT_LINETO;}
|
|
Reimplemented from OpBaseConvertPathSegment. Definition at line 167 of file pathops.h. 00167 {return PT_BEZIERTO;}
|
|
Definition at line 458 of file pathops.cpp. 00459 { 00460 return OpBaseConvertPathSegment::BaseGetState(PT_LINETO); 00461 }
|
|
OpMakeSegmentsLines initialiser method.
Reimplemented from SimpleCCObject. Definition at line 444 of file pathops.cpp. 00445 { 00446 return (RegisterOpDescriptor( 0, 00447 _R(IDS_MAKELINES), 00448 CC_RUNTIME_CLASS(OpMakeSegmentsLines), 00449 OPTOKEN_MAKELINESOP, 00450 OpMakeSegmentsLines::GetState, 00451 0, /* help ID */ 00452 _R(IDBBL_MAKELINES), 00453 0 /* bitmap ID */)); 00454 }
|
|
Performs the make selected segments into lines operation.
Reimplemented from OpBaseConvertPathSegment. Definition at line 479 of file pathops.cpp. 00480 { 00481 // Get the path pointers 00482 PathVerb* Verbs; 00483 PathFlags* Flags; 00484 DocCoord* Coords; 00485 pPath->InkPath.GetPathArrays(&Verbs, &Coords, &Flags); 00486 00487 // Quick check 00488 ERROR2IF(((Verbs[*Index] & ~PT_CLOSEFIGURE) != PT_BEZIERTO), FALSE, "Unknown segment encountered"); 00489 ERROR2IF(((PrevIndex+3) != *Index), FALSE, "Not two points between segment start and end"); 00490 00491 // BOOL ok = TRUE; 00492 00493 DocCoord EndCoord = Coords[*Index]; 00494 PathFlags EndFlags = Flags[*Index]; 00495 PathVerb NewEndVerb = Verbs[*Index]; 00496 NewEndVerb = (NewEndVerb == PT_BEZIERTO) ? PT_LINETO : PT_LINETO | PT_CLOSEFIGURE; 00497 00498 BOOL DoneOK = TRUE; 00499 00500 // Insert a line segment 00501 if (DoneOK) 00502 DoneOK = DoInsertPathElement(pPath, PrevIndex, EndCoord, EndFlags, NewEndVerb, FALSE); 00503 00504 // Remove the curve segment 00505 if (DoneOK) 00506 DoneOK = DoDeletePathSection(pPath, PrevIndex+2, 3, FALSE); 00507 00508 *Index = PrevIndex+1; 00509 00510 return DoneOK; 00511 }
|