openframeworks / openframeworks/openFrameworks

ofNode should have a draw(float size) option

Open
#766 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core feature
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:

http://imgur.com/idWPp

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.