Package: saods9 / 8.0.1+repack-2

tksao-Add-a-dummy-psscale.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From: Ole Streicher <debian@liska.ath.cx>
Date: Fri, 16 Dec 2016 09:23:38 +0100
Subject: [tksao] Add a dummy psscale

The original code from ds9 uses a patched postscript code to allow
scaling. Since we use standard Tk, we cannor support this (postscript
scaling is silently ignored), but we need to support the global
variable "psScale" which Doug Mink hacked into to get the scaling.
---
 tksao/widget/widget.C | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tksao/widget/widget.C b/tksao/widget/widget.C
index 5427f64..08a6bb8 100644
--- a/tksao/widget/widget.C
+++ b/tksao/widget/widget.C
@@ -7,6 +7,8 @@
 #include "widget.h"
 #include "util.h"
 
+float psScale = 1.0;
+
 // Tk Canvas Widget Functions Declaration
 
 int WidgetConfigProc(Tcl_Interp* interp, Tk_Canvas canvas, Tk_Item* item, 
@@ -592,7 +594,7 @@ int Widget::getColor(const char* str)
   XColor* cc= NULL;
   // starting with tk8.6, colors are W3C based, not X11
   if (!strncmp(str,"green",5) || !strncmp(str,"GREEN",5))
-    cc = Tk_GetColor(interp, tkwin, "lime");
+    cc = Tk_GetColor(interp, tkwin, "#32CD32");
   else
     cc = Tk_GetColor(interp, tkwin, str);