Skip to content

Commit

Permalink
add saving of rendered labels
Browse files Browse the repository at this point in the history
  • Loading branch information
alexriss committed Oct 6, 2021
1 parent a002e9c commit b690310
Show file tree
Hide file tree
Showing 22 changed files with 564 additions and 44,815 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
/test/test.png
/todo.txt
/frontend/node_modules
/testing/
/testing/
.ipynb_checkpoints/
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ChemfilesViewer"
uuid = "e6216453-ab07-4bd6-b3b4-b7ee81a805aa"
authors = ["Alex Riss <[email protected]>"]
version = "0.4.0"
version = "0.5.0"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,22 @@ set_options!(Dict("styles" => Dict(
"bond" => Dict("color" => "#ffffff", "radius" => 0.3)
)))

# clar labels (atom-labels are kept, though)
clear_labels!()

# add label
add_label!(Dict(
"label" => "some other text",
"location" => [2,5,5],
"style" => "font-weight:bold;color:blue;font-size:3em;"
))

# save image
save_image("test.png")
# save labels (this is somewhat experimental)
save_image_labels("test_labels.png")
# save the overlay of the render and the labels
save_overlay("test.png", "test_labels.png", "test_both.png")
```

Use mouse to rotate, zoom and pan. Keyboard shortcuts `x`, `y`, `z` set the view along the x, y and z axis.
Expand Down
14 changes: 14 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,22 @@ set_options!(Dict("styles" => Dict(
"bond" => Dict("color" => "#ffffff", "radius" => 0.3)
)))

# clar labels (atom-labels are kept, though)
clear_labels!()

# add label
add_label!(Dict(
"label" => "some other text",
"location" => [2,5,5],
"style" => "font-weight:bold;color:blue;font-size:3em;"
))

# save image
save_image("test.png")
# save labels (this is somewhat experimental)
save_image_labels("test_labels.png")
# save the overlay of the render and the labels
save_overlay("test.png", "test_labels.png", "test_both.png")
```

Use mouse to rotate, zoom and pan. Keyboard shortcuts `x`, `y`, `z` set the view along the x, y and z axis.
Expand Down
Loading

0 comments on commit b690310

Please sign in to comment.