If I want to create for example a function to draw a triangle and want the color parameter to behave the same way as the internal line functions, how do I do that ?
Do I have to call _PB_FrontColor@12 and if so, does there also exist a _PB_ function that accepts one long value instead of r,g,b seperately or do I have to create a new pen and store the new handle to _PB_2DDrawing_Pen ?
2DDrawing / ASM
wilbert,
You can do both wyas but using a long directly will run faster.
BTW, if you are using a ScreenOutput(), your long Color integer will probably have to be converted from RGB to BGR mode (easily writable using something like :
or faster using FASM :
Rgrds
You can do both wyas but using a long directly will run faster.
BTW, if you are using a ScreenOutput(), your long Color integer will probably have to be converted from RGB to BGR mode (easily writable using something like :
Code: Select all
Color = (Color & $FF0000) >> 16 + (Color & $00FF00) + (Color & $0000FF) << 16
Code: Select all
! MOV eax, dword [v_Color] ; Color = (Color & $FF0000) >> 16 + (Color & $00FF00) + (Color & $0000FF) << 16
! SAL eax, 8
! BSWAP eax
! MOV dword [v_Color], eax
My avatar is a small copy of the 4x1.8m image I created and exposed at 'Le salon international du meuble à Paris' january 2004 in Matt Sindall's 'Shades' designers exhibition. The original laminated print was designed using a 150 dpi printout.

