#include <brushop.h>
Inheritance diagram for ChangeBrushDefAction:
Public Member Functions | |
ChangeBrushDefAction () | |
Constructor for the action. | |
~ChangeBrushDefAction () | |
destructor for the action | |
virtual ActionCode | Execute () |
Executes the action. This will reset the brush variables to their old values. | |
Static Public Member Functions | |
static ActionCode | Init (Operation *pOp, ActionList *pActionList, ChangeBrushDefOpParam *pChangeParam, ChangeBrushDefAction **NewAction) |
This is the function which creates an instance of this action. If there is no room in the undo buffer (which is determined by the base class Init function called within) the function will either return AC_NO_RECORD which means the operation can continue, but no undo information needs to be stored, or AC_OK which means the operation should continue AND record undo information. If the function returns AC_FAIL, there was not enough memory to record the undo information, and the user has decided not to continue with the operation. | |
Static Protected Member Functions | |
static BOOL | ChangeBrushName (String_32 Name, BrushDefinition *pBrushDef) |
Sets the name member for this brush. | |
static BOOL | ChangeBrushSpacing (MILLIPOINT NewSpacing, BrushDefinition *pBrushDef) |
To set the brush spacing of this attribute node. | |
static BOOL | ChangeSpacingIncrProp (double NewIncr, BrushDefinition *pBrushDef) |
To set the brush spacing of this attribute node. | |
static BOOL | ChangeSpacingIncrConst (MILLIPOINT NewIncr, BrushDefinition *pBrushDef) |
To set the brush spacing of this attribute node. | |
static BOOL | ChangeBrushScaling (double NewScaling, BrushDefinition *pBrushDef) |
To set the brush scaling of this attribute node. | |
static BOOL | ChangeScalingRandSeed (UINT32 NewSeed, BrushDefinition *pBrushDef) |
Sets a new seed for the scaling RNG. | |
static BOOL | ChangeScalingIncr (double NewIncr, BrushDefinition *pBrushDef) |
To set the brush scaling of this attribute node. | |
static BOOL | ChangeScalingIncrConst (double Incr, BrushDefinition *pBrushDef) |
To set the brush scaling of this attribute node. | |
static BOOL | ChangeScalingPressure (UINT32 Pressure, BrushDefinition *pBrushDef) |
Sets a new seed for the scaling RNG. | |
static BOOL | ChangeScalingMaxRand (UINT32 NewMax, BrushDefinition *pBrushDef) |
To set the amount of brush scaling determined by randomness. | |
static BOOL | ChangeTangential (BOOL bRotate, BrushDefinition *pBrushDef) |
static BOOL | ChangeRotation (double NewAngle, BrushDefinition *pBrushDef) |
static BOOL | ChangeRotationRandSeed (UINT32 NewSeed, BrushDefinition *pBrushDef) |
static BOOL | ChangeRotationMaxRand (UINT32 NewMax, BrushDefinition *pBrushDef) |
static BOOL | ChangeRotationMaxPressure (UINT32 Pressure, BrushDefinition *pBrushDef) |
static BOOL | ChangeOffsetValue (MILLIPOINT NewOffset, BrushDefinition *pBrushDef) |
To set the offset value of this attribute node. | |
static BOOL | ChangeOffsetType (PathOffset NewOffset, BrushDefinition *pBrushDef) |
To set the offset value of this attribute node. | |
static BOOL | ChangeOffsetTypeSeed (UINT32 NewSeed, BrushDefinition *pBrushDef) |
Sets the seed for the offset type RNG. | |
static BOOL | ChangeOffsetIncrProp (double NewIncrProp, BrushDefinition *pBrushDef) |
To set the offset value of this attribute node. | |
static BOOL | ChangeOffsetIncrConst (MILLIPOINT NewIncrConst, BrushDefinition *pBrushDef) |
To set the offset value of this attribute node. | |
static BOOL | ChangeOffsetValMaxRand (UINT32 NewMax, BrushDefinition *pBrushDef) |
To set how much the offset is determined randomly. | |
static BOOL | ChangeOffsetValRandSeed (UINT32 NewSeed, BrushDefinition *pBrushDef) |
To set the seed for the offset value RNG. | |
static BOOL | ChangeBrushTile (BOOL bTile, BrushDefinition *pBrushDef) |
static BOOL | ChangeSpacingMaxRand (UINT32 NewMaxRand, BrushDefinition *pBrushDef) |
To set the maximum random value for spacing for this attribute node. | |
static BOOL | ChangeSpacingRandSeed (UINT32 NewSeed, BrushDefinition *pBrushDef) |
To set the random seed for spacing for this attribute node. | |
static BOOL | ChangeUseLocalFillColour (BOOL bUseLocal, BrushDefinition *pBrushDef) |
Sets the flag telling this attribute whether to use local attributes. | |
static BOOL | ChangeUseLocalGradFill (BOOL bUseLocal, BrushDefinition *pBrushDef) |
static BOOL | ChangeSequenceType (SequenceType SeqType, BrushDefinition *pBrushDef) |
Sets the flag telling this attribute what type of object sequence to use. | |
static BOOL | ChangeSequenceSeed (UINT32 NewSeed, BrushDefinition *pBrushDef) |
Seeds the sequence random number generator. | |
static BOOL | ChangeAll (ChangeBrushOpParam *pParam, BrushDefinition *pBrushDef) |
Sets all the variables in the opparam. | |
static BOOL | ChangeTimeStamp (double NewValue, BrushDefinition *pBrushDef) |
sets the timestamping value for this definition | |
Protected Attributes | |
ChangeBrushDefOpParam | m_ChangeParam |
Definition at line 189 of file brushop.h.
|
Constructor for the action.
Definition at line 343 of file brushop.cpp.
|
|
destructor for the action
Definition at line 364 of file brushop.cpp.
|
|
Sets all the variables in the opparam.
Definition at line 1277 of file brushop.cpp. 01278 { 01279 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL in ChangeBrushDefAction::ChangeAll"); 01280 ERROR2IF(pParam == NULL, FALSE, "OpParam is NULL in ChangeBrushDefAction::ChangeAll"); 01281 01282 01283 // scaling members 01284 BOOL ok = pBrushDef->SetBrushScaling(pParam->m_NewScaling); 01285 if (ok) ok = pBrushDef->SetBrushScalingIncr(pParam->m_NewScalingIncr); 01286 if (ok) ok = pBrushDef->SetBrushScalingIncrConst(pParam->m_NewScalingIncrConst); 01287 pBrushDef->SetScalingMaxRand(pParam->m_NewScalingMaxRand); 01288 pBrushDef->SetScalingRandSeed(pParam->m_NewScalingRandSeed); 01289 if (ok) ok = pBrushDef->SetScalingMaxPressure(pParam->m_NewScalingMaxPressure); 01290 01291 // spacing members 01292 if (ok) ok = pBrushDef->SetSpacing(pParam->m_NewSpacing); 01293 if (ok) ok = pBrushDef->SetSpacingIncrConst(pParam->m_NewSpacingIncrConst); 01294 if (ok) ok = pBrushDef->SetSpacingIncrProp(pParam->m_NewSpacingIncrProp); 01295 pBrushDef->SetSpacingMaxRand(pParam->m_NewSpacingMaxRand); 01296 pBrushDef->SetSpacingRandSeed(pParam->m_NewSpacingRandSeed); 01297 01298 01299 // offset members 01300 pBrushDef->SetPathOffsetType(pParam->m_NewPathOffsetType); 01301 pBrushDef->SetPathOffsetValue(pParam->m_NewPathOffsetVal); 01302 if (ok) ok = pBrushDef->SetPathOffsetIncrConst(pParam->m_NewOffsetIncrConst); 01303 if (ok) ok = pBrushDef->SetPathOffsetIncrProp(pParam->m_NewOffsetIncrProp); 01304 pBrushDef->SetOffsetTypeRandSeed(pParam->m_NewOffsetTypeRandSeed); 01305 if (ok) ok = pBrushDef->SetOffsetValueMaxRand(pParam->m_NewOffsetValMaxRand); 01306 pBrushDef->SetOffsetValueRandSeed(pParam->m_NewOffsetValRandSeed); 01307 01308 // rotation members 01309 pBrushDef->SetRotated(pParam->m_bNewRotated); 01310 if (ok) ok = pBrushDef->SetRotationAngle(pParam->m_NewRotateAngle); 01311 pBrushDef->SetRotationIncrConst(pParam->m_NewRotationIncrConst); 01312 pBrushDef->SetRotationIncrProp(pParam->m_NewRotationIncrProp); 01313 pBrushDef->SetRotationMaxRand(pParam->m_NewRotateMaxRand); 01314 pBrushDef->SetRotationMaxPressure(pParam->m_NewRotationMaxPressure); 01315 01316 // sequence members 01317 pBrushDef->SetSequenceType(pParam->m_NewSequenceType); 01318 pBrushDef->SetSequenceSeed(pParam->m_NewSequenceRandSeed); 01319 pBrushDef->SetTiling(pParam->m_bNewTiled); 01320 01321 if (ok) ok = pBrushDef->SetHueIncrement(1.0); 01322 if (ok) ok = pBrushDef->SetHueMaxRand(pParam->m_NewHueMaxRand); 01323 if (ok) ok = pBrushDef->SetHueRandSeed(pParam->m_NewHueRandSeed); 01324 if (ok) ok = pBrushDef->SetSatIncrement(0.0); 01325 if (ok) ok = pBrushDef->SetSatMaxRand(pParam->m_NewSatMaxRand); 01326 if (ok) ok = pBrushDef->SetSatRandSeed(pParam->m_NewSatRandSeed); 01327 01328 if (ok) ok = pBrushDef->SetBrushTransparency(pParam->m_NewTransp); 01329 if (ok) ok = pBrushDef->SetTransparencyPressure(pParam->m_NewTranspPressure); 01330 return ok; 01331 }
|
|
Sets the name member for this brush.
Definition at line 618 of file brushop.cpp. 00619 { 00620 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 00621 00622 pBrushDef->SetLineName(&Name); 00623 00624 return TRUE; 00625 }
|
|
To set the brush scaling of this attribute node.
Definition at line 708 of file brushop.cpp. 00709 { 00710 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 00711 00712 return pBrushDef->SetBrushScaling(NewScaling); 00713 }
|
|
To set the brush spacing of this attribute node.
Definition at line 642 of file brushop.cpp. 00643 { 00644 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 00645 00646 return pBrushDef->SetSpacing(NewSpacing); 00647 }
|
|
Definition at line 922 of file brushop.cpp. 00923 { 00924 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 00925 pBrushDef->SetTiling(bTile); 00926 00927 return TRUE; 00928 }
|
|
To set the offset value of this attribute node.
Definition at line 1017 of file brushop.cpp. 01018 { 01019 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 01020 01021 pBrushDef->SetPathOffsetIncrConst(NewIncrConst); 01022 01023 return TRUE; 01024 }
|
|
To set the offset value of this attribute node.
Definition at line 992 of file brushop.cpp. 00993 { 00994 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 00995 00996 pBrushDef->SetPathOffsetIncrProp(NewIncrProp); 00997 00998 return TRUE; 00999 }
|
|
To set the offset value of this attribute node.
Definition at line 1089 of file brushop.cpp. 01090 { 01091 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 01092 01093 pBrushDef->SetPathOffsetType(NewOffset); 01094 return TRUE; 01095 }
|
|
Sets the seed for the offset type RNG.
Definition at line 1112 of file brushop.cpp. 01113 { 01114 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 01115 01116 pBrushDef->SetOffsetTypeRandSeed(NewSeed); 01117 01118 return TRUE; 01119 }
|
|
To set how much the offset is determined randomly.
Definition at line 1042 of file brushop.cpp. 01043 { 01044 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 01045 01046 pBrushDef->SetOffsetValueMaxRand(NewMax); 01047 01048 return TRUE; 01049 }
|
|
To set the seed for the offset value RNG.
Definition at line 1066 of file brushop.cpp. 01067 { 01068 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 01069 01070 pBrushDef->SetOffsetValueRandSeed(NewSeed); 01071 01072 return TRUE; 01073 }
|
|
To set the offset value of this attribute node.
Definition at line 968 of file brushop.cpp. 00969 { 00970 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 00971 00972 pBrushDef->SetPathOffsetValue(NewOffset); 00973 00974 return TRUE; 00975 }
|
|
Definition at line 838 of file brushop.cpp. 00839 { 00840 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 00841 00842 return pBrushDef->SetRotationAngle(NewAngle); 00843 }
|
|
Definition at line 903 of file brushop.cpp. 00904 { 00905 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 00906 00907 return pBrushDef->SetRotationMaxPressure(Pressure); 00908 }
|
|
Definition at line 859 of file brushop.cpp. 00860 { 00861 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 00862 00863 return pBrushDef->SetRotationMaxRand(NewMax); 00864 }
|
|
Definition at line 880 of file brushop.cpp. 00881 { 00882 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 00883 00884 pBrushDef->SetRotationRandSeed(NewSeed); 00885 00886 return TRUE; 00887 }
|
|
To set the brush scaling of this attribute node.
Definition at line 730 of file brushop.cpp. 00731 { 00732 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 00733 00734 return pBrushDef->SetBrushScalingIncr(NewIncr); 00735 }
|
|
To set the brush scaling of this attribute node.
Definition at line 752 of file brushop.cpp. 00753 { 00754 ERROR2IF(pBrushDef == NULL, FALSE, "brush definition is NULL"); 00755 00756 return pBrushDef->SetBrushScalingIncrConst(Incr); 00757 }
|
|
To set the amount of brush scaling determined by randomness.
Definition at line 773 of file brushop.cpp. 00774 { 00775 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 00776 00777 return pBrushDef->SetScalingMaxRand(NewMax); 00778 }
|
|
Sets a new seed for the scaling RNG.
Definition at line 818 of file brushop.cpp. 00819 { 00820 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 00821 00822 return pBrushDef->SetScalingMaxPressure(Pressure); 00823 }
|
|
Sets a new seed for the scaling RNG.
Definition at line 795 of file brushop.cpp. 00796 { 00797 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 00798 00799 pBrushDef->SetScalingRandSeed(NewSeed); 00800 return TRUE; 00801 }
|
|
Seeds the sequence random number generator.
Definition at line 1232 of file brushop.cpp. 01233 { 01234 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 01235 01236 pBrushDef->SetSequenceSeed(NewSeed); 01237 return TRUE; 01238 }
|
|
Sets the flag telling this attribute what type of object sequence to use.
Definition at line 1208 of file brushop.cpp. 01209 { 01210 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 01211 01212 pBrushDef->SetSequenceType(NewSeq); 01213 return TRUE; 01214 }
|
|
To set the brush spacing of this attribute node.
Definition at line 686 of file brushop.cpp. 00687 { 00688 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 00689 00690 return pBrushDef->SetSpacingIncrConst(NewIncr); 00691 }
|
|
To set the brush spacing of this attribute node.
Definition at line 664 of file brushop.cpp. 00665 { 00666 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 00667 00668 return pBrushDef->SetSpacingIncrProp(NewIncr); 00669 }
|
|
To set the maximum random value for spacing for this attribute node.
Definition at line 1138 of file brushop.cpp. 01139 { 01140 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 01141 01142 pBrushDef->SetSpacingMaxRand(NewMaxRand); 01143 01144 return TRUE; 01145 }
|
|
To set the random seed for spacing for this attribute node.
Definition at line 1162 of file brushop.cpp. 01163 { 01164 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 01165 01166 pBrushDef->SetSpacingRandSeed(NewSeed); 01167 01168 return TRUE; 01169 }
|
|
Definition at line 944 of file brushop.cpp. 00945 { 00946 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 00947 00948 pBrushDef->SetRotated(bRotate); 00949 00950 return TRUE; 00951 }
|
|
sets the timestamping value for this definition
Definition at line 1256 of file brushop.cpp. 01257 { 01258 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 01259 01260 return pBrushDef->SetTimeStampingPeriod(NewTime); 01261 }
|
|
Sets the flag telling this attribute whether to use local attributes.
Definition at line 1186 of file brushop.cpp. 01187 { 01188 ERROR2IF(pBrushDef == NULL, FALSE, "brush attribute is NULL"); 01189 01190 return TRUE; 01191 }
|
|
|
|
Executes the action. This will reset the brush variables to their old values.
Reimplemented from Action. Definition at line 591 of file brushop.cpp. 00592 { 00593 m_ChangeParam.SwapOldAndNew(); 00594 00595 ActionCode Act; 00596 ChangeBrushDefAction* pAction; 00597 Act = ChangeBrushDefAction::Init(pOperation,pOppositeActLst,&m_ChangeParam,&pAction); 00598 00599 return Act; 00600 }
|
|
This is the function which creates an instance of this action. If there is no room in the undo buffer (which is determined by the base class Init function called within) the function will either return AC_NO_RECORD which means the operation can continue, but no undo information needs to be stored, or AC_OK which means the operation should continue AND record undo information. If the function returns AC_FAIL, there was not enough memory to record the undo information, and the user has decided not to continue with the operation.
Definition at line 401 of file brushop.cpp. 00405 { 00406 ERROR2IF(pChangeParam == NULL,AC_FAIL,"pChangeParam is NULL"); 00407 00408 // just check that we do actually have a brush definition 00409 00410 // get the brush component from the document 00411 Document* pDoc = Document::GetCurrent(); 00412 ERROR2IF(pDoc == NULL, AC_FAIL, "Wheres the document?"); 00413 BrushComponent* pBrushComp = (BrushComponent*)pDoc->GetDocComponent(CC_RUNTIME_CLASS(BrushComponent)); 00414 ERROR2IF(pBrushComp == NULL, AC_FAIL, "No brush component"); 00415 00416 BrushDefinition* pBrushDef = pBrushComp->FindBrushDefinition(pChangeParam->m_Handle); 00417 if (pBrushDef == NULL) 00418 return AC_FAIL; 00419 00420 // make the new action 00421 UINT32 ActSize = sizeof(ChangeBrushDefAction); 00422 ChangeBrushDefAction* pNewAction; 00423 ActionCode Ac = Action::Init(pOp,pActionList,ActSize,CC_RUNTIME_CLASS(ChangeBrushDefAction),(Action**)&pNewAction); 00424 *ppNewAction = pNewAction; 00425 00426 if (Ac != AC_FAIL && pNewAction != NULL) 00427 { 00428 00429 ChangeBrushType ChangeType = pChangeParam->ChangeType; 00430 // set data in the new action 00431 pNewAction->m_ChangeParam.ChangeType = ChangeType; 00432 pNewAction->m_ChangeParam.SetOldValues(pBrushDef); 00433 pNewAction->m_ChangeParam.m_Handle = pChangeParam->m_Handle; 00434 00435 switch (ChangeType) 00436 { 00437 case CHANGEBRUSH_SPACING: 00438 if (ChangeBrushSpacing(pChangeParam->m_NewSpacing, pBrushDef) == FALSE) 00439 Ac = AC_FAIL; 00440 break; 00441 case CHANGEBRUSH_SPACING_INCRPROP: 00442 if (!ChangeSpacingIncrProp(pChangeParam->m_NewSpacingIncrProp, pBrushDef)) 00443 Ac = AC_FAIL; 00444 break; 00445 case CHANGEBRUSH_SPACING_INCRCONST: 00446 if (!ChangeSpacingIncrConst(pChangeParam->m_NewSpacingIncrConst, pBrushDef)) 00447 Ac = AC_FAIL; 00448 break; 00449 case CHANGEBRUSH_SCALING_INCR: 00450 if (!ChangeScalingIncr(pChangeParam->m_NewScalingIncr, pBrushDef)) 00451 Ac = AC_FAIL; 00452 break; 00453 case CHANGEBRUSH_SCALING_INCRCONST: 00454 if (!ChangeScalingIncrConst(pChangeParam->m_NewScalingIncrConst, pBrushDef)) 00455 Ac = AC_FAIL; 00456 break; 00457 case CHANGEBRUSH_SCALING: 00458 if (ChangeBrushScaling(pChangeParam->m_NewScaling, pBrushDef) == FALSE) 00459 Ac = AC_FAIL; 00460 break; 00461 case CHANGEBRUSH_SCALING_MAXRAND: 00462 if (!ChangeScalingMaxRand(pChangeParam->m_NewScalingMaxRand, pBrushDef)) 00463 Ac = AC_FAIL; 00464 break; 00465 case CHANGEBRUSH_SCALING_RANDSEED: 00466 if (!ChangeScalingRandSeed(pChangeParam->m_NewScalingRandSeed, pBrushDef)) 00467 Ac = AC_FAIL; 00468 break; 00469 case CHANGEBRUSH_SCALING_PRESSURE: 00470 if (!ChangeScalingPressure(pChangeParam->m_NewScalingMaxPressure, pBrushDef)) 00471 Ac = AC_FAIL; 00472 break; 00473 case CHANGEBRUSH_TILED: 00474 ChangeBrushTile(pChangeParam->m_bNewTiled, pBrushDef); 00475 break; 00476 case CHANGEBRUSH_TANGENTIAL: 00477 ChangeTangential(pChangeParam->m_bNewRotated, pBrushDef); 00478 break; 00479 case CHANGEBRUSH_OFFSET_TYPE: 00480 if (!ChangeOffsetType(pChangeParam->m_NewPathOffsetType, pBrushDef)) 00481 Ac = AC_FAIL; 00482 break; 00483 case CHANGEBRUSH_OFFSET_TYPE_SEED: 00484 if (!ChangeOffsetTypeSeed(pChangeParam->m_NewOffsetTypeRandSeed, pBrushDef)) 00485 Ac = AC_FAIL; 00486 break; 00487 case CHANGEBRUSH_OFFSET_VAL: 00488 if (!ChangeOffsetValue(pChangeParam->m_NewPathOffsetVal, pBrushDef)) 00489 Ac = AC_FAIL; 00490 break; 00491 case CHANGEBRUSH_OFFSET_INCRPROP: 00492 if (!ChangeOffsetIncrProp(pChangeParam->m_NewOffsetIncrProp, pBrushDef)) 00493 Ac = AC_FAIL; 00494 break; 00495 case CHANGEBRUSH_OFFSET_INCRCONST: 00496 if (!ChangeOffsetIncrConst(pChangeParam->m_NewOffsetIncrConst, pBrushDef)) 00497 Ac = AC_FAIL; 00498 break; 00499 case CHANGEBRUSH_OFFSET_MAXRAND: 00500 if (!ChangeOffsetValMaxRand(pChangeParam->m_NewOffsetValMaxRand, pBrushDef)) 00501 Ac = AC_FAIL; 00502 break; 00503 case CHANGEBRUSH_OFFSET_VALSEED: 00504 if (!ChangeOffsetValRandSeed(pChangeParam->m_NewOffsetValRandSeed, pBrushDef)) 00505 Ac = AC_FAIL; 00506 break; 00507 case CHANGEBRUSH_ROTATE_ANGLE: 00508 if (!ChangeRotation(pChangeParam->m_NewRotateAngle, pBrushDef)) 00509 Ac = AC_FAIL; 00510 break; 00511 case CHANGEBRUSH_ROTATE_MAXRAND: 00512 if (!ChangeRotationMaxRand(pChangeParam->m_NewRotateMaxRand, pBrushDef)) 00513 Ac = AC_FAIL; 00514 break; 00515 case CHANGEBRUSH_ROTATE_RANDSEED: 00516 if (!ChangeRotationRandSeed(pChangeParam->m_NewRotateRandSeed, pBrushDef)) 00517 Ac = AC_FAIL; 00518 break; 00519 case CHANGEBRUSH_ROTATE_PRESSURE: 00520 if (!ChangeRotationMaxPressure(pChangeParam->m_NewRotationMaxPressure, pBrushDef)) 00521 Ac = AC_FAIL; 00522 break; 00523 case CHANGEBRUSH_SPACING_MAXRAND: 00524 if (!ChangeSpacingMaxRand(pChangeParam->m_NewSpacingMaxRand, pBrushDef)) 00525 Ac = AC_FAIL; 00526 break; 00527 case CHANGEBRUSH_SPACING_RANDSEED: 00528 if (!ChangeSpacingRandSeed(pChangeParam->m_NewSpacingRandSeed, pBrushDef)) 00529 Ac = AC_FAIL; 00530 break; 00531 case CHANGEBRUSH_USELOCALFILLCOL: 00532 if (!ChangeUseLocalFillColour(pChangeParam->m_bNewUseLocalFillColour, pBrushDef)) 00533 Ac = AC_FAIL; 00534 break; 00535 case CHANGEBRUSH_SEQUENCE: 00536 if (!ChangeSequenceType(pChangeParam->m_NewSequenceType, pBrushDef)) 00537 Ac = AC_FAIL; 00538 break; 00539 case CHANGEBRUSH_SEQUENCE_RANDSEED: 00540 if (!ChangeSequenceSeed(pChangeParam->m_NewSequenceRandSeed, pBrushDef)) 00541 Ac = AC_FAIL; 00542 break; 00543 case CHANGEBRUSH_TIMESTAMP: 00544 if (!ChangeTimeStamp(pChangeParam->m_NewTimeStampValue, pBrushDef)) 00545 Ac = AC_FAIL; 00546 break; 00547 case CHANGEBRUSH_NAME: 00548 if (!ChangeBrushName(pChangeParam->m_NewBrushName, pBrushDef)) 00549 Ac = AC_FAIL; 00550 break; 00551 case CHANGEBRUSH_ALL: 00552 if (!ChangeAll(pChangeParam, pBrushDef)) 00553 Ac = AC_FAIL; 00554 break; 00555 default : ERROR2(AC_FAIL,"Unknown change brush type"); break; 00556 00557 } // end switch 00558 00559 // set the new values for the undo 00560 pNewAction->m_ChangeParam.SetNewValues(pBrushDef); 00561 00562 // send a message to whoever is interested 00563 BROADCAST_TO_ALL(BrushDefMsg(pChangeParam->m_Handle)); 00564 } // end if (AC != .. 00565 00566 00567 LineGallery* pGallery = LineGallery::GetInstance(); 00568 if (pGallery != NULL) 00569 pGallery->UpdateBrushItem(pChangeParam->m_Handle); 00570 00571 return Ac; 00572 }
|
|
|