GithubHelp home page GithubHelp logo

Coordinate space design about fig HOT 4 CLOSED

perazz avatar perazz commented on August 19, 2024 1
Coordinate space design

from fig.

Comments (4)

everythingfunctional avatar everythingfunctional commented on August 19, 2024 2

You may want to support 3 different sizes (one with multiple units):

  • fraction of drawing size
  • pixels
  • absolute size (i.e. inches, cm, etc.)

Note that the conversions between any of them depend on how the size and resolution of the drawing is specified

from fig.

AnonMiraj avatar AnonMiraj commented on August 19, 2024

I have a question.

Let's say I have a circle centered at (0.5, 0.5) with a radius of 0.25.
I would assume that the radius would also be between 0 and 1.

But how would it be translated to, for example, an 800*600 canvas?
I don't think it really makes sense for the circle to become an ellipse.
Should it translate like this: Radius: 0.25 * (800+600)/2 = 175 pixels, or is there a better way?

from fig.

everythingfunctional avatar everythingfunctional commented on August 19, 2024

You may want to have distinction between size and position.

from fig.

AnonMiraj avatar AnonMiraj commented on August 19, 2024

So I should leave all size units as pixels?

from fig.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.