diff --git a/pd/nw/css/c64.css b/pd/nw/css/c64.css index 1045bf06f50518314cafc0794253ecc3fb405220..c50d43984f6a7e179cbd8c29ccc89e5bcdcdf9ed 100644 --- a/pd/nw/css/c64.css +++ b/pd/nw/css/c64.css @@ -60,6 +60,13 @@ stroke: #7c71da; } +/* The outline to show the visible area for a Graph-On-Parent canvas, + i.e., the "red rectangle" */ +#gop_rect { + fill: none; + stroke: #ff9933; +} + .cord.signal { stroke-width: 2; stroke: #7569d7; diff --git a/pd/nw/css/default.css b/pd/nw/css/default.css index c256cd42c7f64b7aef69a873a83f158dfbdf5d49..263fbc127eaa09331519e91f6e34fe756bb9e60c 100644 --- a/pd/nw/css/default.css +++ b/pd/nw/css/default.css @@ -84,6 +84,13 @@ mark.console_find_highlighted { stroke: #e87216; } +/* The outline to show the visible area for a Graph-On-Parent canvas, + i.e., the "red rectangle" */ +#gop_rect { + fill: none; + stroke: red; +} + .cord.signal { stroke-width: 2; stroke: #808095; diff --git a/pd/nw/css/extended.css b/pd/nw/css/extended.css index 1523d29d7afb84cbc5130e84b87aa5c187c32580..df5e84a07a0371b574202ee625807a75023270be 100644 --- a/pd/nw/css/extended.css +++ b/pd/nw/css/extended.css @@ -59,6 +59,13 @@ stroke: black; } +/* The outline to show the visible area for a Graph-On-Parent canvas, + i.e., the "red rectangle" */ +#gop_rect { + fill: none; + stroke: red; +} + .cord.signal { stroke-width: 2; stroke: #828297; diff --git a/pd/nw/css/inverted.css b/pd/nw/css/inverted.css index 8605587f8a6b935391af0a68664d419c000dbaf8..9c93459e2396724fe9a6eff2d5d8a62aeaff77b1 100644 --- a/pd/nw/css/inverted.css +++ b/pd/nw/css/inverted.css @@ -61,6 +61,15 @@ stroke: white; } +/* The outline to show the visible area for a Graph-On-Parent canvas, + i.e., the "red rectangle" */ +#gop_rect { + fill: none; + stroke: blue; + stroke-opacity: 0.8; + stroke-dasharray: 5 2; +} + .cord.signal { stroke-width: 2; stroke: #7d7d68; diff --git a/pd/nw/css/strongbad.css b/pd/nw/css/strongbad.css index b603c8aa0f2a9fde72c408da1a186c5840600752..1737eeb92aaa412d0161345cbcec6cbd0309bd10 100644 --- a/pd/nw/css/strongbad.css +++ b/pd/nw/css/strongbad.css @@ -60,6 +60,14 @@ stroke: #53b83b; } +/* The outline to show the visible area for a Graph-On-Parent canvas, + i.e., the "red rectangle" */ +#gop_rect { + fill: none; + stroke: red; + stroke-opacity: 0.6; +} + .cord.signal { stroke-width: 2; stroke: #53b83b; diff --git a/pd/nw/css/subdued.css b/pd/nw/css/subdued.css index 073b1d6c308b34374cbb2797a45446cad0bc042b..ca36e375bb6447c26adfd2a429f1be451a3582d7 100644 --- a/pd/nw/css/subdued.css +++ b/pd/nw/css/subdued.css @@ -60,6 +60,14 @@ stroke: #333333; } +/* The outline to show the visible area for a Graph-On-Parent canvas, + i.e., the "red rectangle" */ +#gop_rect { + fill: none; + stroke: blue; + stroke-opacity: 0.4; +} + .cord.signal { stroke-width: 2; stroke: #666666; diff --git a/pd/nw/css/vanilla.css b/pd/nw/css/vanilla.css index 6aa0a5f0b728f0937f30c091d998b846c7688d0a..07c22908e42496fdd8892b034c635b2868131a84 100644 --- a/pd/nw/css/vanilla.css +++ b/pd/nw/css/vanilla.css @@ -60,6 +60,13 @@ stroke: black; } +/* The outline to show the visible area for a Graph-On-Parent canvas, + i.e., the "red rectangle" */ +#gop_rect { + fill: none; + stroke: red; +} + .cord.signal { stroke-width: 2; stroke: black; diff --git a/pd/nw/css/vanilla_inverted.css b/pd/nw/css/vanilla_inverted.css index 48920bbab2982e413caca3c8a5ed5d79e5626539..11840c5910b8f84ac4fcd09194f7a209c2348219 100644 --- a/pd/nw/css/vanilla_inverted.css +++ b/pd/nw/css/vanilla_inverted.css @@ -60,6 +60,14 @@ stroke: white; } +/* The outline to show the visible area for a Graph-On-Parent canvas, + i.e., the "red rectangle" */ +#gop_rect { + fill: none; + stroke: blue; + stroke-opacity: 0.8; +} + .cord.signal { stroke-width: 2; stroke: white; diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js index b3a9c610aafe06a6d19c910f78e13f2694960a82..f1813f417612f640046ce0a0f3d02363ed3bf836 100644 --- a/pd/nw/pdgui.js +++ b/pd/nw/pdgui.js @@ -2846,18 +2846,17 @@ function gui_canvas_drawredrect(cid, x1, y1, x2, y2) { var svgelem = get_item(cid, "patchsvg"), b; b = create_item(cid, "rect", { - x: x1, - y: y1, + x: x1 + 0.5, // align to pixel grid + y: y1 + 0.5, // align to pixel grid width: x2 - x1, height: y2 - y1, - stroke: "red", - id: "GOP" + id: "gop_rect" // Note: the old tk tag was "GOP" }); svgelem.appendChild(b); } function gui_canvas_deleteredrect(cid) { - var r = get_item(cid, "GOP"); + var r = get_item(cid, "gop_rect"); // We need to check for existence here, because the first // time setting GOP in properties, there is no red rect yet. // But setting properties when the subpatch's window is