| |
|
|
- Page 1 - |
|
Andreas Koch | Hello together,
there's time again trouble, with the I do not weiterkomme. It's all right therefore, drawing one Graphen on a Bitmap To speed. thereby goes it first once only circa together hängende lines what about me would the whole gladly with XPSE concern. thereby stand I now to two Problemen.
1. XPSE knows only whom commands Setpixel, question: knows someone a API-commands, the one with a line draw can? Einstellungsmöglichkeiten of colour, Start- and Endpunkt as well as Linienstärke wären necessary. 2. XPSE draw fundamentally first once only on the Mainwindow. Can drawing somehow on a Bitmap redirecting?
To 1.: the can I me probably too yet self basteln, the API-commands would the whole only vereinfachen.
To 2. have I attempts, me something from the nProc drawhPicRotated To wander, what these function to have shining, works but not so integrally.... CompileMarkSeparation {$cleq}
$I Pixels.Inc
Window 0,0 - %Maxx, %Maxy
var hPic&=create("hNewPic",400,400,$FF)
StartPaint hPic&
UseFont "Arial",30,0,1,0,0
textcolor $FFFF,-1
drawtext 5,0,"XProfan.Com"
textcolor $AA,-1
drawtext 5,0,"XProfan"
EndPaint
DrawPic hPic&,0,0,0
nproc Test
Parameters hPic&
long hDCBits=CreateCompatibleDC(hDC)
selectObject(hDCBits, hPic&)
WhileLoop 50
SetPixel(hDCBits,50+&loop,50,0)
EndWhile
EndProc
Test(hPic&)
DrawPic hPic&,500,0,0
WaitInput
would be lovely, if your me there help on could.
lovely Greeting
Andreas cook |
|
|
| |
|
|
|
« this Posting watts as Solution marked. » |
|
| say we simply because there something "geschludert" watts.
(have The to put in the code markiert) CompileMarkSeparation {$cleq}
Window 0,0 - %Maxx, %Maxy
var hPic&=create("hNewPic",400,400,$FF)
StartPaint hPic&
UseFont "Arial",30,0,1,0,0
textcolor $FFFF,-1
drawtext 5,0,"XProfan.Com"
textcolor $AA,-1
drawtext 5,0,"XProfan"
EndPaint
DrawPic hPic&,0,0;0// <-- statt DrawPic hPic&,0,0,0
Test(hPic&)
DrawPic hPic&,500,0;0// <-- statt DrawPic hPic&,500,0,0
WaitInput
nproc Test
Parameters hPic&
long hDCBits=CreateCompatibleDC(hDC)
selectObject(hDCBits, hPic&)
WhileLoop 50
SetPixel(hDCBits,50+&loop,50,0)
EndWhile
deleteDC(hDCBits)// <-- vergessen, eigentlicher Knackpunkt
ENDPROC
|
|
|
| |
|
|
|
|
Dieter Zornow | I work fundamentally not XPSE, but XProfan has still The command Line and LineTo. circa on one Bitmap to drawing must You Startpaint lever and Endpaint use. |
|
|
| XProfan X2Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2 | 09/05/12 ▲ |
|
|
|
|
Andreas Koch | thanks. but the known I already. It's all right therefore, that with the whom Profan command too long lasts what about me the whole with XPSE speed would like. |
|
|
| |
|
|
|
funkheld | Hello, I had such a thing already time with XPIA made, there are too some Examples drin. XPSE and XPIA can indeed together used go. I had then none grossen Geschwindigkeitsunterschied check can, because the graphic-windows-command(API-commands ) too with XPIA(ASM) used go. the only what speed becomes are under umständen creep and Zählvariablen , these Time becomes but again by the graphic-windows-command(API-commands ) verschlampt.
except You write now self one Linienprogramm etc., there must You then but again The spots yourself calculate with ASM, namely if You for again whom Plotbefehl(API-commands ) take , goes The Zeitschlamperei again go.
I work fundamentally not XPSE, but XProfan has still The command Line and LineTo. circa on one Bitmap to drawing must You Startpaint lever and Endpaint use.
without XPSE or XPIA is the entire Profanprogramm grottenlangsam.
look here times for XPIA : [...] the only what there tall geschleunigt becomes is the Zählschleife.
greeting |
|
|
| |
|
|
|
funkheld |
then bliebe there yet the Umlenken the Zeichenbefehle on a Bitmap....
You need The Anfangsadresse the Bitmap The You Change want, wide, Höhe and Bitmaptiefe, then can you loslegen with XPIA.
greeting |
|
|
| |
|
|
|
Andreas Koch | Sorry for the verfrühte Posting. I had whom Link to the example not seen. i think, so can I what begin. though sustain I always The Error Message, that it GetXpiaProcAddress not knows. Do I for yet something take on? CompileMarkSeparation $MAKE CLE
$H Windows.ph
Declare hwin&,x&,y&,f&,hdcwin&
Window 20,20-200,200
hWin& = Create("Window", %hWnd, "Test", 250, 20, 650,500)
hDCWin& = ~GetWindowDC(hWin&)
If 0
AsmStart pset
Parameters hdcwin&,x&,y&,f&
mov ecx,para1
mov eax,para2
mov ebx,para3
mov edi,para4
invoke SetPixel,ecx,eax,ebx,edi
AsmEnd
EndIf
whileloop 0,100,1
x&=&loop
y&=&loop
f&=$ff0000
Call(GetXpiaProcAddress(XpiaModule&,"pset"),hdcwin&,x&,y&,f&)
endwhile
WaitInput
End
|
|
|
| |
|
|
|
funkheld |
GetXpiaProcAddress
I faith the Aufrufname has changed ?
but "Setpixel" uses again these slow WindowsAPI.
greeting |
|
|
| |
|
|
|
| what power your because here?! everything plenty plainer!
One rectangle: [...]
On hWnd characters simply so: CompileMarkSeparation line or Kurven desired? then simply lines or Kurvenfunktionen benefit!
any described and simply aufzurufen: [...]
thereafter goes ne line of 20,30 to 100,100 so: CompileMarkSeparation In nProcs stand quasi any APIs ready -
there can it one Yes on garnichts are missing.
Einzelnes Pixel settle? CompileMarkSeparation |
|
|
| |
|
|
|
Andreas Koch | the sees now so from, as could I the directly using. lovely Thanks already time.
i want but really only very ungern on the Mainwindow malen, really none. Can not somehow redirecting? I have there this hdc in the suspicion, white but not really something so to begin, see first Posting.
PS: what means the DC really in long? |
|
|
| |
|
|
|
| |
|
|
|
| Nachtrag: Gib too ne pixels.inc [...] for Examples faster graphic- effects
and a hPic.inc too for fortgeschrittenes Rumbildereihen: [...]
and look too time here mere: [...] |
|
|
| |
|
|
|
funkheld | Hmm.., what you mean are so again The slow internen graphic-Windowsbefehle(API): MoveToEx(hDC,20,30,0) LineTo(hDC,100,100) for a slippy graphic taugen The nothing.
It's all right still directly plenty faster with (DirectX) and/or with XPIA(ASM) without these finished slow Move and LineTo.
greeting |
|
|
| |
|
|