Make AMS trays read-only in laser mode and add the gradient fill helper

This commit is contained in:
SoftFever
2026-07-17 05:06:09 +08:00
parent 7265a2fbfe
commit 50abe02f18
9 changed files with 65 additions and 8 deletions

View File

@@ -3,10 +3,17 @@
#include <wx/bitmap.h>
#include <wx/colour.h>
#include <wx/dc.h>
#include <wx/gdicmn.h>
#include <vector>
namespace Slic3r { namespace GUI {
// Fills a rect with a west->east linear gradient by drawing solid 1px columns.
// Use instead of wxDC::GradientFillLinear, whose CoreGraphics (CGShading) backend
// fails to render on some macOS builds; solid fills are unaffected.
void fill_gradient_rect_east(wxDC& dc, const wxRect& rect, const wxColour& from, const wxColour& to);
enum class FilamentRenderMode {
Single,
Dual,