diff options
Diffstat (limited to 'fpdfsdk/fxedit/fxet_edit.cpp')
-rw-r--r-- | fpdfsdk/fxedit/fxet_edit.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fpdfsdk/fxedit/fxet_edit.cpp b/fpdfsdk/fxedit/fxet_edit.cpp index 97debe1764..c744958e5e 100644 --- a/fpdfsdk/fxedit/fxet_edit.cpp +++ b/fpdfsdk/fxedit/fxet_edit.cpp @@ -145,8 +145,7 @@ void AddRectToPageObjects(CPDF_PageObjectHolder* pObjectHolder, rgb[0] = FXARGB_R(crFill) / 255.0f; rgb[1] = FXARGB_G(crFill) / 255.0f; rgb[2] = FXARGB_B(crFill) / 255.0f; - pPathObj->m_ColorState.MakePrivateCopy(); - pPathObj->m_ColorState->SetFillColor( + pPathObj->m_ColorState.SetFillColor( CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB), rgb, 3); pPathObj->m_FillType = FXFILL_ALTERNATE; @@ -178,11 +177,9 @@ CPDF_TextObject* AddTextObjToPageObjects(CPDF_PageObjectHolder* pObjectHolder, rgb[0] = FXARGB_R(crText) / 255.0f; rgb[1] = FXARGB_G(crText) / 255.0f; rgb[2] = FXARGB_B(crText) / 255.0f; - - pTxtObj->m_ColorState.MakePrivateCopy(); - pTxtObj->m_ColorState->SetFillColor( + pTxtObj->m_ColorState.SetFillColor( CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB), rgb, 3); - pTxtObj->m_ColorState->SetStrokeColor( + pTxtObj->m_ColorState.SetStrokeColor( CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB), rgb, 3); pTxtObj->SetPosition(point.x, point.y); |