You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote algorithms for calculating layout, although I think the way to create layout is important after all.
I am using https://github.com/Xyncgas/BlazorCL which has a structure called LDS (Layout_Data_Structure) that has left, top, width, height, which is sufficient to draw a 2D rectangle, while it is familiar to people who are working with the browsers too.
I made this structure with explicit struct layout :
As you can see LDS backed by a Vector4 Memory and inside the structure it has point2d and dimension2d that's backed by Vector too which allows SIMD accelerations when doing calculations
I started doing some tricks, for example I can write codes like this :
Since there isn't a good enough solution that comes with the browser and dotnet to do exactly what I want to do for drawing layout, I found myself having the needs to implement my own layout algorithms, which making it available in csharp for me to draw any layout knowing it's gonna work.
Lastly I would like to share some interesting things I've been doing, notice how I'm using operators in the layout definitions, that lets me say I want to divide a layout to 20 rows and 3 columns and pick the first grid (rectangle) with the syntax such as LDS MyLayout => LDS.Screen % (3, 20);
And from there I can keep drawing layout in however ways I would like using things like LDS MyLayout2 => MyLayout ^ (2,-19); To draw another rectangle at the bottom right corner of the screen
And then I can draw another rectangle between them using LDS MyLayout3 => MyLayout.BR & MyLayout2.TL; To draw another rectangle between two points
During development layouts are generally created not to be directly displayed but to generate other layout that will be used for the elements, this can create a performance problem due to there being a lot function called to create a lot of layout that are depended by the others. This can be mitigated once the UI has been designed, with LDS.Export() and LDS.Import() the final layout can be abstracted to a compile time constant that can be imported later when the layout is being drawn which is going to work the same, while reducing the complexity of the computation to always O(1)
The text was updated successfully, but these errors were encountered:
My BlazorCL currently works only for the browser types projects in .NET, because it's a unified UI. (E.G. MAUI.Blazor, Blazor, it also provides components for my projects)
Also I worked for a company writing Xamarin and I hate writing Xaml, I have no experience how it can work with Xaml, but I believe it's possible through AbsoluteLayout.
If you are interested in using the library, feel free to do so and let me know if there is any dependency issues.
If you are interested in making something together, for example I can seperate the layout algorithms from this library and we can use it for all projects that needs to draw rectangles in 2D for our use, feel free to let me know too.
If you can leave a star in my project I will be very happy
Uh oh!
There was an error while loading. Please reload this page.
Hi, it's my first talking to you, よろしくお願いいたします。
I watched your video demonstrating what the project can do, I have videos showing what I've been doing too
https://user-images.githubusercontent.com/35312807/149654567-86c5c7d3-c958-4e16-a43b-01f6878e0add.mp4
https://ewr1.vultrobjects.com/recording/2022-07-21%2007-54-14.mp4
I wrote algorithms for calculating layout, although I think the way to create layout is important after all.

I am using https://github.com/Xyncgas/BlazorCL which has a structure called LDS (Layout_Data_Structure) that has left, top, width, height, which is sufficient to draw a 2D rectangle, while it is familiar to people who are working with the browsers too.
I made this structure with explicit struct layout :
As you can see LDS backed by a Vector4 Memory and inside the structure it has point2d and dimension2d that's backed by Vector too which allows SIMD accelerations when doing calculations
I started doing some tricks, for example I can write codes like this :

Since there isn't a good enough solution that comes with the browser and dotnet to do exactly what I want to do for drawing layout, I found myself having the needs to implement my own layout algorithms, which making it available in csharp for me to draw any layout knowing it's gonna work.
Lastly I would like to share some interesting things I've been doing, notice how I'm using operators in the layout definitions, that lets me say I want to divide a layout to 20 rows and 3 columns and pick the first grid (rectangle) with the syntax such as
LDS MyLayout => LDS.Screen % (3, 20);
And from there I can keep drawing layout in however ways I would like using things like
LDS MyLayout2 => MyLayout ^ (2,-19);
To draw another rectangle at the bottom right corner of the screenAnd then I can draw another rectangle between them using
LDS MyLayout3 => MyLayout.BR & MyLayout2.TL;
To draw another rectangle between two pointsDuring development layouts are generally created not to be directly displayed but to generate other layout that will be used for the elements, this can create a performance problem due to there being a lot function called to create a lot of layout that are depended by the others. This can be mitigated once the UI has been designed, with
LDS.Export()
andLDS.Import()
the final layout can be abstracted to a compile time constant that can be imported later when the layout is being drawn which is going to work the same, while reducing the complexity of the computation to always O(1)The text was updated successfully, but these errors were encountered: