Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extremes of drawn ellipses not being calculated correctly. #5947

Closed
DavidACosgrove opened this issue Jan 7, 2023 · 0 comments · Fixed by #5948
Closed

Extremes of drawn ellipses not being calculated correctly. #5947

DavidACosgrove opened this issue Jan 7, 2023 · 0 comments · Fixed by #5948
Labels
Milestone

Comments

@DavidACosgrove
Copy link
Collaborator

DavidACosgrove commented Jan 7, 2023

Describe the bug
The ellipse extremes aren't being calculated correctly, such that they may be cutoff by the sides of the drawing.

To Reproduce

  std::string nameBase = "test_github5944";
  auto m = "c1ccccn1"_smiles;
  TEST_ASSERT(m);
  RDDepict::compute2DCoords(*m);
  std::vector<int> highlight_atoms{0, 1, 2, 3, 4, 5};
  MolDraw2DSVG drawer(400, 400);
  drawer.drawOptions().highlightRadius = 1.0;
  drawer.drawMolecule(*m, &highlight_atoms);
  drawer.finishDrawing();
  std::string text = drawer.getDrawingText();
  std::ofstream outs(nameBase + ".svg");
  outs << text;
  outs.flush();
  outs.close();```
**Expected behavior**
A clear and concise description of what you expected to happen.

Screenshots
image

Configuration (please complete the following information):

  • RDKit version: master, built from scratch
  • OS: macOS 12.6.2

Additional context
Fix incoming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants