Skip to content

Increase 'rx' and 'ry' size by 1 to avoid bad clipping when using --select #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

keysym
Copy link
Contributor

@keysym keysym commented Mar 27, 2021

fix #77

I set the i3wm border to 1px and now scrot is able to grab it (the thin blue line at bottom and right edges)

image

@daltomi
Copy link
Collaborator

daltomi commented Mar 27, 2021

Please see #80 , I think it is a better solution.

@keysym
Copy link
Contributor Author

keysym commented Mar 28, 2021

@daltomi Thanks for taking a look! <3

One thing we have to consider is that scrot_sel_and_grab_image() is always grabbing -1 pixel than the actual selection rectangle at the bottom and right, but #80 only increases the clipping size when the selection is on the edge of the screen.

Maybe there's a better solution than mine, but we need to assert if this -1 pixel selection is acceptable or not.

@daltomi
Copy link
Collaborator

daltomi commented Mar 28, 2021

Hi @Hinigatsu
I was testing and I could not see what you indicate.
Anyway when I have more time I will continue testing.
The #80 is maintained because it selects the last pixel on the screen.

(Sorry for the overflow of images)
User view:
01
Scrot capture:
02


User view:
03
Scrot capture:
04

@keysym
Copy link
Contributor Author

keysym commented Mar 28, 2021

With #80:

The pixels right under the left side of the selection rectangle are being grabbed:

(Note the rectangle line changing color where it overlaps with the border of the window. You may have to zoom to see better details)

User view:
image

Scrot capture:
image


But the pixels under the right side aren't being grabbed:

User view:
image

Scrot capture:
image

@daltomi
Copy link
Collaborator

daltomi commented Mar 28, 2021

I see. You are right.
Unfortunately I'm going on a trip in a few hours and I don't have time to collaborate.
See you in a few days. :)

Cheers.

@keysym
Copy link
Contributor Author

keysym commented Mar 28, 2021

Have a nice trip! :D

@daltomi
Copy link
Collaborator

daltomi commented Apr 2, 2021

Hi @Hinigatsu
There I sent a new PR #81 , it takes into account the line width property, we are going to work with that one and close this one.
At the moment it works when the line width is 1px, but not when it is greater.

Cheers.

@daltomi daltomi closed this Apr 2, 2021
@keysym keysym deleted the issue#77 branch April 2, 2021 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unable to select 1px at the right size of the screen
2 participants