Jump to content

[dx]dxDrawLine question


Recommended Posts

Posted

hello everybody i have small question how can i create something like that with dxDrawLine

p_574b98t81.png

Skype 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001

every thing is gonna be alright

every thing is gonna be okay

it's gonna be a good good life

that's what my therapist say

Posted
2 minutes ago, Dimos7 said:

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


DxDrawBorderedRectangle 

its a useful function

thx

Skype 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001

every thing is gonna be alright

every thing is gonna be okay

it's gonna be a good good life

that's what my therapist say

Posted

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

IT Projet Manager

 

Posted (edited)
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

Skype 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001

every thing is gonna be alright

every thing is gonna be okay

it's gonna be a good good life

that's what my therapist say

Posted

up any help

Skype 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001

every thing is gonna be alright

every thing is gonna be okay

it's gonna be a good good life

that's what my therapist say

Posted
11 minutes ago, aka Blue said:

Use this. @Uknown.@Master_MTA

 

doesn't work am trying to create my own function to create roundedrectangle without shader and without dxDrawLines if it worked i will share it here thx for all

Skype 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001

every thing is gonna be alright

every thing is gonna be okay

it's gonna be a good good life

that's what my therapist say

Posted
Just now, aka Blue said:

But try it... it works man.

am acutely try it before and it doesn't work

 

Skype 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001

every thing is gonna be alright

every thing is gonna be okay

it's gonna be a good good life

that's what my therapist say

  • MTA Team
Posted
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.

Posted
5 minutes ago, LopSided_ said:

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

hmm am acutely will not use dxDrawLine i will use dxDrawRectangle only new idea :)

Skype 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001

every thing is gonna be alright

every thing is gonna be okay

it's gonna be a good good life

that's what my therapist say

Posted (edited)

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

Skype 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001

every thing is gonna be alright

every thing is gonna be okay

it's gonna be a good good life

that's what my therapist say

Posted

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.

  • Like 1

"Keep making it simplex."

Posted

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 .

  • Like 1

IT Projet Manager

 

Posted
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

Skype 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001

every thing is gonna be alright

every thing is gonna be okay

it's gonna be a good good life

that's what my therapist say

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...