parasyte / parasyte/pixels

Feature request: Getting window position from pixel position

Open
#366 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
Rust
Stars
2.1k
Forks
147
Avg merge
12m
Merged PRs (30d)
1

Description

I'm sure this usecase is very esoteric, but I'm using egui with pixels and I wanted to put egui objects on the same screen location as objects I'm drawing on the pixel buffer, but to do that I need some way of going from pixel positions to window positions, and surprisingly there doesn't seem to be a way right now, even though there is a way to go from window position to pixel position via window_pos_to_pixel. Even without a crazy usecase like that, there are probably other scenarios where this would be something you want.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the existing window_pos_to_pixel entry point and trace how window and pixel coordinates are represented and converted. Determine where the inverse conversion belongs and how its coordinate conventions should align with the existing API. Done means callers can obtain window positions from pixel positions with behavior consistent with window_pos_to_pixel.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.