Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
160 views
in Technique[技术] by (71.8m points)

How to position an image using pixel coordinates in python?

I'm currently working on a personal project that involves kivy GUI app maker in python.

And I would like to work with images and a FloatLayout. The thing is I'm currently stuck because the next step of this project is to position an image to the FloatLayout by using coordinates.

Here's an example of what I'd like to happen :

Image positioning

The blue square is the FloatLayout, the orange square is the image, by having at least two points of reference in the FloatLayout and inside the image (using pixels as coordinates), the image should go to the '1' and '2' points inside the blue square. kivy's widget scatter should do the job of reorienting and scaling the image.

I've thinking about using matrix to somehow solve this problem. I'd appreciate if you recommend me another way to help me achieve this, or link me to a python library that works with this specific kind of problems.

question from:https://stackoverflow.com/questions/65907851/how-to-position-an-image-using-pixel-coordinates-in-python

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...