diff --git a/api/tests/integration/ref/rendering/render_rgroups.py.out b/api/tests/integration/ref/rendering/render_rgroups.py.out index 311fcc63bc..bd9f585225 100644 --- a/api/tests/integration/ref/rendering/render_rgroups.py.out +++ b/api/tests/integration/ref/rendering/render_rgroups.py.out @@ -1,87 +1,89 @@ -rgroups/rgroup-mol-rec1.png rendering status: OK -rgroups/rgroup-qmol-rec1.png rendering status: OK -rgroups/noap-mol-rec1.png rendering status: OK -rgroups/noap-qmol-rec1.png rendering status: OK -rgroups/norgroup-mol-rec1.png rendering status: OK -rgroups/norgroup-qmol-rec1.png rendering status: OK -rec1 OK -rgroups/rgroup-mol-occur.png rendering status: OK -rgroups/rgroup-qmol-occur.png rendering status: OK -rgroups/noap-mol-occur.png rendering status: OK -rgroups/noap-qmol-occur.png rendering status: OK -rgroups/norgroup-mol-occur.png rendering status: OK -rgroups/norgroup-qmol-occur.png rendering status: OK -occur OK -rgroups/rgroup-mol-resth.png rendering status: OK -rgroups/rgroup-qmol-resth.png rendering status: OK -rgroups/noap-mol-resth.png rendering status: OK -rgroups/noap-qmol-resth.png rendering status: OK -rgroups/norgroup-mol-resth.png rendering status: OK -rgroups/norgroup-qmol-resth.png rendering status: OK -resth OK -rgroups/rgroup-mol-2ap.png rendering status: OK -rgroups/rgroup-qmol-2ap.png rendering status: OK -rgroups/noap-mol-2ap.png rendering status: OK -rgroups/noap-qmol-2ap.png rendering status: OK -rgroups/norgroup-mol-2ap.png rendering status: OK -rgroups/norgroup-qmol-2ap.png rendering status: OK -2ap OK - - - - - - -rec1 OK - - - - - - -occur OK - - - - - - -resth OK - - - - - - -2ap OK -*** R-groups and attachment points *** -0: -rgroups/deco_set1_1_hi.png rendering status: OK -rgroups/deco_set1_1.png rendering status: OK - - -1: -rgroups/deco_set1_2_hi.png rendering status: OK -rgroups/deco_set1_2.png rendering status: OK - - -2: -rgroups/deco_set1_3_hi.png rendering status: OK -rgroups/deco_set1_3.png rendering status: OK - - -3: -rgroups/deco_set1_4_hi.png rendering status: OK -rgroups/deco_set1_4.png rendering status: OK - - -4: -rgroups/deco_set1_5_hi.png rendering status: OK -rgroups/deco_set1_5.png rendering status: OK - - -5: -rgroups/deco_set1_6_hi.png rendering status: OK -rgroups/deco_set1_6.png rendering status: OK - - +rgroups/rgroup-mol-rec1.png rendering status: OK +rgroups/rgroup-qmol-rec1.png rendering status: OK +rgroups/noap-mol-rec1.png rendering status: OK +rgroups/noap-qmol-rec1.png rendering status: OK +rgroups/norgroup-mol-rec1.png rendering status: OK +rgroups/norgroup-qmol-rec1.png rendering status: OK +rec1 OK +rgroups/rgroup-mol-occur.png rendering status: OK +rgroups/rgroup-qmol-occur.png rendering status: OK +rgroups/noap-mol-occur.png rendering status: OK +rgroups/noap-qmol-occur.png rendering status: OK +rgroups/norgroup-mol-occur.png rendering status: OK +rgroups/norgroup-qmol-occur.png rendering status: OK +occur OK +rgroups/rgroup-mol-resth.png rendering status: OK +rgroups/rgroup-qmol-resth.png rendering status: OK +rgroups/noap-mol-resth.png rendering status: OK +rgroups/noap-qmol-resth.png rendering status: OK +rgroups/norgroup-mol-resth.png rendering status: OK +rgroups/norgroup-qmol-resth.png rendering status: OK +resth OK +rgroups/rgroup-mol-2ap.png rendering status: OK +rgroups/rgroup-qmol-2ap.png rendering status: OK +rgroups/noap-mol-2ap.png rendering status: OK +rgroups/noap-qmol-2ap.png rendering status: OK +rgroups/norgroup-mol-2ap.png rendering status: OK +rgroups/norgroup-qmol-2ap.png rendering status: OK +2ap OK + + + + + + +rec1 OK + + + + + + +occur OK + + + + + + +resth OK + + + + + + +2ap OK +*** R-groups and attachment points *** +0: +rgroups/deco_set1_1_hi.png rendering status: OK +rgroups/deco_set1_1.png rendering status: OK + + +1: +rgroups/deco_set1_2_hi.png rendering status: OK +rgroups/deco_set1_2.png rendering status: OK + + +2: +rgroups/deco_set1_3_hi.png rendering status: OK +rgroups/deco_set1_3.png rendering status: OK + + +3: +rgroups/deco_set1_4_hi.png rendering status: OK +rgroups/deco_set1_4.png rendering status: OK + + +4: +rgroups/deco_set1_5_hi.png rendering status: OK +rgroups/deco_set1_5.png rendering status: OK + + +5: +rgroups/deco_set1_6_hi.png rendering status: OK +rgroups/deco_set1_6.png rendering status: OK + + +Test issue 2070 attachment point width +rgroups/issue_2070.png rendering status: OK diff --git a/api/tests/integration/tests/rendering/ref/linux/rgroups/issue_2070.png b/api/tests/integration/tests/rendering/ref/linux/rgroups/issue_2070.png new file mode 100644 index 0000000000..cbd28ec27c Binary files /dev/null and b/api/tests/integration/tests/rendering/ref/linux/rgroups/issue_2070.png differ diff --git a/api/tests/integration/tests/rendering/ref/mac/rgroups/issue_2070.png b/api/tests/integration/tests/rendering/ref/mac/rgroups/issue_2070.png new file mode 100644 index 0000000000..cbd28ec27c Binary files /dev/null and b/api/tests/integration/tests/rendering/ref/mac/rgroups/issue_2070.png differ diff --git a/api/tests/integration/tests/rendering/ref/win/rgroups/issue_2070.png b/api/tests/integration/tests/rendering/ref/win/rgroups/issue_2070.png new file mode 100644 index 0000000000..cbd28ec27c Binary files /dev/null and b/api/tests/integration/tests/rendering/ref/win/rgroups/issue_2070.png differ diff --git a/api/tests/integration/tests/rendering/render_rgroups.py b/api/tests/integration/tests/rendering/render_rgroups.py index 465c8de10f..20ea94199d 100644 --- a/api/tests/integration/tests/rendering/render_rgroups.py +++ b/api/tests/integration/tests/rendering/render_rgroups.py @@ -7,8 +7,8 @@ os.path.join(os.path.abspath(__file__), "..", "..", "..", "common") ) ) -from env_indigo import * # noqa -from rendering import * +from env_indigo import Indigo, IndigoRenderer, isIronPython, joinPathPy +from rendering import checkImageSimilarity indigo = Indigo() renderer = IndigoRenderer(indigo) @@ -216,6 +216,19 @@ def render_molobj(mol_): """ ) +print("Test issue 2070 attachment point width") + +indigo.resetOptions() +indigo.setOption("render-output-format", "png") +indigo.setOption("render-bond-thickness", 5) +fname = joinPathPy("molecules/r1-2ap-aal.mol", __file__) +mol = indigo.loadMoleculeFromFile(fname) +qmol = indigo.loadQueryMoleculeFromFile(fname) +png_file = "rgroups/issue_2070.png" +renderer.renderToFile(mol, joinPathPy("out/" + png_file, __file__)) +print(checkImageSimilarity(png_file)) + + if isIronPython(): renderer.Dispose() indigo.Dispose() diff --git a/core/render2d/src/render_context.cpp b/core/render2d/src/render_context.cpp index ee5d13d3d3..89652247b2 100644 --- a/core/render2d/src/render_context.cpp +++ b/core/render2d/src/render_context.cpp @@ -859,7 +859,7 @@ void RenderContext::drawAttachmentPoint(RenderItemAttachmentPoint& ri, bool idle setSingleSource(ri.color); if (ri.highlighted && opt.highlightColorEnable) setSingleSource(opt.highlightColor); - setLineWidth(_settings.unit); + setLineWidth(_settings.bondLineWidth); moveTo(ri.p0); lineTo(ri.p1); checkPathNonEmpty();