Ejemplo n.º 1
0
void ColourPlate::InitObject(ColourPlateType NewType)
{
	Disabled		= FALSE;

	Type			= NewType;

	Overprint		= FALSE;
	Monochrome		= TRUE;
	Negate			= FALSE;
	ActiveScreens	= FALSE;

	ScreenFunction	= SCRTYPE_NONE;		// represents no setscreen command output

	// And set up a suitable default for screen angle/frequency
	// Use the selected document's printer resolution and LPI defaults
	INT32 DPI	= 1200;		// Defaults in case of catastrophy
	INT32 LPI	= 60;
	
#if !defined(EXCLUDE_FROM_RALPH) && !defined(EXCLUDE_FROM_XARALX)
	TypesetInfo *TPInfo = TypesetInfo::FindTypesetInfoForDoc();
	if (TPInfo != NULL)
	{
		DPI = TPInfo->GetPrintResolution();
		LPI = (INT32) floor(TPInfo->GetDefaultScreenFrequency());
	}
#endif

	ResetScreenToDefaults(DPI, LPI);
}
Ejemplo n.º 2
0
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);
}