Commit 4827e4fd authored by Gary Hodgson's avatar Gary Hodgson Committed by Guillaume Seguin

red for bitmaps;

parent 09a4f457
...@@ -85,9 +85,7 @@ class DisplayFrame(wx.Frame): ...@@ -85,9 +85,7 @@ class DisplayFrame(wx.Frame):
dc = wx.MemoryDC() dc = wx.MemoryDC()
dc.SelectObject(self.bitmap) dc.SelectObject(self.bitmap)
dc.SetBackground(wx.Brush("black")) dc.SetBackground(wx.Brush("black"))
dc.Clear() dc.Clear()
dc.SetPen(wx.Pen("red") if self.layer_red else wx.Pen("white"))
dc.SetBrush(wx.Brush("red") if self.layer_red else wx.Brush("white"))
if self.slicer == 'Slic3r' or self.slicer == 'Skeinforge': if self.slicer == 'Slic3r' or self.slicer == 'Skeinforge':
...@@ -116,6 +114,8 @@ class DisplayFrame(wx.Frame): ...@@ -116,6 +114,8 @@ class DisplayFrame(wx.Frame):
elif self.slicer == 'bitmap': elif self.slicer == 'bitmap':
if isinstance(image, str): if isinstance(image, str):
image = wx.Image(image) image = wx.Image(image)
if self.layer_red:
image = image.AdjustChannels(1,0,0,1)
dc.DrawBitmap(wx.BitmapFromImage(image.Scale(image.Width * self.scale, image.Height * self.scale)), self.offset[0], -self.offset[1], True) dc.DrawBitmap(wx.BitmapFromImage(image.Scale(image.Width * self.scale, image.Height * self.scale)), self.offset[0], -self.offset[1], True)
else: else:
raise Exception(self.slicer + " is an unknown method.") raise Exception(self.slicer + " is an unknown method.")
...@@ -565,8 +565,6 @@ class SettingsFrame(wx.Frame): ...@@ -565,8 +565,6 @@ class SettingsFrame(wx.Frame):
if os.path.isfile(path) and imghdr.what(path) in accepted_image_types: if os.path.isfile(path) and imghdr.what(path) in accepted_image_types:
ol.append(path) ol.append(path)
print ol
return ol, -1, "bitmap" return ol, -1, "bitmap"
def load_file(self, event): def load_file(self, event):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment