openframeworks / openframeworks/openFrameworks
ofNode should have a draw(float size) option
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
at the moment, ofNode has a draw function that has awkwardly hard coded sizes:
virtual void customDraw() {
ofBox(10);
ofDrawAxis(20);
}
I'd like a draw(size) option. obviously I can extend ofNode and create my own functions, but if I just draw a node, I might want to adjust the size internally, as the "10" and "20" might not make any sense based on where I am drawing, for example here:
looks quite weird, but at 1/10th the size would look ok.
as most other OF objects have draw(size) options, I think ofNodeShould have this too.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at ofNode's draw and customDraw methods, where the hard-coded ofBox(10) and ofDrawAxis(20) calls are shown. Compare how other openFrameworks objects expose draw(size) options, then determine the smallest compatible way to make the node's displayed size adjustable. Done means callers can draw an ofNode at a requested size without relying on subclass-specific functions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100