How to make round corners of docked fab in jetpack compose? - floating-action-button

I want to make a rounded mid corners with docked fab , How can I achieve this ?

Related

three.js create square with ellipse cut out from opposing corners

I want to create a path that I can extrude that would be the equivalent of the difference of a square and a circle with radius equal to the side of the square with its center at the upper right corner of the square.

Algorithm for resize multi selected elements on the canvas

I have shapes with integer coordinates of width and height. They can be selected and stretched separately, I want to add the function of stretching a group of selected shapes. For example, as in the Figma editor or in VS Studio on a visual canvas, when we select a set of shapes and stretch them and they stretch proportionally with integer coordinates of width and height. Can you tell me how it works? For example, I have a list of 5 shapes with a width and height of 10px, indents from each other in 1px, I have selected them and pull them along the X axis in the positive direction by 8 pixels, which algorithm do I need to use? Here is an example of how it looks in VS when stretching buttons on the canvas.
https://i.stack.imgur.com/mYOAf.gif

How to check if text overflows a rectangle in Tkinter?

I drawn a rectangle in Tkinter. Then I wrote text inside the rectangle. But when I unzoom in my canvas, the text is getting bigger and it overflows the rectangle. So I want to check if the text overflows the rectangle in order to resize this text or totally remove it. How can I check this ?
You can use the bbox command to get the coordinates of a rectangle that completely encloses the text. Then, you can compare that to the coordinates of the actual rectangle you've drawn around the text.

Tinting Drawn Textures with the Color property in XNA / Monogame, how to balance?

I have these four icons that look like this:
But I want to be able to just have 1 gray icon and then tint them different colors by setting the color in XNA / Monogames Draw function.
I took one of the images and pulled all the colour out and made it a bit lighter it to get
I also tried a version where the center of the gray image is fully white but neither look right in the game, here's an image with the icons on top and my tinted gray on the bottom (the tint color is sampled from the center of the original icons):
I figure there should be a way, given the original icons, to figure out how to make the gray icon and also the colors to plug into the draw function so that I get an exact copy of the original. I assume this is possible? How do you do it?
EDIT:
To elaborate on my issue here is another image all with blue icons, the top images are all the original blue icon for comparison. The bottom images are all grey icons I used to tint to make the middle icons. The grey icons are, from left to right, 0 saturation, 0 saturation and 100 brightness, and auto level + 0 saturation. It seems to me that by setting the saturation to 0 I am losing the ability to make the icon look right as it's not just "darker" blue but also "bluer" blue.
EDIT 2: I don't think it's possible, thanks for the help Goose.
Would it work if the grey icon was full white at the center (it's brightest point) and got darker from there.
Then you could just sample the color at the center of your source image (the colored ones) and tint with that.
I think the issue you are seeing now is that the grey image will darken the color you are tinting with, so you actually want to tint with the source color PLUS the amount of grey at the brightest point in the image (if that makes sense).

Vertical or diagonal scrolling on UIScrollView

In my case the method scrollViewDidEndDecelerating can detect just horizontal scrolling in UIScrollView and i want to know how to detect diagonal or vertical scrolling.
To detect the direction of the scroll in, say, scrollViewDidScroll:, look at how scrollView.contentOffset.x (horizontal) and scrollView.contentOffset.y (vertical) have changed from their prior values. If they've both changed, then it's a diagonal scroll.

Resources