Master_MTA Posted July 28, 2017 Share Posted July 28, 2017 hello everybody i have small question how can i create something like that with dxDrawLine Link to comment
Dimos7 Posted July 28, 2017 Share Posted July 28, 2017 you mean like health bar with line close rectangle ? if yes then DxDrawBorderedRectangle its a useful function 1 Link to comment
Master_MTA Posted July 28, 2017 Author Share Posted July 28, 2017 2 minutes ago, Dimos7 said: you mean like health bar with line close rectangle ? if yes then DxDrawBorderedRectangle its a useful function thx Link to comment
coNolel Posted July 28, 2017 Share Posted July 28, 2017 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
Master_MTA Posted July 28, 2017 Author Share Posted July 28, 2017 (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 July 28, 2017 by Master_MTA Link to comment
aka Blue Posted July 28, 2017 Share Posted July 28, 2017 (edited) Use this. @Uknown.@Master_MTA Edited July 28, 2017 by aka Blue Link to comment
Master_MTA Posted July 28, 2017 Author Share Posted July 28, 2017 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 Link to comment
aka Blue Posted July 28, 2017 Share Posted July 28, 2017 But try it... it works man. 1 Link to comment
Master_MTA Posted July 28, 2017 Author Share Posted July 28, 2017 Just now, aka Blue said: But try it... it works man. am acutely try it before and it doesn't work Link to comment
Administrators Lpsd Posted July 28, 2017 Administrators Share Posted July 28, 2017 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
Master_MTA Posted July 28, 2017 Author Share Posted July 28, 2017 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 v Link to comment
Master_MTA Posted July 28, 2017 Author Share Posted July 28, 2017 (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 July 28, 2017 by Master_MTA Link to comment
Simple0x47 Posted July 28, 2017 Share Posted July 28, 2017 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. 1 Link to comment
coNolel Posted July 28, 2017 Share Posted July 28, 2017 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 . 1 Link to comment
Master_MTA Posted July 28, 2017 Author Share Posted July 28, 2017 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now