sbox-issues icon indicating copy to clipboard operation
sbox-issues copied to clipboard

Graphics.DrawLine

Open gio3k opened this issue 3 years ago • 3 comments

For?

S&Box

What can't you do?

Easily draw a 2D line (preferably with the ability to make it cubic like GraphicsItem.CubicLineTo)

Drawing UI lines seems to be hell, especially while there's no SVG support. This would help for the time being

How would you like it to work?

Graphics.DrawLine, maybe also Graphics.DrawCubicLine

What have you tried?

using Render, didn't work and didn't have what I needed anyways

Additional context

No response

gio3k avatar Dec 02 '22 22:12 gio3k

There were previously a bunch of different Graphics.DrawX functions before Garry did the rework. It'd be nice if they were brought back to the current API.

matekdev avatar Dec 02 '22 23:12 matekdev

Agreed, it would be awesome if these were brought over into the base s&box API.. for now, I've moved them over myself into this: https://gist.github.com/xezno/c890c479e32fb314f0c0cd7739afd6ea; feel free to use it if you want

xezno avatar Dec 03 '22 04:12 xezno

you can use Graphics.Draw to make lines but yeah it's not great atm, especially since there's no obvious way to adjust thickness etc

anthonysharpy avatar Dec 03 '22 18:12 anthonysharpy