home *** CD-ROM | disk | FTP | other *** search
/ CorelDRAW! 10 / cd10_pgrm.iso / Corel / Graphics10 / Programs / Data / ptrn100.ps < prev    next >
Encoding:
Text File  |  2000-09-05  |  2.7 KB  |  37 lines

  1. /@p{/$fil 1 def 1 eq dup/$vectpat xd{/$pfrg true def}{@gs $t $c $m $y $k $n $o
  2. @scc_5/$pfrg xd @gr}ifelse/$pm xd/$psy xd/$psx xd/$pyf xd/$pxf xd/$pn xd}bd
  3. /CorelPtrnDoFill{@gs $ctm setmatrix $pm concat CorelPtrnSetBBox wclip @sv Bburx
  4. Bbury $pm itransform/$tury xd/$turx xd Bbllx Bblly $pm itransform/$tlly xd
  5. /$tllx xd newpath $tllx $tlly m $tllx $tury l $turx $tury l $turx $tlly l $tllx
  6. $tlly m @cp pathbbox @rs/$tury xd/$turx xd/$tlly xd/$tllx xd/$wid $turx $tllx
  7. sub def/$hei $tury $tlly sub def @gs $vectpat{1 0 0 0 0 _ $o @scc_5{wfill}if}{
  8. $t $c $m $y $k $n $o @scc_5{SepMode_5 0 eq $pfrg or{$tllx $tlly Tl $wid $hei
  9. scale <00> 8 1 false[8 0 0 1 0 0]{}imagemask}{/$bkg true def}ifelse}if}ifelse
  10. @gr $wid 0 gt $hei 0 gt and{$pn cvlit load aload pop/$pd xd 3 -1 roll sub
  11. /$phei xd exch sub/$pwid xd $wid $pwid div ceiling 1 add/$tlx xd $hei $phei div
  12. ceiling 1 add/$tly xd currentdict/CorelPtrnL2Pattern known $psy 0 eq and $psx 0
  13. eq and{CorelPtrnL2Pattern}{$psx 0 eq{CorelPtrnTileVeritcal}{CorelPtrnTileHoriz
  14. }ifelse}ifelse}if @gr @np/$bkg false def}bd/CorelPtrnSetBBox{pathbbox/$ury xd
  15. /$urx xd/$lly xd/$llx xd}bd/CorelPtrnSetFirstTile{$tllx $pxf add dup $tllx gt
  16. {$pwid sub}if/$tx xd $tury $pyf sub dup $tury lt{$phei add}if/$ty xd}bd/p{/$pm
  17. xd 7 rp/$pyf xd/$pxf xd/$pn xd/$fil 1 def}bd/CorelPtrnDraw{@ep}bd
  18. /CorelPtrnPutTile{@sv/$in true def 2 copy dup $lly le{/$in false def}if $phei
  19. sub $ury ge{/$in false def}if dup $urx ge{/$in false def}if $pwid add $llx le{
  20. /$in false def}if $in{@np 2 copy m $pwid 0 rl 0 $phei neg rl $pwid neg 0 rl 0
  21. $phei rl clip @np $pn cvlit load aload pop 7 -1 roll 5 index sub 7 -1 roll 3
  22. index sub Tl matrix currentmatrix/$ctm xd CorelPtrnDraw pop pop pop pop}{pop
  23. pop}ifelse @rs}bd/CorelPtrnTileHoriz{CorelPtrnSetFirstTile 0 1 $tly 1 sub{dup
  24. $psx mul $tx add{dup $llx gt{$pwid sub}{exit}ifelse}loop exch $phei mul $ty
  25. exch sub 0 1 $tlx 1 sub{$pwid mul 3 copy 3 -1 roll add exch CorelPtrnPutTile
  26. pop}for pop pop}for}bd/CorelPtrnTileVeritcal{CorelPtrnSetFirstTile 0 1 $tlx 1
  27. sub{dup $pwid mul $tx add exch $psy mul $ty exch sub{dup $ury lt{$phei add}
  28. {exit}ifelse}loop 0 1 $tly 1 sub{$phei mul 3 copy sub CorelPtrnPutTile pop}for
  29. pop pop}for}bd L2? UseLevel 2 ge and{/CorelPtrnL2Pattern{[$pn cvlit load aload
  30. pop pop]$pwid $phei $pn cvlit load aload pop pop pop pop pathbbox pop pop 2
  31. index sub exch 3 index sub 4 -2 roll pop pop exch matrix identmatrix translate
  32. /PatternMatrix xd/PatternYStep xd/PatternXStep xd/PatternBBox xd currentdict
  33. /PatternMainDict xd <</PaintType 1/PatternType 1/TilingType 1/BBox PatternBBox
  34. /XStep PatternXStep/YStep PatternYStep/PaintProc{begin PatternMainDict begin
  35. $ctm currentmatrix pop 0 CorelPtrnDraw end end}bind >> PatternMatrix
  36. makepattern setpattern fill}def}if
  37.