phase1geo / Annotator

Image annotation for Elementary OS
GNU General Public License v3.0
209 stars 22 forks source link

Support custom border color #56

Closed waldyrious closed 1 year ago

waldyrious commented 2 years ago

Currently I can only customize the color of a shape's fill. I can also customize the border width and dash pattern, but not its color. I would like to have the option to pick a border color (including adding transparency).

phase1geo commented 2 years ago

Shapes are either border-only (outline) or a borderless (fill). Though you can change the settings of the border when a filled shape is selected, you aren't affecting its border.

If you wanted a shape with a border and fill, you would essentially just create a fill object, move it to the needed position and then create a border version of that shape and position it over the filled shape.

waldyrious commented 2 years ago

Shapes are either border-only (outline) or a borderless (fill).

That's weird... my original goal was actually to use a borderless filled shape, but it seemed to have a border nonetheless. For example, note the dark border around the yellow shape:

image

That said, it is true that the border settings don't seem to be affecting the border of the shape. So maybe that button should be disabled when a filled shape is selected (thought that would be a separate issue).

phase1geo commented 2 years ago

Fill shapes do have a one pixel border that is automatically colored to guarantee contrast with the image and/or other shapes and items. It also helps to identify individual shapes if they are similarly colored and overlapping each other.

waldyrious commented 2 years ago

Right, so what I would like is the ability to have filled shapes with no border. Even if the one-pixel border is made visible during editing, I would like the exported image to not have it. Is that something you'd consider?

phase1geo commented 2 years ago

Why do you want that feature?

waldyrious commented 2 years ago

That's the effect I wanted to add to an image: a colored shape without border. Yes, I could achieve a similar effect with the border, but it is a styling preference I wanted for that particular image, just like the color of the fill, the shape used, etc.

veesar commented 2 years ago

Why do you want that feature?

One reason for me is that sometimes I need to draw multiple overlapping shapes to mask some info in a screenshot. Drawing the shape without the border will make it look less "patchy". Screenshot below.

sample-AnnotatorBoxBorder

Another reason is if the shape is in the same color as the image, we can hide rather than mask some text in a screenshot. For example, in the screenshot below, I want to hide some content - with the border it is evident that some content has been hidden. Without the border, we can make it look like it was never there. image

Along with the current Border Width, could we maybe have an option for "No Border"? image

phase1geo commented 2 years ago

Makes sense. Thanks for the clarification!

phase1geo commented 2 years ago

I have added a feature to show/hide an items "outline" from this border menu. Technically, the outline of an item is not the same as a border (because both solid and border shapes both have an outline). Feel free to grab the master branch and give this feature a try.