From e1c80d76cec4d53bf6162adec36e3fe6ae6088c3 Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Fri, 8 Sep 2017 13:46:06 -0700 Subject: [PATCH] Fixed image converter bounds --- CustomWidgets/DataViewGraph.cs | 3 ++- PartPreviewWindow/View3D/MeshViewerWidget.cs | 18 +++++++++--------- Submodules/agg-sharp | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/CustomWidgets/DataViewGraph.cs b/CustomWidgets/DataViewGraph.cs index f44a5e903..1ac9b0f96 100644 --- a/CustomWidgets/DataViewGraph.cs +++ b/CustomWidgets/DataViewGraph.cs @@ -95,7 +95,8 @@ namespace MatterHackers.MatterControl.CustomWidgets for (int i = 0; i < Width / pixelSkip; i++) { double xPos = Width - ((i * pixelSkip + TotalAdds) % Width); - graphics2D.Line(xPos, 0, xPos, Height, new RGBA_Bytes(backgroundGridColor, 64)); + int inset = (int)((i % 2) == 0 ? Height / 6 : Height / 3); + graphics2D.Line(xPos, inset, xPos, Height - inset, new RGBA_Bytes(backgroundGridColor, 64)); } for (int i = 0; i < Width - 1; i++) diff --git a/PartPreviewWindow/View3D/MeshViewerWidget.cs b/PartPreviewWindow/View3D/MeshViewerWidget.cs index d42508b67..6fd299552 100644 --- a/PartPreviewWindow/View3D/MeshViewerWidget.cs +++ b/PartPreviewWindow/View3D/MeshViewerWidget.cs @@ -79,13 +79,13 @@ namespace MatterHackers.MeshVisualizer private InteractionLayer interactionLayer; - private PrinterConfig printer; + private PrinterConfig printerConfig; - public MeshViewerWidget(PrinterConfig printer, InteractionLayer interactionLayer, string startingTextMessage = "", EditorType editorType = EditorType.Part) + public MeshViewerWidget(PrinterConfig printerConfig, InteractionLayer interactionLayer, string startingTextMessage = "", EditorType editorType = EditorType.Part) { this.EditorMode = editorType; - this.scene = printer.Bed.Scene; - this.printer = printer; + this.scene = printerConfig.Bed.Scene; + this.printerConfig = printerConfig; var activePrintItem = ApplicationController.Instance.ActivePrintItem; @@ -169,8 +169,8 @@ namespace MatterHackers.MeshVisualizer { try { - string url = printer.Settings.GetValue("PrinterShapeUrl"); - string extension = printer.Settings.GetValue("PrinterShapeExtension"); + string url = printerConfig.Settings.GetValue("PrinterShapeUrl"); + string extension = printerConfig.Settings.GetValue("PrinterShapeExtension"); if (string.IsNullOrEmpty(url) || string.IsNullOrEmpty(extension)) { @@ -597,16 +597,16 @@ namespace MatterHackers.MeshVisualizer { bedColor = new RGBA_Bytes(this.BedColor, this.BedColor.alpha / 4); } - GLHelper.Render(printer.Bed.Mesh, bedColor, RenderTypes.Shaded, World.ModelviewMatrix); + GLHelper.Render(printerConfig.Bed.Mesh, bedColor, RenderTypes.Shaded, World.ModelviewMatrix); if (printerShape != null) { GLHelper.Render(printerShape, bedColor, RenderTypes.Shaded, World.ModelviewMatrix); } } - if (printer.Bed.BuildVolumeMesh != null && RenderBuildVolume) + if (printerConfig.Bed.BuildVolumeMesh != null && RenderBuildVolume) { - GLHelper.Render(printer.Bed.BuildVolumeMesh, this.BuildVolumeColor, RenderTypes.Shaded, World.ModelviewMatrix); + GLHelper.Render(printerConfig.Bed.BuildVolumeMesh, this.BuildVolumeColor, RenderTypes.Shaded, World.ModelviewMatrix); } } else diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index 1a1cc871a..2e3142d1e 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit 1a1cc871af99030e83a60fa06136d1f401ad20c6 +Subproject commit 2e3142d1e9863aaba41ae8b2962773add3de13eb