English
Source / code snippets

replace Image colour Hpic swap

 
swaps (blitzschnell) a defined colour REPLCOL& altogether Image The colour NEWCOL&, idea from: [...] 

Originalcode: [...] 
CompileMarkSeparation
proc HPIC.REPLACECOL

    PARAMETERS HPIC&,REPLCOL&,NEWCOL&,XX&,YY&
    var HPICTMP&=CREATE("hNewPic",XX&,YY&,NEWCOL&)
    STARTPAINT HPICTMP&
    DRAWPIC HPIC&,0,0;-1,REPLCOL&
    ENDPAINT HPICTMP&
    STARTPAINT HPIC&
    DRAWPIC HPICTMP&,0,0;0
    ENDPAINT
    DELETEOBJECT HPICTMP&
    RETURN HPIC&

07/17/08  
 




Jac
de
Lad
The Idea gefällt me very well.
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
07/17/08  
 



gladly happen, would only schöner if one instead of "nur" the Size (xx,yy) a manner "Clippingregion" define could - at least by rectangle. time look How the on the reibungslosesten weg could... (circa z.B. only region 10,10 - 20,20 so To "bearbeiten")
 
07/17/08  
 



These Version here [...]  is rather:

Optional only 3 Parameter or 7 Parameter with Zielbereichangabe.
CompileMarkSeparation
proc HPIC.REPLACECOL

    PARAMETERS HPIC&,REPLCOL&,NEWCOL&,X&,Y&,XX&,YY&
    var H&=0

    IF %PCOUNT<4

        H&=CREATE("hPicCopy",HPIC&)
        X&=0
        Y&=0
        XX&=%BMPX
        YY&=%BMPY
        DELETEOBJECT H&

    ENDIF

    H&=CREATE("hNewPic",XX&,YY&,NEWCOL&)
    STARTPAINT H&
    DRAWPIC HPIC&,0-X&,0-Y&;-1,REPLCOL&
    ENDPAINT H&
    STARTPAINT HPIC&
    DRAWPIC H&,X&,Y&;0
    ENDPAINT
    DELETEOBJECT H&
    RETURN HPIC&

endproc

 
07/17/08  
 




Jac
de
Lad
yet plainer Better get going, if You
CompileMarkSeparation
H&=CREATE("hNewPic",XX&,YY&,NEWCOL&)
STARTPAINT H&
DRAWPIC HPIC&,0-X&,0-Y&;-1,REPLCOL&
ENDPAINT H&
STARTPAINT HPIC&
DRAWPIC H&,X&,Y&;0
ENDPAINT
DELETEOBJECT H&
RETURNC&

through
CompileMarkSeparation
H&=CREATE("hNewPic",XX&,YY&,NEWCOL&)
STARTPAINT H&
DRAWPIC HPIC&,0-X&,0-Y&;-1,REPLCOL&
ENDPAINT
DELETEOBJECT HPIC&
RETURN H&

supplant.
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
07/17/08  
 



sees then complete How from?
 
07/17/08  
 




Jac
de
Lad

CompileMarkSeparation
proc HPIC.REPLACECOL

    PARAMETERS HPIC&,REPLCOL&,NEWCOL&,X&,Y&,XX&,YY&
    var H&=0

    IF %PCOUNT<4

        H&=CREATE("hPicCopy",HPIC&)
        X&=0
        Y&=0
        XX&=%BMPX
        YY&=%BMPY
        DELETEOBJECT H&

    ENDIF

    H&=CREATE("hNewPic",XX&,YY&,NEWCOL&)
    STARTPAINT H&
    DRAWPIC HPIC&,0-X&,0-Y&;-1,REPLCOL&
    ENDPAINT
    DELETEOBJECT HPIC&
    RETURN H&

endproc

 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
07/17/08  
 



Ne, these Solution not working... gib time Coordinates one...

my Testcode: [...] 

yields to Your code:



instead of


3 kB
Hochgeladen:07/17/08
Downloadcounter258
Download
3 kB
Hochgeladen:07/17/08
Downloadcounter243
Download
 
07/17/08  
 




Jac
de
Lad
can strain Nich testing. the only, I differently make is still, I the lever the temporären Bildes zurückgebe, instead of whom Kram again 1:1 zurückzukopieren. Versteh I now not.
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
07/17/08  
 



Gug once more on have only what overlooking because integrally so simply is the process unfortunately not.
 
07/17/08  
 




Jac
de
Lad
Määääääp, you have Yes so right.

and it missing eindeutig another profansches "GetWidth" and "GetHeight"...
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
07/17/08  
 



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

13.179 Views

Untitledvor 0 min.
Jörg Sellmeyer06/24/20
Michael W.07/03/16
Stephan Lührsen01/09/14
Stephie09/08/11
More...

Themeninformationen

this Topic has 2 subscriber:

iF (6x)
Jac de Lad (5x)


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