• Asking for a draw function to draw a rhombus like shap
    15 replies, posted
Desired shape : [IMG]http://www.mathatube.com/images/para_5.gif[/IMG] [IMG]http://www.icteachers.co.uk/children/sats/images/rhombus.gif[/IMG] Thanks in advance I guess you could use two triangles to get this result, but I try to use polys as little as possible and I've never been any good at them :P
Just use surface.DrawPoly( table ) A rhombus is pretty easy to make
What about drawing a rhombus with in a derma paint, would the cords be changed when the derma is moved. Or as its within the derma would it maintain the cords [editline]6th August 2016[/editline] [QUOTE=Klaes4Zaugen;50839555]Just use surface.DrawPoly( table ) A rhombus is pretty easy to make[/QUOTE]
Well, the x,y is set to the Derma paints x,y meaning 0,0 = top left of your Derma panel aka y e s
Would anyone care to show me an example? cheers
[code] -- I'm on some dumb shit. surface.drawRhombus = function(x, y, w, h, sx, sy) local m = Matrix() m:Translate(Vector(x, y, 0)) m:SetField(1, 2, sx/h ) m:SetField(2, 1, sy/w ) cam.PushModelMatrix(m) surface.DrawRect( 0, 0, w, h ) cam.PopModelMatrix() end [/code]
[url]http://i.imgur.com/Ntbpjyc.gifv[/url] How would I re-position the bottom so it sits at a flat 180 degrees, and flip it to be poiting/facing the right rather than the left
whenever i move the menu the y axis is messed up, anyone know how to fix this? im drawing the rhombus with the derma paint func [editline]7th August 2016[/editline] [url]http://i.imgur.com/C1RlEKA.gifv[/url]
still need this
I assume because cam might be a few frames behind, idk.
My thought exactly, ish Tried drawing a rhombus within a derma paint using draw poly and it didnt draw. However when I drew it to screen it worked fine, perhaps its something pertaining to the cords, idk
Because you have to make the start 0,0 with the surface.DrawPoly in the table. If you wanna adjust the position its drawn in just use render.SetScissorRect( x, y, ScrW(), ScrH() )
Well you would have to find the coordinates of the top-left corner of the derma, than calculate the draw poly based on that.
Not sure if this'll be a popular solution but have you considered making a rhombus .png in like photoshop or something? It would probably look better too tbh
eh, i tried that and i'd rather draw it using draw functions rather than a texture, that being said , has anyone found a method for this? [editline]7th August 2016[/editline] still looking for this, If anyone can draw a parallelogram / rhombus within a derma paint I would be forever grateful as its quintessential to my menu
this is giving me a headache, i've used four methods but each of them look trash, I still havent figured out how to make a func so im still using broken ass textures
Sorry, you need to Log In to post a reply to this thread.