diff options
author | Paul Gardiner <paul@glidos.net> | 2012-06-21 13:53:11 +0100 |
---|---|---|
committer | Paul Gardiner <paul@glidos.net> | 2012-06-21 13:53:11 +0100 |
commit | b24eab54d6b594c773d80e913c90872b86f6ab65 (patch) | |
tree | 5b23483d0c46dbb0e537e4c50815188276eb4e9e /pdf/pdf_js.c | |
parent | af86d8111354d8955e3fa109df1625e28181956f (diff) | |
download | mupdf-b24eab54d6b594c773d80e913c90872b86f6ab65.tar.xz |
Forms: implement javascript "color" convenience object (fixes bug 693130)
Diffstat (limited to 'pdf/pdf_js.c')
-rw-r--r-- | pdf/pdf_js.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/pdf/pdf_js.c b/pdf/pdf_js.c index b4ea5013..72111775 100644 --- a/pdf/pdf_js.c +++ b/pdf/pdf_js.c @@ -243,7 +243,20 @@ static void preload_helpers(pdf_js *js) "border.d = \"Dashed\";\n" "border.b = \"Beveled\";\n" "border.i = \"Inset\";\n" - "border.u = \"Underline\";\n"); + "border.u = \"Underline\";\n" + "var color = new Array();\n" + "color.transparent = [ \"T\" ];\n" + "color.black = [ \"G\", 0];\n" + "color.white = [ \"G\", 1];\n" + "color.red = [ \"RGB\", 1,0,0 ];\n" + "color.green = [ \"RGB\", 0,1,0 ];\n" + "color.blue = [ \"RGB\", 0,0,1 ];\n" + "color.cyan = [ \"CMYK\", 1,0,0,0 ];\n" + "color.magenta = [ \"CMYK\", 0,1,0,0 ];\n" + "color.yellow = [ \"CMYK\", 0,0,1,0 ];\n" + "color.dkGray = [ \"G\", 0.25];\n" + "color.gray = [ \"G\", 0.5];\n" + "color.ltGray = [ \"G\", 0.75];\n"); } pdf_js *pdf_new_js(pdf_document *doc) |