Commit Graph

284 Commits

Author SHA1 Message Date
Jeremy Attali
e8a96364dc chore(clang): add more linting tasks 2020-06-13 19:45:57 -04:00
Jeremy Attali
58aef1ef37 chore(algebra): make valgrind happy 2020-06-13 14:42:50 -04:00
Jeremy Attali
b4a202ef48 refactor(blur): use cleanup label 2020-06-13 14:42:50 -04:00
Jeremy Attali
361be6aa80 feat(blur): remove blur configuration 2020-06-13 14:42:50 -04:00
Jeremy Attali
b9d685b7b2 refactor(blur): reuse gaussian size 2020-06-13 14:42:50 -04:00
Jeremy Attali
f9737d78c9 feat(blur): add multiple passes logic 2020-06-13 14:42:50 -04:00
Jeremy Attali
1699474c39 fix(blur): blur based on device scaling factor 2020-06-13 14:42:50 -04:00
Jeremy Attali
46fb08dce1 fix(blur): use rendered surface after commit
- Fix blur logic
- Reused rendered surface to optimize future render on comitted blur
- Include gaussian kernel function

Closes #20
Closes #22
2020-06-13 14:42:50 -04:00
Jeremy Attali
416b0adad9 chore(wayland): remove unused variable 2020-06-13 14:42:50 -04:00
Jeremy Attali
6b2ec90efd fix(blur): adjust blur bounding box based on scaled monitor 2020-06-02 00:08:21 -04:00
Jeremy Attali
1be7798a8b feat(blur): use rect blur instead of brush
Use a rectangle to blur instead of brushes.

Does not improve the performance that much, will come in a later patch.

Will fix the UX of the feature though.

