English
Source / code snippets

effects grafically

 
grafisches illuminate / Abdunkeln

i think these both Procedures explain itself self, are not The fastest, but functions and to put one bisl The Funktionsweise such Operationen dar.
CompileMarkSeparation
proc void_gfxbright

    parameters x%,y%,xx%,yy%
    declare q%,w%,rr%,gg%,bb%,p&
    w%=y%

    while lt(w%,yy%)

        q%=x%

        while lt(q%,xx%)

            p&=getpixel(q%,w%)
            rr%=getrvalue(p&)
            gg%=getgvalue(p&)
            bb%=getbvalue(p&)
            rr%=(255-rr%)/5+rr%
            gg%=(255-gg%)/5+gg%
            bb%=(255-bb%)/5+bb%
            setpixel q%,w%,rgb(rr%,gg%,bb%)
            add q%,1

        wend

        add w%,1

    wend

endproc


CompileMarkSeparation
proc void_gfxdark

    parameters x%,y%,xx%,yy%
    declare q%,w%,rr%,gg%,bb%,p&
    w%=y%

    while lt(w%,yy%)

        q%=x%

        while lt(q%,xx%)

            p&=getpixel(q%,w%)
            rr%=getrvalue(p&)
            gg%=getgvalue(p&)
            bb%=getbvalue(p&)
            rr%=rr%-(rr%/6)
            gg%=gg%-(gg%/6)
            bb%=bb%-(bb%/6)
            setpixel q%,w%,rgb(rr%,gg%,bb%)
            add q%,1

        wend

        add w%,1

    wend

endproc


grafically effects of Sebastian king:
CompileMarkSeparation
proc Graustufen

    parameters startx%,starty%,endx%,endy%
    declare x%,y%
    declare r%,g%,b%
    let x%=startx%
    let y%=starty%
    let endx%=@add(startx%,endx%)
    let endy%=@add(starty%,endy%)

    while @Lt(y%,endy%)

        while @Lt(x%,endx%)

            let r%=@div&(@add(@add(@GetRValue(@GetPixel(x%,y%)),@GetGValue(
            @GetPixel(x%,y%))),@GetBValue(@GetPixel(x%,y%))),3)
            let g%=r%
            let b%=g%
            SetPixel x%,y%,@RGB(r%,g%,b%)
            inc x%

        wend

        let x%=startx%
        inc y%

    wend

endproc


CompileMarkSeparation
proc Weichzeichnen

    parameters startx%,starty%,endx%,endy%
    declare x%,y%
    declare r%,g%,b%
    let x%=startx%
    let y%=starty%
    let endx%=@sub(@add(startx%,endx%),1)
    let endy%=@sub(@add(starty%,endy%),1)

    while @Lt(y%,endy%)

        while @Lt(x%,endx%)

            let r%=@div&(@add(@add(@GetRValue(@getPixel(x%,y%)),@GetRValue(@getPixel(@add(x%,1),y%))),
            @GetRValue(@getPixel(x%,@add(y%,1)))),3)
            let g%=@div&(@add(@add(@GetGValue(@getPixel(x%,y%)),@GetGValue(@getPixel(@add(x%,1),y%))),
            @GetGValue(@getPixel(x%,@add(y%,1)))),3)
            let b%=@div&(@add(@add(@GetBValue(@getPixel(x%,y%)),@GetBValue(@getPixel(@add(x%,1),y%))),
            @GetBValue(@getPixel(x%,@add(y%,1)))),3)
            SetPixel x%,y%,@RGB(r%,g%,b%)
            inc x%

        wend

        let x%=startx%
        inc y%

    wend

endproc


CompileMarkSeparation
proc Stark_Weichzeichnen

    parameters startx%,starty%,endx%,endy%
    declare x%,y%
    declare r%,g%,b%
    declare value1%,value2%,value3%,value4%,value5%
    let x%=@add(startx%,1)
    let y%=@add(starty%,1)
    let endx%=@sub(@add(startx%,endx%),1)
    let endy%=@sub(@add(starty%,endy%),1)

    while @Lt(y%,endy%)

        while @Lt(x%,endx%)

            let value1%=@getRValue(@GetPixel(x%,y%))
            let value2%=@getRValue(@GetPixel(@add(x%,1),y%))
            let value3%=@getRValue(@GetPixel(x%,@add(y%,1)))
            let value4%=@getRValue(@getPixel(@sub(x%,1),y%))
            let value5%=@getRValue(@getPixel(x%,@sub(y%,1)))
            let r%=@div&(@add(@add(@add(value1%,value2%),@add(value3%,value4%)),value5%),5)
            let value1%=@getGValue(@GetPixel(x%,y%))
            let value2%=@getGValue(@GetPixel(@add(x%,1),y%))
            let value3%=@getGValue(@GetPixel(x%,@add(y%,1)))
            let value4%=@getGValue(@getPixel(@sub(x%,1),y%))
            let value5%=@getGValue(@getPixel(x%,@sub(y%,1)))
            let g%=@div&(@add(@add(@add(value1%,value2%),@add(value3%,value4%)),value5%),5)
            let value1%=@getBValue(@GetPixel(x%,y%))
            let value2%=@getBValue(@GetPixel(@add(x%,1),y%))
            let value3%=@getBValue(@GetPixel(x%,@add(y%,1)))
            let value4%=@getBValue(@getPixel(@sub(x%,1),y%))
            let value5%=@getBValue(@getPixel(x%,@sub(y%,1)))
            let b%=@div&(@add(@add(@add(value1%,value2%),@add(value3%,value4%)),value5%),5)
            SetPixel x%,y%,@RGB(r%,g%,b%)
            inc x%

        wend

        let x%=startx%
        inc y%

    wend

endproc


CompileMarkSeparation
proc Halbton

    parameters startx%,starty%,endx%,endy%
    declare x%,y%
    declare color%
    let x%=startx%
    let y%=starty%
    let endx%=@add(startx%,endx%)
    let endy%=@add(starty%,endy%)

    while @Lt(y%,endy%)

        while @Lt(x%,endx%)

            let color%=@div&(@add(@add(@GetRValue(@GetPixel(x%,y%)),@GetGValue(
            @GetPixel(x%,y%))),@GetBValue(@GetPixel(x%,y%))),3)
            case @equ(color%,@div&(255,2)) : let color%=@RGB(255,255,255)
            case @Lt(color%,@div&(255,2))  : let color%=@RGB(0,0,0)
            case @Gt(color%,@div&(255,2))  : let color%=@RGB(255,255,255)
            SetPixel x%,y%,color%
            inc x%

        wend

        let x%=startx%
        inc y%

    wend

endproc

 
03/23/04  
 



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

2.375 Views

Untitledvor 0 min.
p.specht12/12/21
Sven Bader11/16/21
Normann Strübli03/31/20
iF06/03/18
More...

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


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