Add support for color overrides
This commit is contained in:
parent
4f7d46aa13
commit
1e965fc2e7
4 changed files with 33 additions and 19 deletions
|
|
@ -108,7 +108,7 @@ namespace MatterHackers.GCodeVisualizer
|
|||
}
|
||||
}
|
||||
|
||||
public override void Render(Graphics2D graphics2D, GCodeRenderInfo renderInfo)
|
||||
public override void Render(Graphics2D graphics2D, GCodeRenderInfo renderInfo, Color overrideColor = default(Color))
|
||||
{
|
||||
if (renderInfo.CurrentRenderType.HasFlag(RenderType.Extrusions))
|
||||
{
|
||||
|
|
@ -116,7 +116,11 @@ namespace MatterHackers.GCodeVisualizer
|
|||
|
||||
Color extrusionColor = Color.Black;
|
||||
|
||||
if (renderInfo.CurrentRenderType.HasFlag(RenderType.SpeedColors))
|
||||
if (overrideColor != default(Color))
|
||||
{
|
||||
extrusionColor = overrideColor;
|
||||
}
|
||||
else if (renderInfo.CurrentRenderType.HasFlag(RenderType.SpeedColors))
|
||||
{
|
||||
extrusionColor = color;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue