GithubHelp home page GithubHelp logo

Comments (6)

axelpale avatar axelpale commented on June 14, 2024

Proposition:

  • setSize(IScalar width, IScalar height)
  • setSize(number width, number height)
  • IScalar getWidth()
  • IScalar getHeight()

from tapspace.

axelpale avatar axelpale commented on June 14, 2024

Another proposition:

  • setSize(IRectangle rect)
  • setSize(Rectangle rect)
  • setSize(number width, number height)
  • IRectangle getSize()

from tapspace.

axelpale avatar axelpale commented on June 14, 2024

For reference, current size API:

  • Vector getLocalSize()
  • IVector getSize()
  • setLocalSize(Vector diag)
  • setSize(IVector diag)

Also, consider symmetry with transform API of AbstractPlane:

  • Transform getGlobalTransform()
  • ITransform getGlobalITransform()
  • Transform getLocalTransform()
  • ITransform getLocalITransform()
  • setGlobalTransform(Transform tr)
  • setGlobalITransform(ITransform itr)
  • setLocalTransform(Transform tr)
  • setLocalITransform(ITransform itr)

from tapspace.

axelpale avatar axelpale commented on June 14, 2024

Maybe:

  • Size getGlobalSize()
  • ISize getGlobalISize()
  • Size getLocalSize()
  • ISize getLocalISize()
  • setGlobalSize(Size sz)
  • setGlobalISize(ISize isz)
  • setLocalSize(Size sz)
  • setLocalISize(ISize isz)

Seems bloated but it is most unambiguous and symmetrical among the alternatives.

from tapspace.

axelpale avatar axelpale commented on June 14, 2024

The Size and Transform are different: where global and local ITransform represent different transforms in plane-invariant manner, global and local Size represent the same size on different planes. Therefore semantically better set of methods is:

  • Size getSize
  • ISize getISize
  • setSize(Size sz) and setSize(width, height)
  • setISize(ISize sz)

from tapspace.

axelpale avatar axelpale commented on June 14, 2024

This suggestion became the final in taaspace v5.0.0

from tapspace.

Related Issues (20)

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.