English
Source / code snippets

Drawhpicrotated Drawhpicrotatedrop Drawhpicrotatedtransparent Drawhpictransparent turn Hpic Plgblt

 
functions circa hPics simply so turned and turned transparent spend to:
CompileMarkSeparation
 {$cleq}
 {$runtime C:\xprofan11\}
 {$compiler C:\xprofan11\}
 {$notmp}
cls
long hPic=create("hNewPic",196,64,$FF)
long hPic2=create("hNewPic",196,64,$FF)
startpaint hPic
usefont "Arial",30,0,1,0,0
textcolor $FFFFFF,-1
drawtext 5,0,"XProfan.Com"
textcolor $AA,-1
drawtext 5,0,"XProfan"
endpaint
startpaint hPic2
usefont "Arial",30,0,1,0,0
textcolor 0,-1
drawtext 5,0,"XProfan.Com"
textcolor $AA,-1
drawtext 5,0,"XProfan"
endpaint
long w,mx,my
mcls 640,480

while 1

    waitinput 10
    startpaint -1
    cls $FF0000
    usepen 0,0,0
    mx=nMouseX()
    my=nMouseY()
    line 320,200,mx,my
    w=angleByLine(320,200,mx,my)
    drawhPicRotated(hpic,hdc,320,200,196,64,w,100+sin(getTickCount/500)*50)
    drawhPicRotated(hpic,hdc,200,100,196,64,w,100+sin(getTickCount/500)*50)
    drawhPicRotatedTransparent(hpic2,hdc,100,100,196,64,w,100+sin(getTickCount/500)*50,0)'
    endpaint
    mcopybmp 0,0 - 640,480 > 0,0;0

wend

end

nProc nMouseX(){ return mouseX }

nProc nMouseY(){ return mouseY }

nProc drawhPicRotated(long hPic,dc,x,y,xx,yy,w,r){

    long hDCBits=createCompatibleDC(hDC)
    selectObject(hDCBits, hPic)
    long pts=dim(24)
    long 	w1=angleByLine(xx,yy,0,0),\
    w2=abs(w1-360000),\
    w3=abs(w1-540000)
    casenot r : r=long(sqrt(float(xx*xx+yy*yy)))\2
    long pts&,0=	x+getcircp(r,w1+w),y+getcircp(r,w1-90000+w),\
    x+getcircp(r,w2+w),y+getcircp(r,w2-90000+w),\
    x+getcircp(r,w3+w),y+getcircp(r,w3-90000+w)
    plgBlt(dc,pts,hDCBits,0,0,xx,yy,0,0,0)
    deleteDC(hDCBits)
    dispose(pts)

}

nProc drawhPicRotatedTransparent(long hPic,dc,x,y,xx,yy,w,r,col){

    long hDCBits=createCompatibleDC(hDC)
    selectObject(hDCBits, hPic)
    long pts=dim(24)
    long 	w1=angleByLine(xx,yy,0,0),\
    w2=abs(w1-360000),\
    w3=abs(w1-540000)
    casenot r : r=long(sqrt(float(xx*xx+yy*yy)))\2
    long r2=r*2
    long pts&,0=	r+getcircp(r,w1+w),r+getcircp(r,w1-90000+w),\
    r+getcircp(r,w2+w),r+getcircp(r,w2-90000+w),\
    r+getcircp(r,w3+w),r+getcircp(r,w3-90000+w)
    long mDC=CreateCompatibleDC(hDC)
    long memBM=CreateCompatibleBitmap(hDC,r2,r2)
    long oldSel=SelectObject(mDC,memBM)
    plgBlt(mDC,pts,hDCBits,0,0,xx,yy,0,0,0)
    selectobject(dc,memBM)
    transparentBlt(dc,x-r,y-r,r2,r2,mDC,0,0,r2,r2,col)
    selectObject(mDC,oldSel)
    deleteObject(memBM)
    deleteDC(mDC)
    deleteDC(hDCBits)
    dispose(pts)

}

nProc getCircP(long r,w){

    return long(sin(0.0174532925199433*float(w)/1000.0)*float(r))

}

nProc angleByLine(long x,y,xx,yy)

    sub y,yy
    sub x,xx

    if x

        xx=int(57295.77951 * arctan(float(y)/float(x)))
        case x>0 : return 270000 + xx
        return 90000 + xx

    endif

    case y<0 : return 180000
    return 0

endproc


8 kB
Hochgeladen:10/08/11
Downloadcounter205
Download
464 kB
Hochgeladen:10/08/11
Downloadcounter183
Download
 
10/08/11  
 



here drives so one car: [...] 
here fly so one Hubi: [...] 
 
04/10/12  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

6.269 Views

Untitledvor 0 min.
Thomas Freier02/16/24
H.Brill09/27/23
funkheld04/21/23
Langer01/01/22
More...

Themeninformationen

this Topic has 1 subscriber:

iF (2x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie