Jump to content

[dx]dxDrawLine question


Recommended Posts

before few months. when i asked Xiti about it .. i know what you want by the way 

"You can use loop and dxDrawLine to calculate each "floor" of pixels but its totaly ineffective and badly for performance, you can also type a shader to draw something like this, im doing it via dxDrawImageSection with circle image". good luck

Link to comment
11 minutes ago, coNolel said:

before few months. when i asked Xiti about it .. i know what you want by the way 

"You can use loop and dxDrawLine to calculate each "floor" of pixels but its totaly ineffective and badly for performance, you can also type a shader to draw something like this, im doing it via dxDrawImageSection with circle image". good luck

thx but i wanna use dxdrawLine +_+

i am try to create my own dxlib so i am gonna use the mta  official functions without any thing else like photo

 

1 hour ago, Dimos7 said:

you mean like health bar with line close rectangle ? if yes then 


DxDrawBorderedRectangle 

its a useful function

it's not like i want i wanna create radius in the corner like my photo 

Edited by Master_MTA
Link to comment
  • Administrators
1 hour ago, Master_MTA said:

thx but i wanna use dxdrawLine +_+

That's exactly what he just told you to do. Using a loop with dxDrawLine you can create the effect of rounded corners.

Link to comment

i am didn't finished it yet but i am created dxdrawParallelogram


function dxdrawParallelogram(x,y,x1,y1,color,postgui)
					dxDrawRectangle(x, y, x1,y1,color, postgui)
					local m=0
					for i=y,y+y1 do
					m=m+1
					
					if i~=y+y1 and i~=y and i~=(y+y1)/2 then
					dxDrawRectangle((x-m)-1, i, x1,1,color, postgui)
				end
	end
end

izi way

Edited by Master_MTA
Link to comment
3 hours ago, Uknown. said:

The method using dxDrawRectangle is not a good option to use, because the amount of dxDraws generate lag. You must use Shaders or dxDrawImageSection from a circle image. The dxDrawRoundedRectangle, it's working because I've used it in my own stuff.

 

3 hours ago, coNolel said:

since you only want with mta official functions. then use dxdraw image section for each corner . fill left-up r-up l-down r-down.

also dont forget to add raduis argument to be more flexible .

thx all

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...