PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Drawing thick lines; arcs

Johan,
Thanks for providing GAPITools/Draw.
I saw in the GapiDraw FAQ that support for different line thicknesses was planned - will this be in the next release, and will GapiTools have similar support soon?

Also, any plans for arcs/circles? I know it isn't the goal of GAPItools/draw to offer a full 2D graphics API - just wondering.

Most line thickness routines I've seen depend on knowing the locations of individual pixels of a line that is being drawn, and replicating/tracing it. This is even more important for drawing thicker arcs. Without the source code, the best I could come up with was a "poor man's" line thickness routine that repeatedly calls Gapi Draw_line with endpoints that march across at 90 degrees to original line slope), but it isn't good for thicker lines (>6 pixels) and has a funny pattern for 45 degree lines. It doesn't use trig, but its still inefficient (uses a sqrt). The thickness also isn't very consistent across different slopes.

I suppose I could fall back on using the MFC DC and drawing classes...
Hi,

Arcs and circles will _probably_ be added in GapiDraw 1.1. I say probably since I have to travel to Minesota on Friday, and will release GapiDraw 1.1 before that.

Line thickness will be added in 1.2 at earliest. I need to investigate some on getting real time line antialiasing first...

Best regards,
Johan