HRESULT SetColorSpaceType ( ColorSpaceType colorspace ) |
You may pass only these values as a parameter: cstDefaultGray, cstDefaultRGB, cstDefaultCMYK. Passing cstICCBasedRGB or cstICCBasedCMYK will do nothing. If you want to set the ICC based RGB or CMYK profile, then use the SetColorSpace method, and the color space type will be set automatically.
{ PDF object is supposed to be created } PDF.SetColorSpaceType(cstDefaultRGB); PDF.SetColor(0.7, 0.3, 0.8, 0.2); PDF.DrawRectangle(10, 10, 100, 100, 0); PDF.FillAndStroke; PDF.SetColorSpaceType(cstDefaultCMYK); PDF.SetColor(0.7, 0.3, 0.8, 0.2); PDF.DrawRectangle(10, 10, 100, 100, 0); PDF.FillAndStroke; PDF.SaveToFile('test.pdf', true);
// PDF object is supposed to be created PDF->SetColorSpaceType(cstDefaultRGB); PDF->SetColor(0.7f, 0.3f, 0.8f, 0.2f); PDF->DrawRectangle(10, 10, 100, 100, 0); PDF->FillAndStroke(); PDF->SetColorSpaceType(cstDefaultCMYK); PDF->SetColor(0.7f, 0.3f, 0.8f, 0.2f); PDF->DrawRectangle(10, 10, 100, 100, 0); PDF->FillAndStroke(); PDF.SaveToFile("test.pdf", true);
// PDF object is supposed to be created PDF.SetColorSpaceType(ColorSpaceType.cstDefaultRGB); PDF.SetColor(0.7f, 0.3f, 0.8f, 0.2f); PDF.DrawRectangle(10, 10, 100, 100, 0); PDF.FillAndStroke(); PDF.SetColorSpaceType(ColorSpaceType.cstDefaultCMYK); PDF.SetColor(0.7f, 0.3f, 0.8f, 0.2f); PDF.DrawRectangle(10, 10, 100, 100, 0); PDF.FillAndStroke(); PDF.SaveToFile("test.pdf", true);
' PDF object is supposed to be created PDF.SetColorSpaceType 1 'ColorSpaceType.cstDefaultRGB = 1 PDF.SetColor 0.7, 0.3, 0.8, 0.2 PDF.DrawRectangle 10, 10, 100, 100, 0 PDF.FillAndStroke PDF.SetColorSpaceType 2 'ColorSpaceType.cstDefaultCMYK = 2 PDF.SetColor 0.7, 0.3, 0.8, 0.2 PDF.DrawRectangle 10, 120, 100, 100, 0 PDF.FillAndStroke PDF.SaveToFile "test.pdf", true