00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100 #include "camtypes.h"
00101
00102 #include "ai_eps.h"
00103 #include "ai5_eps.h"
00104 #include "ai_epsrr.h"
00105 #include <sstream>
00106 #include <stdio.h>
00107
00108 #include "nodepath.h"
00109
00110
00111
00112
00113 #include "ccdc.h"
00114
00115 #include "page.h"
00116
00117
00118 #include "opbevel.h"
00119 #include "progress.h"
00120 #include "ai_grad.h"
00121 #include "ai_bmp.h"
00122 #include "ai_layer.h"
00123 #include "swffiltr.h"
00124 #include "layer.h"
00125
00126 DECLARE_SOURCE("$Revision");
00127
00128 #define new CAM_DEBUG_NEW
00129
00130 CC_IMPLEMENT_DYNAMIC(AI5EPSFilter, AIEPSFilter)
00131
00132
00133 CommandMap AI5EPSFilter::AI5Commands[] =
00134 {
00135
00136 { EPSC_Bd, _T("Bd")},
00137 { EPSC_Bm, _T("Bm")},
00138 { EPSC_Bc, _T("Bc")},
00139 { EPSC__Bs, _T("%_Bs")},
00140 { EPSC__BS, _T("%_BS")},
00141 { EPSC__Br, _T("%_Br")},
00142 { EPSC_BD, _T("BD")},
00143 { EPSC_Bg, _T("Bg")},
00144 { EPSC_Bb, _T("Bb")},
00145 { EPSC_BB, _T("BB")},
00146 { EPSC_Bh, _T("Bh")},
00147 { EPSC_HexStart, _T("<")},
00148 { EPSC_HexEnd, _T(">")},
00149
00150
00151 { EPSC_Lb, _T("Lb")},
00152 { EPSC_LB, _T("LB")},
00153 { EPSC_Ln, _T("Ln")},
00154
00155
00156 { EPSC_Ap, _T("Ap")},
00157 { EPSC_Ar, _T("Ar")},
00158 { EPSC_XR, _T("XR")},
00159
00160
00161 { EPSC_XI, _T("XI")},
00162 { EPSC_XF, _T("XF")},
00163 { EPSC_XG, _T("XG")},
00164 { EPSC_Xh, _T("Xh")},
00165 { EPSC_XH, _T("XH")},
00166
00167
00168 { EPSC_XP, _T("XP")},
00169
00170
00171 { EPSC_XT, _T("XT")},
00172
00173
00174 { EPSC_Xm, _T("Xm")},
00175
00176
00177 { EPSC_Xa, _T("Xa")},
00178 { EPSC_XA, _T("XA")},
00179 { EPSC_Xx, _T("Xx")},
00180 { EPSC_XX, _T("XX")},
00181
00182
00183 { EPSC_Invalid, _T("Invalid")}
00184 };
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198 AI5EPSFilter::AI5EPSFilter() :
00199 mpGradientProc(0),
00200 mpBitmapProc(0),
00201 mpLayerProc ( 0 ),
00202 mbReadingGradFill(FALSE),
00203 mbReadingBitmap(FALSE)
00204 {
00205
00206 FilterNameID = _R(IDT_AI5EPS_FILTERNAME);
00207 FilterInfoID = _R(IDT_AI5EPS_FILTERINFO);
00208 ImportMsgID = _R(IDT_IMPORTMSG_AI5);
00209
00210 FilterID = FILTERID_AI5EPS;
00211
00212
00213 Flags.CanImport = TRUE;
00214 Flags.CanExport = FALSE;
00215 }
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230 BOOL AI5EPSFilter::Init()
00231 {
00232
00233 pOILFilter = new AI5EPSOILFilter(this);
00234 if (pOILFilter == NULL)
00235 return FALSE;
00236
00237
00238 FilterName.Load(FilterNameID);
00239 FilterInfo.Load(FilterInfoID);
00240
00241
00242 return TRUE;
00243 }
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257 INT32 AI5EPSFilter::EPSHeaderIsOk(ADDR pFileHeader, UINT32 HeaderSize)
00258 {
00259 UINT32 Lines = 0;
00260 TCHAR *Buffer = NULL;
00261
00262
00263 CCMemTextFile HeaderFile ( reinterpret_cast<char *> ( pFileHeader ), HeaderSize );
00264
00265 if( HeaderFile.IsMemFileInited () == FALSE || HeaderFile.InitLexer () == FALSE )
00266 {
00267 HeaderFile.close();
00268 return 0;
00269 }
00270
00271
00272
00273
00274 while ( ( Lines < 100 ) && !HeaderFile.eof () )
00275 {
00276
00277 HeaderFile.GetLineToken();
00278 Buffer = const_cast<TCHAR *> ( HeaderFile.GetTokenBuf () );
00279
00280
00281 ERROR2IF(Buffer == 0, 0, "Returned buffer from lex file == 0");
00282
00283
00284 Lines++;
00285
00286 if (camStrncmp(Buffer, _T("%!PS-Adobe"), 10) == 0)
00287 {
00288
00289 while ((Lines < 100) && !HeaderFile.eof())
00290 {
00291 HeaderFile.GetLineToken();
00292 Buffer = const_cast<TCHAR *> ( HeaderFile.GetTokenBuf() );
00293 ERROR2IF(Buffer == 0, 0, "Returned buffer from lex file == 0");
00294 Lines++;
00295
00296
00297
00298 if (camStrncmp(Buffer, _T("%%Creator: Adobe Illustrator(TM) 5"), 34) == 0)
00299 {
00300
00301 HeaderFile.close();
00302 return 10;
00303 }
00304
00305 if (camStrncmp(Buffer, _T("%%Creator:"), 10) == 0)
00306 {
00307
00308 if (camStrstr( (const TCHAR*)Buffer, _T("Illustrator(TM) 5")) != NULL)
00309 {
00310 HeaderFile.close();
00311 return 10;
00312 }
00313
00314 else if ((camStrstr( (const TCHAR*)Buffer, _T("Illustrator(TM) 7")) != NULL) ||
00315 (camStrstr( (const TCHAR*)Buffer, _T("Illustrator(R) 7")) != NULL))
00316 {
00317 HeaderFile.close();
00318 return 10;
00319 }
00320
00321 else if (camStrstr( (const TCHAR*)Buffer, _T("FreeHand")) != NULL)
00322 {
00323 HeaderFile.close();
00324 return 8;
00325 }
00326 else
00327 break;
00328 }
00329
00330
00331
00332 if (camStrncmp(Buffer, _T("%%Compression:"), 14)==0)
00333 break;
00334 }
00335
00336
00337 HeaderFile.close();
00338
00339
00340
00341 return 5;
00342 }
00343
00344
00345
00346 if (camStrncmp(Buffer, _T("%%Compression:"), 14)==0)
00347 break;
00348 }
00349
00350
00351 HeaderFile.close();
00352
00353
00354 return 0;
00355 }
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370 BOOL AI5EPSFilter::PrepareToImport()
00371 {
00372 mbReadingGradFill = FALSE;
00373 mbReadingBitmap = FALSE;
00374
00375 return AIEPSFilter::PrepareToImport();
00376 }
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392 void AI5EPSFilter::CleanUpAfterImport(BOOL Successful)
00393 {
00395
00397 delete mpGradientProc;
00398 mpGradientProc = NULL;
00399
00400 delete mpBitmapProc;
00401 mpBitmapProc = NULL;
00402
00403
00404 AIEPSFilter::CleanUpAfterImport(Successful);
00405 }
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420 void AI5EPSFilter::LookUpToken()
00421 {
00422
00423
00424 INT32 i = 0;
00425 while (AI5Commands[i].Cmd != EPSC_Invalid)
00426 {
00427 if (camStrcmp(TokenBuf, AI5Commands[i].CmdStr) == 0)
00428 {
00429
00430 Token = AI5Commands[i].Cmd;
00431 return;
00432 }
00433
00434 i++;
00435 }
00436
00437
00438 AIEPSFilter::LookUpToken();
00439 }
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455
00456 BOOL AI5EPSFilter::ProcessToken()
00457 {
00458
00459
00460
00461 INT32 red = 0;
00462 INT32 green = 0;
00463 INT32 blue = 0;
00464 DocColour DocCol;
00465 TintType Tint = TINT_NONE;
00466 FIXEDPOINT TintVal;
00467 String_64 ColName;
00468
00469
00470 switch (Token)
00471 {
00472 case EPSC_Bd:
00473 {
00474 if ( !mpGradientProc || !mpGradientProc->DecodeBd( *this ) )
00475 {
00476 goto EPSError;
00477 }
00478 break;
00479 }
00480
00481 case EPSC_Bm:
00482 case EPSC_Bc:
00483
00484
00485
00486 if (!Stack.Discard(6))
00487 goto EPSError;
00488 break;
00489
00490 case EPSC__Bs:
00491 case EPSC__BS:
00492 {
00493 if ( !mpGradientProc || !mpGradientProc->DecodeBS( *this ) )
00494 {
00495 goto EPSError;
00496 }
00497 break;
00498 }
00499
00500 case EPSC_BD:
00501 {
00502
00503 EPSCommand Cmd;
00504 if (!Stack.PopCmd(&Cmd) || (Cmd != EPSC_ArrayStart))
00505 goto EPSError;
00506 break;
00507 }
00508
00509 case EPSC_Bg:
00510 {
00511
00512
00513
00514 if (!Stack.Discard(6))
00515 goto EPSError;
00516
00517
00518 DocCoord StartPoint;
00519 double Angle, Length;
00520 if (!Stack.Pop(&Length) ||
00521 !Stack.Pop(&Angle) ||
00522 !Stack.PopCoordPair(&StartPoint))
00523 goto EPSError;
00524
00525
00526
00527 String_64 FillName;
00528 if (!Stack.Pop(&FillName) || !Stack.Discard())
00529 goto EPSError;
00530
00531
00532 DecodeAI5GradFill(StartPoint, Angle, Length, FillName);
00533
00534 break;
00535 }
00536
00537 case EPSC_Bb:
00538
00539 TRACE(_T("Ignoring token Bb\n"));
00540 break;
00541
00542 case EPSC__Br:
00543 {
00544
00545 TRACE(_T("Ignoring token %%_Br\n"));
00546
00547 INT32 rampType = 0;
00548 if (!Stack.Pop(&rampType))
00549 goto EPSError;
00550
00551 static const UINT32 sNumToDiscard[] =
00552 {
00553 1, 4, 5, 6, 7, 8, 9
00554 };
00555
00556 if ( rampType < 0 || rampType > 6 )
00557 goto EPSError;
00558
00559 if (!Stack.Discard(sNumToDiscard[rampType]))
00560 goto EPSError;
00561
00562 break;
00563 }
00564
00565 case EPSC_Lb:
00566
00567 if ( !DecodeLayer () )
00568 {
00569 TRACE( _T("There's been a problem with a layer!") );
00570 }
00571
00572 break;
00573
00574 case EPSC_Ln:
00575
00576 if ( mpLayerProc == NULL || !mpLayerProc->DecodeLn ( *this ) )
00577 {
00578 goto EPSError;
00579 }
00580
00581 break;
00582
00583 case EPSC_LB:
00584
00585 if ( mpLayerProc == NULL || !mpLayerProc->DecodeLB ( *this ) )
00586 {
00587 goto EPSError;
00588 }
00589 else
00590 {
00591 delete mpLayerProc;
00592 mpLayerProc = NULL;
00593 }
00594 break;
00595
00596 case EPSC_Bh:
00597
00598 if ( !mpGradientProc || !mpGradientProc->DecodeBh( *this ) )
00599 {
00600 goto EPSError;
00601 }
00602 break;
00603
00604 case EPSC_Ap:
00605
00606 TRACE(_T("Ignoring token Ap\n"));
00607 if (!Stack.Discard())
00608 goto EPSError;
00609 break;
00610
00611 case EPSC_Ar:
00612
00613 TRACE(_T("Ignoring token Ar\n"));
00614 if (!Stack.Discard())
00615 goto EPSError;
00616 break;
00617
00618 case EPSC_XR:
00619
00620
00621
00622 TRACE(_T("Ignoring token XR\n"));
00623 if (!Stack.Discard())
00624 goto EPSError;
00625 break;
00626
00627
00628 case EPSC_BB:
00629
00630 TRACE(_T("Ignoring token BB\n"));
00631 if (!Stack.Discard())
00632 goto EPSError;
00633 break;
00634
00635 case EPSC_Xm:
00636
00637
00638
00639 TRACE(_T("Ignoring token Xm\n"));
00640 if (!Stack.Discard(6))
00641 goto EPSError;
00642 break;
00643
00644 case EPSC_XT:
00645
00646
00647 TRACE(_T("Ignoring token XT\n"));
00648 if (!Stack.Discard(2))
00649 goto EPSError;
00650 break;
00651
00652 case EPSC_XI:
00653
00654 if ( !mpBitmapProc || !mpBitmapProc->DecodeXI( *this ) )
00655 goto EPSError;
00656 break;
00657
00658 case EPSC_XG:
00659
00660
00661 if (!Stack.Discard(2))
00662 goto EPSError;
00663 break;
00664
00665 case EPSC_HexStart:
00666
00667
00668
00669 if ( mbReadingGradFill )
00670
00671 if ( !Stack.Push( INT32(0xffffffff) ) )
00672 goto EPSError;
00673 IgnoreHexData();
00674 break;
00675
00676 case EPSC_HexEnd:
00677
00678 if ( mbReadingGradFill )
00679 break;
00680
00681 case EPSC_Xh:
00682
00683
00684 TRACE(_T("Ignoring token Xh\n"));
00685 if (!Stack.Discard(2))
00686 {
00687 goto EPSError;
00688 }
00689 else
00690 {
00691
00692
00693 Stack.DiscardArray();
00694 }
00695 break;
00696
00697 case EPSC_XH:
00698
00699 TRACE(_T("Ignoring token XH\n"));
00700 break;
00701
00702 case EPSC_XP:
00703
00704 TRACE(_T("Ignoring unknown token XP\n"));
00705 if (!Stack.Discard(4))
00706 goto EPSError;
00707 break;
00708
00709
00710
00711 case EPSC_Xx:
00712 case EPSC_XX:
00713 Tint = TINT_ILLUSTRATOR;
00714
00715
00716 if (!Stack.Discard (1))
00717 goto EPSError;
00718
00719
00720 case EPSC_Xa:
00721 case EPSC_XA:
00722
00723
00724 if (Stack.PopColourRGB(&red, &green, &blue, Tint, &TintVal, &ColName))
00725 {
00726 GetEPSColourRGB(&DocCol, red, green, blue, Tint, TintVal, &ColName);
00727
00728
00729 if ((Token == EPSC_Xa) || (Token == EPSC_Xx))
00730 {
00731 if (!SetFillColour(DocCol))
00732 goto EPSError;
00733 }
00734 else
00735 {
00736 if (!SetLineColour(DocCol))
00737 goto EPSError;
00738 }
00739 }
00740 else
00741
00742 goto EPSError;
00743
00744 break;
00745
00746 default:
00747
00748 return AIEPSFilter::ProcessToken();
00749 }
00750
00751
00752
00753 return TRUE;
00754
00755
00756
00757 EPSError:
00758 HandleEPSError();
00759 return FALSE;
00760 }
00761
00762
00763
00764
00765
00766
00767
00768
00769
00770
00771
00772
00773 BOOL AI5EPSFilter::IgnoreHexData()
00774 {
00775 while (!EPSFile->eof())
00776 {
00777
00778 if (!EPSFile->GetHexToken())
00779 return TRUE;
00780
00781 INT32 CharsRead = EPSFile->GetCharsRead();
00782
00783 if (CharsRead > (LastProgressUpdate + 2048))
00784 {
00785 if (!ContinueSlowJob(CharsRead))
00786 {
00787
00788 ERROR(_R(IDT_IMPORT_USERABORT), FALSE);
00789 }
00790 else
00791 {
00792 LastProgressUpdate = CharsRead;
00793 }
00794 }
00795 }
00796
00797 return FALSE;
00798 }
00799
00800
00801
00802
00803
00804
00805
00806
00807
00808
00809
00810
00811
00812
00813
00814
00815
00816
00817
00818
00819
00820 void AI5EPSFilter::DecodeAI5GradFill(const DocCoord& StartPoint,
00821 double Angle,
00822 double Length,
00823 const String_64& FillName)
00824 {
00825 if ( !mpGradientProc )
00826 return;
00827
00828 AI5Gradient* pGradient = mpGradientProc->FindGradient( FillName );
00829
00830
00831 ENSURE(pGradient != NULL, "Could not find named grad fill in AI5 file!");
00832 if (pGradient == NULL)
00833
00834 return;
00835
00836
00837 Length *= 1000;
00838
00839
00840 DocCoord EndPoint;
00841 double Radians = (((double) Angle) / 180.0) * PI;
00842
00843 EndPoint.x = StartPoint.x + (MILLIPOINT) (Length * cos(Radians));
00844 EndPoint.y = StartPoint.y + (MILLIPOINT) (Length * sin(Radians));
00845
00846
00847 if (pGradient->IsRadial)
00848 {
00849 if ( pGradient->mpHighlight )
00850 {
00851 SetConicalFill( pGradient->StartColour, pGradient->EndColour,
00852 StartPoint, EndPoint);
00853 }
00854 SetRadialFill(pGradient->StartColour, pGradient->EndColour,
00855 StartPoint, EndPoint);
00856 }
00857 else
00858 {
00859 SetLinearFill(pGradient->StartColour, pGradient->EndColour,
00860 StartPoint, EndPoint);
00861 }
00862
00864
00865
00867
00868
00869 AttributeEntry* const pEntry = FillAttr.pAttr ? &FillAttr : &CurrentAttrs[ATTR_FILLGEOMETRY];
00870
00871
00872 GradFillAttribute* pAttr = static_cast<GradFillAttribute*>( pEntry->pAttr );
00873
00874
00875
00876
00877
00878 if ( pGradient->mpCurrentRamp &&
00879 pGradient->mpCurrentRamp->GetCount ())
00880 {
00881 pAttr->SetColourRamp( pGradient->mpCurrentRamp );
00882
00883
00884
00885 CProfileBiasGain profile;
00886 pAttr->SetProfile (profile);
00887 }
00888 else if (pGradient->midPoint != 0)
00889 {
00890
00891 CProfileBiasGain profile = pAttr->GetProfile ();
00892 profile.SetBias (1 - ((double) pGradient->midPoint/50));
00893 pAttr->SetProfile (profile);
00894 }
00895 }
00896
00897
00898
00899
00900
00901
00902
00903
00904
00905
00906
00907
00908
00909
00910 BOOL AI5EPSFilter::DecodeLayer ( void )
00911 {
00912
00913
00914 if ( mpLayerProc != NULL )
00915 {
00916 return FALSE;
00917 }
00918
00919
00920 mpLayerProc = new AILayerProcessor;
00921
00922 ERROR2IF( mpLayerProc == NULL, FALSE, "Insufficient memory to create layer processor.");
00923
00924
00925 return mpLayerProc->DecodeAI5Lb ( *this );
00926 }
00927
00928
00929
00930
00931
00932
00933
00934
00935
00936
00937
00938
00939
00940 BOOL AI5EPSFilter::ProcessFilterComment()
00941 {
00942 BOOL ok = TRUE;
00943
00944 if (camStrncmp(TokenBuf, _T("%AI5_BeginGradient"), 18) == 0)
00945 {
00946 ENSURE(!mbReadingGradFill, "Already reading a grad fill!");
00947
00948 if ( !mpGradientProc )
00949 {
00950 mpGradientProc = new AIGradientProcessor;
00951 if ( !mpGradientProc )
00952 ok = FALSE;
00953 }
00954
00955 if (ok)
00956 ok = mpGradientProc->BeginGradient();
00957
00958 if (ok)
00959 mbReadingGradFill = TRUE;
00960
00961
00962
00963
00964 do
00965 {
00966 GetToken();
00967 }
00968 while (mbReadingGradFill && HandleToken() && (!EPSFile->eof()));
00969
00970
00971 EPSFile->UngetToken();
00972 }
00973 else if (camStrncmp(TokenBuf, _T("%AI5_EndGradient"), 16) == 0)
00974 {
00975 ENSURE(mbReadingGradFill, "Not reading a grad fill!");
00976
00977 if ( mpGradientProc )
00978 ok = mpGradientProc->EndGradient( *this );
00979
00980 if (ok)
00981 mbReadingGradFill = FALSE;
00982
00983 return ok;
00984 }
00985 else if (camStrncmp(TokenBuf, _T("%AI5_BeginRaster"), 16) == 0)
00986 {
00987 ENSURE(!mbReadingBitmap, "Already reading a bitmap!");
00988
00989 if ( !mpBitmapProc )
00990 {
00991 mpBitmapProc = new AIBitmapProcessor;
00992 if ( !mpBitmapProc )
00993 ok = FALSE;
00994 }
00995
00996 if ( mpBitmapProc )
00997 {
00998 ok = mpBitmapProc->BeginRaster();
00999 }
01000
01001 if (ok)
01002 {
01003
01004 mbReadingBitmap = TRUE;
01005 }
01006
01007
01008 return ok;
01009 }
01010 else if (camStrncmp(TokenBuf, _T("%AI5_EndRaster"), 14) == 0)
01011 {
01012 ENSURE(mbReadingBitmap, "Not reading a bitmap!");
01013
01015
01017
01018 if ( mpBitmapProc )
01019 {
01020 ok = mpBitmapProc->EndRaster();
01021 }
01022
01023 mbReadingBitmap = FALSE;
01024
01025 return ok;
01026 }
01027 else if (camStrncmp(TokenBuf, _T("%AI8_BeginMesh"), 14) == 0)
01028 {
01030
01032
01033 do
01034 {
01035 GetToken();
01036 }
01037 while ((camStrncmp(TokenBuf, _T("%AI8_EndMesh"), 12) != 0) && (!EPSFile->eof()));
01038
01039 return TRUE;
01040 }
01041 else if ( camStrncmp ( TokenBuf, _T ( "%AI3_BeginPattern" ), 17 ) == 0 )
01042 {
01043
01044
01045
01046
01047
01048
01049
01050
01051
01052
01053 return TRUE;
01054 }
01055 else if ( camStrncmp ( TokenBuf, _T( "%AI3_EndPattern" ), 15 ) == 0 )
01056 {
01057
01058
01059 return TRUE;
01060 }
01061 else if ( camStrncmp ( TokenBuf, _T ( "%AI6_BeginPatternLayer" ), 22 ) == 0 )
01062 {
01063
01064
01065 return TRUE;
01066 }
01067 else if (camStrncmp(TokenBuf, _T("%AI6_EndPatternLayer"), 20) == 0)
01068 {
01069
01070
01071 return TRUE;
01072 }
01073
01074
01075 return FALSE;
01076 }
01077
01078
01079
01080
01081
01082
01083
01084
01085
01086
01087
01088
01089
01090
01091 TCHAR *AI5EPSFilter::GetEPSCommand(EPSCommand Cmd)
01092 {
01093 INT32 i = 0;
01094 while (AI5Commands[i].Cmd != EPSC_Invalid)
01095 {
01096 if (AI5Commands[i].Cmd == Cmd)
01097 return AI5Commands[i].CmdStr;
01098
01099
01100 i++;
01101 }
01102
01103
01104 return AIEPSFilter::GetEPSCommand(Cmd);
01105 }
01106
01107
01108
01109
01110
01111
01112
01113
01114
01115
01116
01117
01118
01119
01120
01121
01122
01123
01124
01125
01126
01127
01128
01129 BOOL AI5EPSFilter::CreateLayer ( String_256 &LayerName,
01130 BOOL IsLocked,
01131 BOOL IsPrintable,
01132 BOOL IsVisible )
01133 {
01134
01135 Layer *pLayer = AddLayer ( LayerName, FALSE );
01136
01137
01138 if ( pLayer != NULL )
01139 {
01140
01141 pLayer->SetLocked ( IsLocked );
01142 pLayer->SetPrintable ( IsPrintable );
01143 pLayer->SetVisible ( IsVisible );
01144
01145
01146 return TRUE;
01147 }
01148 else
01149 {
01150
01151 return FALSE;
01152 }
01153 }