orangy
orangy
orangy
romainguy
03/21/2021, 8:01 PMorangy
orangy
orangy
orangy
jim
03/22/2021, 7:24 AMSergey Y.
03/25/2021, 5:49 PMSergey Y.
03/25/2021, 6:00 PMNader Jawad
03/25/2021, 6:11 PMNader Jawad
03/25/2021, 6:14 PMSergey Y.
03/25/2021, 6:21 PMNader Jawad
03/25/2021, 6:25 PMSergey Y.
03/25/2021, 6:26 PMorangy
Modifier.clip(RoundedCornerShape(8.dp)).border(BorderStroke(2.dp, Color(0xFF623D15)), RoundedCornerShape(8.dp))
Am I doing something wrong here?orangy
<svg width="400" height="180">
<rect x="50" y="20" rx="20" ry="20" width="150" height="150"
style="fill:red;stroke:black;stroke-width:5;opacity:0.5" />
</svg>
I get this, without any issue for the corners.orangy
Modifier.border
function. First it adjusts stroke width like val strokeWidth = 1.2f * borderSize
with some long explanation text above which is not entirely clear (to me), and then it draws another rounded rect of hairline width (1px always) on top of it. So I made a copy of this function, removed both hacks, and I see that border has now proper width. But then, there is background visible through antialiased pixels of the border at the corners. I believe, that hackery was introduced to fix this, but I think it’s not really proper way, because of the resulting effect.orangy
romainguy
03/27/2021, 8:35 PMromainguy
03/27/2021, 8:35 PMromainguy
03/27/2021, 8:39 PMromainguy
03/27/2021, 8:42 PMorangy
romainguy
03/27/2021, 9:39 PMromainguy
03/27/2021, 9:39 PMromainguy
03/27/2021, 9:40 PMromainguy
03/27/2021, 9:41 PMorangy
romainguy
03/27/2021, 9:42 PMromainguy
03/27/2021, 9:43 PMromainguy
03/27/2021, 9:43 PMorangy
orangy
orangy
orangy
orangy
.shape(borderStroke, fillBrush)
instead of separate background and border and clip modifiers… I can do that for myself, of course 🙂orangy
Nader Jawad
03/27/2021, 11:22 PMNader Jawad
03/27/2021, 11:23 PMNader Jawad
03/27/2021, 11:25 PMNader Jawad
03/27/2021, 11:30 PMorangy
Mine
version is better than Compose
above), but I’d really appreciate if compose would do the right thing out of the box. I will also think about adjusting radius for half of stroke size, to adapt for outer/inner, but not sure how to do this properly for radius less then half of stroke width – should it become rectangular at this point? Anyway, my solution works for me.Nader Jawad
03/27/2021, 11:38 PMorangy
romainguy
03/28/2021, 12:08 AMromainguy
03/28/2021, 12:10 AMromainguy
03/28/2021, 12:10 AMorangy
romainguy
03/28/2021, 12:16 AMromainguy
03/28/2021, 12:17 AMNader Jawad
03/28/2021, 1:43 AMorangy
mzgreen
04/15/2021, 8:04 AMNader Jawad
06/07/2021, 6:32 PM