Changed RGBA_Bytes -> Color

This commit is contained in:
Lars Brubaker 2017-10-31 11:43:25 -07:00
parent c6a3c14118
commit 8d1fecab8c
107 changed files with 495 additions and 495 deletions

View file

@ -45,7 +45,7 @@ namespace MatterHackers.GCodeVisualizer
this.extruderIndex = extruderIndex;
}
static public void CreateCylinder(VectorPOD<ColorVertexData> colorVertexData, VectorPOD<int> indexData, Vector3 startPos, Vector3 endPos, double radius, int steps, RGBA_Bytes color, double layerHeight)
static public void CreateCylinder(VectorPOD<ColorVertexData> colorVertexData, VectorPOD<int> indexData, Vector3 startPos, Vector3 endPos, double radius, int steps, Color color, double layerHeight)
{
Vector3 direction = endPos - startPos;
Vector3 directionNormal = direction.GetNormal();
@ -148,7 +148,7 @@ namespace MatterHackers.GCodeVisualizer
}
}
static public void CreatePointer(VectorPOD<ColorVertexData> colorVertexData, VectorPOD<int> indexData, Vector3 startPos, Vector3 endPos, double radius, int steps, RGBA_Bytes color)
static public void CreatePointer(VectorPOD<ColorVertexData> colorVertexData, VectorPOD<int> indexData, Vector3 startPos, Vector3 endPos, double radius, int steps, Color color)
{
Vector3 direction = endPos - startPos;
Vector3 directionNormal = direction.GetNormal();

View file

@ -39,9 +39,9 @@ namespace MatterHackers.GCodeVisualizer
{
private float extrusionVolumeMm3;
private float layerHeight;
private RGBA_Bytes color;
private Color color;
public RenderFeatureExtrusion(Vector3 start, Vector3 end, int extruderIndex, double travelSpeed, double totalExtrusionMm, double filamentDiameterMm, double layerHeight, RGBA_Bytes color)
public RenderFeatureExtrusion(Vector3 start, Vector3 end, int extruderIndex, double travelSpeed, double totalExtrusionMm, double filamentDiameterMm, double layerHeight, Color color)
: base(start, end, extruderIndex, travelSpeed)
{
this.color = color;
@ -98,7 +98,7 @@ namespace MatterHackers.GCodeVisualizer
{
double extrusionLineWidths = GetExtrusionWidth(renderInfo.CurrentRenderType) * 2 * renderInfo.LayerScale;
RGBA_Bytes extrusionColor = RGBA_Bytes.Black;
Color extrusionColor = Color.Black;
if (extruderIndex > 0)
{
extrusionColor = renderInfo.GetMaterialColor(extruderIndex);
@ -110,7 +110,7 @@ namespace MatterHackers.GCodeVisualizer
if (renderInfo.CurrentRenderType.HasFlag(RenderType.TransparentExtrusion))
{
extrusionColor = new RGBA_Bytes(extrusionColor, 200);
extrusionColor = new Color(extrusionColor, 200);
}
// render the part using opengl

View file

@ -75,17 +75,17 @@ namespace MatterHackers.GCodeVisualizer
}
// retract and unretract are the extruder color
RGBA_Bytes color = renderInfo.GetMaterialColor(extruderIndex);
Color color = renderInfo.GetMaterialColor(extruderIndex);
// except for extruder 0 where they are the red and blue we are familiar with
if (extruderIndex == 0)
{
if (extrusionAmount > 0)
{
color = RGBA_Bytes.Blue;
color = Color.Blue;
}
else
{
color = RGBA_Bytes.Red;
color = Color.Red;
}
}
if (extrusionAmount > 0)
@ -116,11 +116,11 @@ namespace MatterHackers.GCodeVisualizer
renderInfo.Transform.transform(ref position);
RGBA_Bytes retractionColor = new RGBA_Bytes(RGBA_Bytes.Red, 200);
Color retractionColor = new Color(Color.Red, 200);
if (extrusionAmount > 0)
{
// unretraction
retractionColor = new RGBA_Bytes(RGBA_Bytes.Blue, 200);
retractionColor = new Color(Color.Blue, 200);
}
// render the part using opengl

View file

@ -92,7 +92,7 @@ namespace MatterHackers.GCodeVisualizer
if ((renderInfo.CurrentRenderType & RenderType.Moves) == RenderType.Moves)
{
double movementLineWidth = 0.35 * renderInfo.LayerScale;
RGBA_Bytes movementColor = new RGBA_Bytes(10, 190, 15);
Color movementColor = new Color(10, 190, 15);
// render the part using opengl
Graphics2DOpenGL graphics2DGl = graphics2D as Graphics2DOpenGL;