Skip to content

Commit

Permalink
Fixed problem with mono and train logo
Browse files Browse the repository at this point in the history
Noticed on Raspberry with mono 5 the train logo background was not
rendered correctly, this is a work around.
  • Loading branch information
Tom committed Oct 31, 2019
1 parent dc416b8 commit 8c97634
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions RailtimeScreenSaver/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("1.5.0.0")>
<Assembly: AssemblyFileVersion("1.5.0.0")>
<Assembly: AssemblyVersion("1.5.0.1")>
<Assembly: AssemblyFileVersion("1.5.0.1")>
4 changes: 2 additions & 2 deletions RailtimeScreenSaver/Templates.vb
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ Public Class SNCBTemplate
Dim AirplaneIcon As Bitmap = My.Resources.airplane
Dim Pallete As System.Drawing.Imaging.ColorPalette = AirplaneIcon.Palette
Pallete.Entries(0) = m_ForeColor
Pallete.Entries(1) = Color.FromArgb(0, 0, 0, 0)
Pallete.Entries(1) = Color.FromArgb(0, TrainRectColor.R, TrainRectColor.G, TrainRectColor.B)
AirplaneIcon.Palette = Pallete
Graphics.DrawImage(AirplaneIcon, New RectangleF(TrackRect.X - BorderWidth - AirPlaneSize, TrackRect.Y, AirPlaneSize, AirPlaneSize))
ElseIf TrainType = "TGV" OrElse TrainType = "THA" OrElse TrainType = "ICE" OrElse TrainType = "TGV" OrElse TrainType = "EUR" Then
Expand All @@ -231,7 +231,7 @@ Public Class SNCBTemplate
Dim LogoWidth As Double = TrackRect.Height / Logo.Height * Logo.Width * 7 / 8
Dim Pallete As System.Drawing.Imaging.ColorPalette = Logo.Palette
Pallete.Entries(0) = m_ForeColor
Pallete.Entries(1) = Color.FromArgb(0, 0, 0, 0)
Pallete.Entries(1) = Color.FromArgb(0, TrainRectColor.R, TrainRectColor.G, TrainRectColor.B)
Logo.Palette = Pallete
Graphics.InterpolationMode = Drawing2D.InterpolationMode.HighQualityBilinear
Graphics.DrawImage(Logo, New RectangleF(TrackRect.X - BorderWidth - LogoWidth, TrackRect.Y, LogoWidth, TrackRect.Height))
Expand Down
Binary file modified exe/RailtimeScreenSaver.exe
Binary file not shown.
Binary file modified exe/RailtimeScreenSaver.scr
Binary file not shown.

0 comments on commit 8c97634

Please sign in to comment.