News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Thick Anti-Aliased Lines of arbitrary width

Started by HSE, September 07, 2024, 09:06:40 AM

Previous topic - Next topic

HSE

Hi all!

Just revisiting projects (Have somebody implemented thick line algorithm?) from some time ago, and searching a little, I found and interesting algorithm: a thick-xiaolin-wu line  :eusa_clap: 

Very interesting itself, and a useful idea to advance in those old projects  :biggrin:

The fast translation can be added to Pixelmap extension.

Uploaded the method and a binary test.

Regards, HSE.
Equations in Assembly: SmplMath

NoCforMe

Downloaded it, looks good. But why do I get this message box? (Works fine after I dismiss it.)


Assembly language programming should be fun. That's why I do it.

HSE

Quote from: NoCforMe on September 07, 2024, 09:35:55 AMBut why do I get this message box?

Apparently you don't have DebugCenter.

Updated a release version in first post.

Thanks, HSE
Equations in Assembly: SmplMath

NoCforMe

What is DebugCenter? Is it something so cool I must have it?
Assembly language programming should be fun. That's why I do it.

HSE

Quote from: NoCforMe on September 07, 2024, 11:28:09 AMWhat is DebugCenter? Is it something so cool I must have it?

Active forum people know very well DebugCenter from a live time.

It's not recommended to people who enjoy to suffer programming  :biggrin:
Equations in Assembly: SmplMath

NoCforMe

Assembly language programming should be fun. That's why I do it.

Biterider

Hi HSE
It works absolutely fine.
It comes in very handy. It is one of the features I have been looking for for some time.  :thumbsup:

Regards, Biterider

Biterider

Hi NoCforMe
DebugCenter is a harmless debugging tool written using ObjAsm, but can be used in any other programming environment.
It is open source so you can check it out.
You do not need the framework it was written with, nor any knowledge of it.

I added a separate link in the ObjAsm section some time ago for quick access if anyone wants to try it out.
https://masm32.com/board/index.php?topic=10610.0

Biterider




HSE

Quote from: NoCforMe on September 07, 2024, 12:39:51 PMI don't use ObjAsm.

To build an application that show results in DebugCenter are used a couple of includes and a library, like for any debug system.

But to see results from that applications only DebugCenter.exe is needed.

This is not the case. I just was checking some internal values.
Equations in Assembly: SmplMath

HSE

Equations in Assembly: SmplMath

NoCforMe

#10
Quote from: HSE on September 07, 2024, 11:39:22 PMTo build an application that show results in DebugCenter are used a couple of includes and a library, like for any debug system.

My own debugger, LogBuddy, uses a couple of includes and a DLL; no need to link in anything special. Except for a little stub in the debugee, all the code is in the DLL. Is that how DebugCenter works too?
Assembly language programming should be fun. That's why I do it.

Biterider

Hi HSE
I noticed that the line endpoints are always cut vertically.
Perhaps a more flexible approach would be to make both ends configurable: vertical, horizontal or perpendicular to the line direction, so that we can better adjust the line connections.

I had another thought about performance. Maybe we can save some cycles on really thick lines by treating the boundaries and the interior separately. What do you think?

Biterider

HSE

Hi Biterider!

Quote from: Biterider on September 08, 2024, 08:47:09 PMI noticed that the line endpoints are always cut vertically.

:biggrin:  :biggrin:  Not really. "steep" lines ends horizontally (magenta line in the test)

Quote from: Biterider on September 08, 2024, 08:47:09 PMPerhaps a more flexible approach...
Maybe we can save some cycles ...

Line ends are a problem. Connections can look with "bites" when ends change between vertical and horizontal  :biggrin:

In the program from 2018, a trick (or "balls"  :biggrin: ) was enough:
 


Now I have to solve "bites" without "balls". This Thick Xiaolin-Wu will not solve connections, then I'm thinking in a different approach, probably very slow.

HSE
Equations in Assembly: SmplMath

HSE

Hi all,

The proof of concept for connections is working.

That is, the connection between connections. Process is more complex than direct drawing because need an screen buffer to store maximum brightness in each point from line.



Obviously test is not for plain thick lines but for the pipeline.

Regards, HSE.

Equations in Assembly: SmplMath

Biterider

Quote from: HSE on September 26, 2024, 03:36:09 AMThe proof of concept for connections is working.
I'm eagerly awaiting the code  :biggrin:

Biterider