Jump to content

image rotation


Speak

Recommended Posts

I think nobody will answer how can I rotate a picture in 3dimages?q=tbn:ANd9GcTLiF6jFBy54WOgVsWOFb3gcTSu_0R_shcuFn2zZT5fkyz_FNq2KA

image rotation

local sx,sy = guiGetScreenSize(); 
function lala()  
                dxDrawImage(sx-240,62+(28),sx-sx+230, 56,"img/timeleft.png") 
end 
addEventHandler("onClientRender",getRootElement(),lala) 

you must use dxDrawImage3d ?

Link to comment

You want to draw it on the screen? if yes then you should use the rotation arguments dxDrawImage.

Basically:

Rotation will make the image rotate clockwise.

RX: Will set the X point in the screen where the "Moving will be made from"

RY: Will set the Y point in the screen where the "Moving will be made from"

So, just remember that if you set an image to the left of the RX point, then the rotation will go up.

Also remember this will only work on a clock-way, not 3D.

About going like that effect, well, you should make the image itself like that with some trasparencies. (Just loading that image you got will do).

Else, id say about a shader, nothing else.

Link to comment

Can you give me an example in my code?

RX: Will set the X point in the screen where the "Moving will be made from"

RY: Will set the Y point in the screen where the "Moving will be made from"

does not work for me any example?

Link to comment
RX: Will set the X point in the screen where the "Moving will be made from"

RY: Will set the Y point in the screen where the "Moving will be made from"

does not work for me any example?

Got a harsh one, you'd need some advanced (or at least good) knowledge of what im doing. (its on dxDrawText, but its the same concept.)

This will draw 4 texts (according to the table) sided to the left (they will be drawn 270° clockwise) on positions 0.21,0.41,0.61 and 0.81 of X relative values.

  
--Table Part 
        TextNow = { 
            Text1 = {"Achivements", 0.21, 0.8, 0.1,0.1,270, x * 0.05 + (x*0.2), y*0.85,255}, 
            Text2 = {"Rankings", 0.41   , 0.8, 0.1,0.1,270, x * 0.05 + (x*0.4), y*0.85,255}, 
            Text3 = {"Tuning",0.61      , 0.8, 0.1,0.1,270, x * 0.05 + (x*0.6), y*0.85,255}, 
            Text4 = {"Settings", 0.81   , 0.8, 0.1,0.1,270, x * 0.05 + (x*0.8), y*0.85,255}, 
        } 
  
--Drawing 
i=1 
        local a = "Text"..i 
        dxDrawText(Dashboard.Positions.TextNow[a][1] , Dashboard.Positions.TextNow[a][2] * x, Dashboard.Positions.TextNow[a][3] * y, Dashboard.Positions.TextNow[a][4] * x, Dashboard.Positions.TextNow[a][5] * y, tocolor(255,255,255,alpha),3,"clear","left", "top", true, false,true, false, true, Dashboard.Positions.TextNow[a][6], Dashboard.Positions.TextNow[a][7], Dashboard.Positions.TextNow[a][8])   
        i=2 
        local a = "Text"..i 
        dxDrawText(Dashboard.Positions.TextNow[a][1] , Dashboard.Positions.TextNow[a][2] * x, Dashboard.Positions.TextNow[a][3] * y, Dashboard.Positions.TextNow[a][4] * x, Dashboard.Positions.TextNow[a][5] * y, tocolor(255,255,255,alpha),3,"clear","left", "top", true, false,true, false, true, Dashboard.Positions.TextNow[a][6], Dashboard.Positions.TextNow[a][7], Dashboard.Positions.TextNow[a][8])   
        i=3 
        local a = "Text"..i 
        dxDrawText(Dashboard.Positions.TextNow[a][1] , Dashboard.Positions.TextNow[a][2] * x, Dashboard.Positions.TextNow[a][3] * y, Dashboard.Positions.TextNow[a][4] * x, Dashboard.Positions.TextNow[a][5] * y, tocolor(255,255,255,alpha),3,"clear","left", "top", true, false,true,false, true, Dashboard.Positions.TextNow[a][6], Dashboard.Positions.TextNow[a][7], Dashboard.Positions.TextNow[a][8])   
        i=4 
        local a = "Text"..i 
        dxDrawText(Dashboard.Positions.TextNow[a][1] , Dashboard.Positions.TextNow[a][2] * x, Dashboard.Positions.TextNow[a][3] * y, Dashboard.Positions.TextNow[a][4] * x, Dashboard.Positions.TextNow[a][5] * y, tocolor(255,255,255,alpha),3,"clear","left", "top", true, false,true, false, true, Dashboard.Positions.TextNow[a][6], Dashboard.Positions.TextNow[a][7], Dashboard.Positions.TextNow[a][8])   
  
  

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