BOOL PrintComponent::ExportImagesetting(BaseCamelotFilter *pFilter) { BOOL ok = TRUE; #if !defined(EXCLUDE_FROM_RALPH) TypesetInfo *TInfo = GetPrintControl()->GetTypesetInfo(); if (TInfo == NULL) return(TRUE); // If we can't find imagesetting info, don't sweat it CXaraFileRecord Rec(TAG_IMAGESETTING, TAG_IMAGESETTING_SIZE); if (ok) ok = Rec.Init(); if (ok) ok = Rec.WriteINT32(TInfo->GetPrintResolution()); if (ok) ok = Rec.WriteDOUBLE(TInfo->GetDefaultScreenFrequency()); if (ok) { UINT16 Func = 0; switch(TInfo->GetScreenFunction()) { case SCRTYPE_SPOT1: Func = 1; break; case SCRTYPE_SPOT2: Func = 2; break; case SCRTYPE_TRIPLESPOT1: Func = 3; break; case SCRTYPE_TRIPLESPOT2: Func = 4; break; case SCRTYPE_ELLIPTICAL: Func = 5; break; case SCRTYPE_LINE: Func = 6; break; case SCRTYPE_CROSSHATCH: Func = 7; break; case SCRTYPE_MEZZOTINT: Func = 8; break; case SCRTYPE_SQUARE: Func = 9; break; case SCRTYPE_DITHER: Func = 10; break; default: break; } ok = Rec.WriteUINT16(Func); } if (ok) { BYTE Flags = 0x00; if (TInfo->AreSeparating()) Flags |= 0x01; if (TInfo->AreScreening()) Flags |= 0x02; if (TInfo->PrintEmulsionDown()) Flags |= 0x04; if (TInfo->PrintPhotoNegative()) Flags |= 0x08; if (TInfo->AlwaysOverprintBlack()) Flags |= 0x10; ok = Rec.WriteBYTE(Flags); } if (ok) pFilter->Write(&Rec); #endif // EXCLUDE_FROM_RALPH return(ok); }
BOOL PrintPSRenderRegion::WritePlateScreen(KernelDC *pDC) { PrintControl *pPrintCtl=NULL; View *pView = GetRenderView(); if (pView) pPrintCtl = pView->GetPrintControl(); if (!pPrintCtl) return TRUE; // Get a pointer to the typeset info structure TypesetInfo *pInfo = pPrintCtl->GetTypesetInfo(); double ang,freq; String_256 ScreenName; ScreenType scrtype; // If separating then interogate the current plate if (pInfo->AreSeparating()) { ColourPlate* pSeparation; GetOutputColourPlate(COLOURMODEL_CMYK, NULL, &pSeparation); // do nothing if we are not separating if (pSeparation==NULL) return TRUE; // Make sure screening is on in this plate if (!pSeparation->ActiveScreening()) return TRUE; // Get the screen type if enabled. scrtype = pSeparation->GetScreenFunction(); if (scrtype==SCRTYPE_NONE) return TRUE; // ok we can get the angle and frequency ang = pSeparation->GetScreenAngle(); freq = pSeparation->GetScreenFrequency(); } else { // Is screening off? if (!pInfo->AreScreening()) return TRUE; scrtype = pInfo->GetScreenFunction(); if (scrtype==SCRTYPE_NONE) return TRUE; ang = 45.0; freq = pInfo->GetDefaultScreenFrequency(); } // read the name of this screen pInfo->GetScreenName(scrtype, &ScreenName); String_256 fred; fred += String_8(_T("{")); fred += ScreenName; fred += String_8(_T("}")); // ok output 'freq ang screenfunc setscreen' BOOL ok = pDC->OutputFloat(freq, 4); ok = ok && pDC->OutputFloat(ang, 4); ok = ok && pDC->OutputToken(fred); ok = ok && pDC->OutputToken(_T("setscreen")); ok = ok && pDC->OutputNewLine(); return ok; }