Created
May 22, 2011 04:32
-
-
Save ahankinson/985185 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/gamera/gui/classifier_display.py b/gamera/gui/classifier_display.py | |
index e483570..89c83c6 100644 | |
--- a/gamera/gui/classifier_display.py | |
+++ b/gamera/gui/classifier_display.py | |
@@ -164,8 +164,8 @@ class ExtendedMultiImageWindow(MultiImageWindow): | |
font.SetWeight(wx.BOLD) | |
self.titlebar_text.SetFont(font) | |
if wx.Platform != '__WXGTK__': | |
- self.titlebar_text.SetForegroundColour(wx.Color(255,255,255)) | |
- self.titlebar_text.SetBackgroundColour(wx.Color(128,128,128)) | |
+ self.titlebar_text.SetForegroundColour(wx.Colour(255,255,255)) | |
+ self.titlebar_text.SetBackgroundColour(wx.Colour(128,128,128)) | |
if hasattr(buttons, 'ThemedGenBitmapButton'): | |
TitleBarButtonClass = buttons.ThemedGenBitmapButton | |
else: | |
diff --git a/gamera/gui/gamera_display.py b/gamera/gui/gamera_display.py | |
index b64b5b5..f483868 100644 | |
--- a/gamera/gui/gamera_display.py | |
+++ b/gamera/gui/gamera_display.py | |
@@ -179,7 +179,7 @@ class ImageDisplay(wx.ScrolledWindow, util.CallbackObject): | |
w = x2 - x | |
h = y2 - y | |
- pen = wx.Pen(wx.Color(0, 0, 255), 2, wx.SOLID) | |
+ pen = wx.Pen(wx.Colour(0, 0, 255), 2, wx.SOLID) | |
dc.SetPen(pen) | |
dc.SetBrush(wx.TRANSPARENT_BRUSH) | |
dc.DrawRectangle(int(x), int(y), int(w), int(h)) | |
@@ -894,10 +894,10 @@ class MultiImageGridRenderer(GridCellRenderer): | |
self.parent = parent | |
self.label_font = wx.Font(6, wx.SWISS, wx.NORMAL, wx.NORMAL) | |
- _colors = {UNCLASSIFIED: wx.Color(255,255,255), | |
- AUTOMATIC: wx.Color(198,145,145), | |
- HEURISTIC: wx.Color(240,230,140), | |
- MANUAL: wx.Color(180,238,180)} | |
+ _colors = {UNCLASSIFIED: wx.Colour(255,255,255), | |
+ AUTOMATIC: wx.Colour(198,145,145), | |
+ HEURISTIC: wx.Colour(240,230,140), | |
+ MANUAL: wx.Colour(180,238,180)} | |
# Draws one cell of the grid | |
def Draw(self, grid, attr, dc, rect, row, col, isSelected): | |
@@ -1067,7 +1067,7 @@ class MultiImageDisplay(gridlib.Grid): | |
self.renderer = MultiImageGridRenderer(self) | |
self.SetDefaultRenderer(self.renderer) | |
if wx.VERSION >= (2, 5): | |
- self.SetGridLineColour(wx.Color(130,130,254)) | |
+ self.SetGridLineColour(wx.Colour(130,130,254)) | |
self.glyphs = util.CallbackSet() | |
self.sorted_glyphs = [] | |
@@ -1947,7 +1947,7 @@ def graph_horiz(data, dc, x1, y1, x2, y2, mark=None, border=1): | |
scale_y = (y2 - y1) / max(data) | |
m = log(max_data) | |
dc.SetPen(wx.TRANSPARENT_PEN) | |
- light_blue = wx.Color(128, 128, 255) | |
+ light_blue = wx.Colour(128, 128, 255) | |
for i in range(len(data)): | |
datum = data[i] * scale_y | |
dc.SetBrush(wx.WHITE_BRUSH) | |
@@ -1975,7 +1975,7 @@ def graph_vert(data, dc, x1, y1, x2, y2, mark=None, border=1): | |
scale_x = 1.0 | |
else: | |
scale_x = (x2 - x1) / max_data | |
- light_blue = wx.Color(128, 128, 255) | |
+ light_blue = wx.Colour(128, 128, 255) | |
dc.SetPen(wx.TRANSPARENT_PEN) | |
for i in range(len(data)): | |
datum = data[i] * scale_x | |
@@ -2000,7 +2000,7 @@ def graph_scale(dc, x1, y1, x2, y2): | |
scale_x = float(x2 - x1) / float(255) | |
dc.SetPen(wx.TRANSPARENT_PEN) | |
for i in range(255): | |
- dc.SetBrush(wx.Brush(wx.Color(i, i, i), wx.SOLID)) | |
+ dc.SetBrush(wx.Brush(wx.Colour(i, i, i), wx.SOLID)) | |
dc.DrawRectangle(x1 + i * scale_x, y1, | |
scale_x + 1, y2 - y1) | |
dc.SetPen(wx.BLACK_PEN) | |
@@ -2108,8 +2108,8 @@ class ProjectionDisplay(wx.Frame): | |
# PRINTING | |
############################################################################## | |
-if wx.PostScriptDC_GetResolution() < 150: | |
- wx.PostScriptDC_SetResolution(600) | |
+# if wx.PostScriptDC_GetResolution() < 150: | |
+# wx.PostScriptDC_SetResolution(600) | |
class GameraPrintout(wx.Printout): | |
def __init__(self, image, margin = 1.0): | |
diff --git a/gamera/gui/gui.py b/gamera/gui/gui.py | |
index 3e76095..efeda0c 100644 | |
--- a/gamera/gui/gui.py | |
+++ b/gamera/gui/gui.py | |
@@ -23,7 +23,7 @@ | |
# wxPython | |
try: | |
import wxversion | |
- wxversion.select(["2.8", "2.6", "2.5", "2.4"]) | |
+ wxversion.select(["2.9", "2.8", "2.6", "2.5", "2.4"]) | |
except ImportError: | |
from wxPython.wx import wxVERSION | |
# Check that the version is correct | |
diff --git a/gamera/gui/gui_util.py b/gamera/gui/gui_util.py | |
index c0a19e2..eb66b96 100644 | |
--- a/gamera/gui/gui_util.py | |
+++ b/gamera/gui/gui_util.py | |
@@ -30,19 +30,19 @@ config.add_option( | |
"", "--default-dir", default=".", | |
help="[gui] The default directory when opening files") | |
-colors = (wx.Color(0xbc, 0x2d, 0x2d), wx.Color(0xb4, 0x2d, 0xbc), | |
- wx.Color(0x2d, 0x34, 0xbc), wx.Color(0x2d, 0xbc, 0x2d), | |
- wx.Color(0x2d, 0xbc, 0xbc), wx.Color(0xbc, 0xb7, 0x2d), | |
- wx.Color(0xbc, 0x88, 0x2d), wx.Color(0x6e, 0x00, 0xc7)) | |
+colors = (wx.Colour(0xbc, 0x2d, 0x2d), wx.Colour(0xb4, 0x2d, 0xbc), | |
+ wx.Colour(0x2d, 0x34, 0xbc), wx.Colour(0x2d, 0xbc, 0x2d), | |
+ wx.Colour(0x2d, 0xbc, 0xbc), wx.Colour(0xbc, 0xb7, 0x2d), | |
+ wx.Colour(0xbc, 0x88, 0x2d), wx.Colour(0x6e, 0x00, 0xc7)) | |
color_number = 0 | |
def get_color(number): | |
global color_number | |
- if isinstance(number, wx.Color): | |
+ if isinstance(number, wx.Colour): | |
return number | |
if util.is_sequence(number): | |
if len(number) == 3: | |
- return wx.Color(*tuple(number)) | |
+ return wx.Colour(*tuple(number)) | |
else: | |
number = None | |
if type(number) != IntType: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment