Code Monkey home page Code Monkey logo

Comments (4)

jmb496 avatar jmb496 commented on June 16, 2024

Ok... So I'm running into some issues related to this rotation on the center of the element. I'd like move a rectangular object from the top left corner of my card (0,0) to the top right (562,0), rotated 90 degrees...

So to do that I need to calculate the center coordinates of the element, convert that to the new center position, then calculate the new x,y based on the new center? Am I reasoning this correctly? Is there a better way?

from cardmaker.

nhmkdev avatar nhmkdev commented on June 16, 2024

Will the rectangle size change or are you concerned it might? To determine the x,y of the element you would need to rotate the point 562,0 around the center of your image in the desired rotated position (-90 degrees so you get the element position). That does not sounds like fun... I am guessing that manually adjusting the element to appear where you expect is a bit less precise than you would like...

from cardmaker.

jmb496 avatar jmb496 commented on June 16, 2024

The rectangle size will be unchanged in most cases I think. I'm planning to print these on real cards, so I'd like it to be precise. I'll just use this as an excuse to shake off my programming rust and write a python script to convert the xml. This is good for me. :)

Also, thanks for all your work on CardMaker. It's allowed me to make some very cool projects.

from cardmaker.

nhmkdev avatar nhmkdev commented on June 16, 2024

Closing out old bugs/issues.

from cardmaker.

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.