Closes #17
2020-06-01 23:32:07 -04:00
Jeremy Attali
befb61e291 chore(paint): remove false information 2020-06-01 23:32:07 -04:00
Jeremy Attali
fae0aeacab feat(tool): introduce blurring capability
The blur algorithm is largely inspired from Kristian Høgsberg & Chris
Wilson in [this file](https://www.cairographics.org/cookbook/blur.c/)

Closes #17
2020-05-31 23:25:37 -04:00
Jeremy Attali
2eb4ebbc28 chore(vscode): add large file test 2020-05-31 23:25:37 -04:00
Jeremy Attali
099634b9da chore(vscode): update include path for project 2020-05-24 16:14:38 -04:00
Jeremy Attali
ec6e6abae7 fix(render): fix arrow glitch with 0 ftx
The use of `acos(θ)` works better than `atan(θ)`. Just need to be
careful with the `sign` of `fty`.
2020-05-24 16:14:38 -04:00
Jeremy Attali
2adcf944f4 fix(pixbuf): properly grab pixbuf size from cairo surface
This fixes the scaling issue when user would copy or save the file.

Commit `445980b` only solved the rendering part not the pixbuf part.

Closes #6
2020-05-23 15:56:29 -04:00
Jeremy Attali
445980bbf4 fix(ui/render): adjust rendering based on window size
Compute the size of the GTK window based on sane compute that works well
for single monitor. Still not sure how this behaves on multi monitors.

This also fixes the issue where swappy would crop the image on scaled
output displays.

Closes #6
2020-05-18 00:18:03 -04:00
Jeremy Attali
a78422b22d style(application): remove useless log 2020-05-18 00:18:03 -04:00
Jeremy Attali
992d97e94d fix(dependencies): include glib2
Closes #11
2020-05-17 12:58:43 -04:00
Jeremy Attali
d787586b9e fix(buffer): properly include required functions
Closes #10
2020-05-17 12:58:43 -04:00
Jeremy Attali
097b35bb27
docs(README): update readme for install dependencies
Closes #11
2020-02-26 17:21:01 -05:00
Jeremy Attali
b5cc433d75 fix(application): properly save output file upon clean exit
The bug was introduced by `f3e5d86`.

Closes #8
2020-02-20 23:33:51 -05:00
pathetic-lynx
320dae02d0 fix(application): fix file loop and use of GTK object after lifecycle
Swappy tried to access Gtk data after the end of the mainloop and the
file save routine had infinite recursion
2020-02-18 15:55:22 -05:00
pathetic-lynx
f4e9a19407 fix(init): fix segfault for unknown flags
Swappy segfaults if it is invoked with unknown command-line flags
2020-01-23 10:03:01 -05:00
Jeremy Attali
196f7f4dea feat(application): print final surface to file or stdout
This allows a user to output the final surface to `stdout` using:

- `-0`
- `--output-file``

Also adding another keybinding to exit the application `Ctrl+w` which is
pretty standard.

Closes #2
2020-01-19 23:48:55 -05:00
Jeremy Attali
f967eb458a chore(ci): apt-get update before script 2020-01-19 23:48:55 -05:00
Jeremy Attali
38b96e35f8 refactor(pixvuf): move pixbuf to separate file 2020-01-19 23:48:55 -05:00
Jeremy Attali
ce42a0e5b6 docs(application): no dot in desc 2020-01-19 23:48:55 -05:00
Jeremy Attali
ef24851dee feat(config): have overridable defaults
Defaults:

 - `save_dir`
 - `line_size`
 - `text_font`
 - `text_size`

Closes #1
2020-01-12 22:00:41 -05:00
Jeremy Attali
7f2f6da754 fix(application): suffix saved file with png 2020-01-05 23:15:48 -05:00
Jeremy Attali
f9d70fc0e2 fix(application): memory leak for pixbuf 2020-01-05 23:13:37 -05:00
Jeremy Attali
665295b497 fix(clipboard): memory leak for pixbuf 2020-01-05 23:10:50 -05:00
Jeremy Attali
f963a76c5c fix(clipboard): handle bad write to pipe fd 2020-01-05 22:44:10 -05:00
Jeremy Attali
6a598cb4c8 docs(readme): update documentation 2020-01-05 22:40:33 -05:00
Jeremy Attali
51b27d768e feat(clipboard): use wl-copy if present 2020-01-05 22:34:16 -05:00
Jeremy Attali
f48f36e7fe revert:"wip(copy): handle data control protocol"
This reverts commit c0db845620.
2020-01-05 16:30:37 -05:00
Jeremy Attali
c03f628de7 feat(text): add controls in toggle panel 2020-01-05 16:17:19 -05:00
Jeremy Attali
f9e231fba5 style(ui): rename size label 2020-01-05 15:53:16 -05:00
Jeremy Attali
c0db845620 wip(copy): handle data control protocol 2020-01-05 15:37:19 -05:00
Jeremy Attali
65cefc1da7 fix(wayland): initalize done copies to 0 2020-01-04 19:07:10 -05:00
Jeremy Attali
0c5e458d4c fix(window): quit when delete event is received 2020-01-04 19:06:35 -05:00
Jeremy Attali
b287fefd6d chore(vscode): update launcher 2020-01-04 18:46:10 -05:00
Jeremy Attali
7d5997a236 chore(paint): remove debug logs 2020-01-04 18:02:04 -05:00
Jeremy Attali
903ad114f5 fix(ui): prevent focus in panel buttons 2020-01-04 18:01:55 -05:00
Jeremy Attali
f356ff9b17 refactor(text): use size_t instead of int for cursor 2020-01-04 17:48:02 -05:00
Jeremy Attali
bc3264e9f1 fix(string): fix algo to insert chars at location 2020-01-04 17:22:05 -05:00
Jeremy Attali
3d7eee792e style(render): reduce opacity for text outline 2020-01-04 16:46:28 -05:00
Jeremy Attali
0fd82974cf refactor(render): use pango conversion function 2020-01-04 16:11:52 -05:00
Jeremy Attali
c81d8982ff docs(man): update man page 2020-01-04 15:33:37 -05:00