The new NodeBox forum is live! Everything from support.nodebox.net moved here: sign in with the same email to pick up your old posts. Something not working? Write to forum-support@nodebox.net.

NodeBox 3From the old forum

measure

3 replies Last reply

  1. Hello,

    i need to measure the width of a textpath.
    i found a way to create a rectangle with the exact dimensions of the text (with Fit to node)
    bud i still can't figure out how to get the dimensions of that rectangle.

    end goal.
    i want to create a rectangle around the text that has a preset margin around the text.

    thx anyone for helping out

    Copy link
  2. Hello,

    You can send the rect node to a lookup node and call for bounds OR bounds.x, bounds.y, bounds.width and bounds.height.

    I've included an example on your end goal by using bounds. I think it might be easier to use a scale node instead but there is more than one solution for your problem.

    regards
    lieven

    Copy link
  3. Hey, lievenmenschaert

    I'm looking for the API reference where I could find all kinds of cool attributes like the one you used in this solution, can you point me to it?

    Thanks

    Copy link
  4. hi rafael,

    I will change the documentation page for the lookup node this week.
    In advance: lookup can be used to call for a few things:

    1. to call for a header key in a csv file
    2. to call for x,y in a point
    3. to call for bounds (bounds.x, bounds.y, bounds.width, bounds.height) of
      a path or geometry
    4. to call for fill, stroke or contours in a path or geometry.
    5. to call for hue, saturation, brightness in a color
    6. to call for red, green, blue in a color

    regards,

    lieven

    Copy link

Know something that helps?

Sign in with your email address to reply. No password needed.

Sign in to reply