constants.lisp 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ;; This software is Copyright (c) cage
  2. ;; cage grants you the rights to distribute
  3. ;; and use this software as governed by the terms
  4. ;; of the Lisp Lesser GNU Public License
  5. ;; (http://opensource.franz.com/preamble.html),
  6. ;; known as the LLGPL
  7. (in-package cl-pslib)
  8. (defmacro define-string-constant ((prefix) &rest names)
  9. `(progn
  10. ,@(mapcar #'(lambda (cn)
  11. `(alexandria:define-constant
  12. ,(alexandria:format-symbol t "+~:@(~a-~a~)+" prefix cn)
  13. ,cn :test #'string=))
  14. names)))
  15. (alexandria:define-constant +true+ "true" :test #'string=)
  16. (alexandria:define-constant +false+ "false" :test #'string=)
  17. (define-string-constant ("local-link") "fitpage" "fitwidth" "fitheight" "fitbbox")
  18. (define-string-constant ("pdf-link") "fitpage" "fitwidth" "fitheight" "fitbbox")
  19. (alexandria:define-constant +pattern-paint-type1+ 1 :test #'=)
  20. (alexandria:define-constant +pattern-paint-type2+ 2 :test #'=)
  21. (define-string-constant ("find-font-encoding") "builtin")
  22. (define-string-constant ("value-key") "fontsize" "font" "imagewidth" "imageheight"
  23. "capheight" "ascender" "descender"
  24. "italicangle" "underlineposition" "underlinethickness"
  25. "textx" "texty" "textrendering" "wordspacing"
  26. "major" "minor" "subminor" "revision"
  27. "charspacing" "hyphenminchars" "separationcolor"
  28. "textrise" "leading" "hyphenminchars"
  29. "parindent" "numindentlines" "parskip"
  30. "parindentskip" "linenumberspace" "linenumbersep"
  31. "boxheight" "linebreak")
  32. (define-string-constant ("parameter-key") "FontAFM" "FontOutline" "FontProtusion"
  33. "FontEncoding" "RightMarginKerning" "LeftMarginKerning"
  34. "RightMarginKerning" "LeftMarginKerning" "SearchPath"
  35. "underline" "overline" "strikeout" "warning" "hyphendict"
  36. "inputencoding" "linenumbermode" "ligaturedisolvechar"
  37. "imagereuse" "imageencoding")
  38. (define-string-constant ("image-encoding-type") "hex")
  39. (define-string-constant ("image-file") "mask" "masked")
  40. (define-string-constant ("image-file-type") "png" "jpeg" "gif" "tiff" "bmp" "eps")
  41. (define-string-constant ("image-type") "raw" "eps")
  42. (define-string-constant ("shading") "radial" "axial")
  43. (define-string-constant ("shading-opt") "extend0" "extend0" "r0" "r1")
  44. (alexandria:define-constant +ps-linecap-butt+ PS_LINECAP_BUTT :test #'=)
  45. (alexandria:define-constant +ps-linecap-round+ PS_LINECAP_ROUND :test #'=)
  46. (alexandria:define-constant +ps_linejoin_miter+ PS_LINEJOIN_MITER :test #'=)
  47. (alexandria:define-constant +ps_linejoin_round+ PS_LINEJOIN_ROUND :test #'=)
  48. (alexandria:define-constant +ps_linejoin_bevel+ PS_LINEJOIN_BEVEL :test #'=)
  49. (define-string-constant ("link-border-style") "solid" "dashed")
  50. (define-string-constant ("ps-comment-key") "Keywords" "Subject" "Title"
  51. "Creator" "Author" "BoundingBox" "Orientation")
  52. (define-string-constant ("color-type") "fill" "stroke" "fillstroke")
  53. (define-string-constant ("color-space") "gray" "spot" "rgb" "cmyk" "pattern")
  54. (define-string-constant ("line-number-mode") "box" "paragraph")
  55. (define-string-constant ("boxed-text-feature") "blind")
  56. (define-string-constant ("boxed-text-h-mode") "justify" "fulljustify" "right" "left" "center")
  57. (define-string-constant ("boxed-text-value") "boxheight")