home *** CD-ROM | disk | FTP | other *** search
- /@p{/$fil 1 def 1 eq dup/$vectpat xd{/$pfrg true def}{@gs $t $c $m $y $k $n $o
- @scc_5/$pfrg xd @gr}ifelse/$pm xd/$psy xd/$psx xd/$pyf xd/$pxf xd/$pn xd}bd
- /CorelPtrnDoFill{@gs $ctm setmatrix $pm concat CorelPtrnSetBBox wclip @sv Bburx
- Bbury $pm itransform/$tury xd/$turx xd Bbllx Bblly $pm itransform/$tlly xd
- /$tllx xd newpath $tllx $tlly m $tllx $tury l $turx $tury l $turx $tlly l $tllx
- $tlly m @cp pathbbox @rs/$tury xd/$turx xd/$tlly xd/$tllx xd/$wid $turx $tllx
- sub def/$hei $tury $tlly sub def @gs $vectpat{1 0 0 0 0 _ $o @scc_5{wfill}if}{
- $t $c $m $y $k $n $o @scc_5{SepMode_5 0 eq $pfrg or{$tllx $tlly Tl $wid $hei
- scale <00> 8 1 false[8 0 0 1 0 0]{}imagemask}{/$bkg true def}ifelse}if}ifelse
- @gr $wid 0 gt $hei 0 gt and{$pn cvlit load aload pop/$pd xd 3 -1 roll sub
- /$phei xd exch sub/$pwid xd $wid $pwid div ceiling 1 add/$tlx xd $hei $phei div
- ceiling 1 add/$tly xd currentdict/CorelPtrnL2Pattern known $psy 0 eq and $psx 0
- eq and{CorelPtrnL2Pattern}{$psx 0 eq{CorelPtrnTileVeritcal}{CorelPtrnTileHoriz
- }ifelse}ifelse}if @gr @np/$bkg false def}bd/CorelPtrnSetBBox{pathbbox/$ury xd
- /$urx xd/$lly xd/$llx xd}bd/CorelPtrnSetFirstTile{$tllx $pxf add dup $tllx gt
- {$pwid sub}if/$tx xd $tury $pyf sub dup $tury lt{$phei add}if/$ty xd}bd/p{/$pm
- xd 7 rp/$pyf xd/$pxf xd/$pn xd/$fil 1 def}bd/CorelPtrnDraw{@ep}bd
- /CorelPtrnPutTile{@sv/$in true def 2 copy dup $lly le{/$in false def}if $phei
- sub $ury ge{/$in false def}if dup $urx ge{/$in false def}if $pwid add $llx le{
- /$in false def}if $in{@np 2 copy m $pwid 0 rl 0 $phei neg rl $pwid neg 0 rl 0
- $phei rl clip @np $pn cvlit load aload pop 7 -1 roll 5 index sub 7 -1 roll 3
- index sub Tl matrix currentmatrix/$ctm xd CorelPtrnDraw pop pop pop pop}{pop
- pop}ifelse @rs}bd/CorelPtrnTileHoriz{CorelPtrnSetFirstTile 0 1 $tly 1 sub{dup
- $psx mul $tx add{dup $llx gt{$pwid sub}{exit}ifelse}loop exch $phei mul $ty
- exch sub 0 1 $tlx 1 sub{$pwid mul 3 copy 3 -1 roll add exch CorelPtrnPutTile
- pop}for pop pop}for}bd/CorelPtrnTileVeritcal{CorelPtrnSetFirstTile 0 1 $tlx 1
- sub{dup $pwid mul $tx add exch $psy mul $ty exch sub{dup $ury lt{$phei add}
- {exit}ifelse}loop 0 1 $tly 1 sub{$phei mul 3 copy sub CorelPtrnPutTile pop}for
- pop pop}for}bd L2? UseLevel 2 ge and{/CorelPtrnL2Pattern{[$pn cvlit load aload
- pop pop]$pwid $phei $pn cvlit load aload pop pop pop pop pathbbox pop pop 2
- index sub exch 3 index sub 4 -2 roll pop pop exch matrix identmatrix translate
- /PatternMatrix xd/PatternYStep xd/PatternXStep xd/PatternBBox xd currentdict
- /PatternMainDict xd <</PaintType 1/PatternType 1/TilingType 1/BBox PatternBBox
- /XStep PatternXStep/YStep PatternYStep/PaintProc{begin PatternMainDict begin
- $ctm currentmatrix pop 0 CorelPtrnDraw end end}bind >> PatternMatrix
- makepattern setpattern fill}def}if
-