| |
|
|
Pedro Miguel | Hi, want one gefüllten circle draw for a Led To simulate. an graphic reading lasts too long.
background: from the seriellen schnitstellen I get statusbits The I as ON / OFF Show would like. therefore should the draw the circle very quick vorgehen. because once should one ungefüllten circle and very short hereon can possible one gefüllten circle attend must. knows someone How the best To make is?
greeting Pedro |
|
|
| |
|
|
|
| fastest lane is by GDI into hPic draw z.B. with the ellipsis-function and
then konvertierst simply z.B. The hPic-Pixel in a Pixelspeicher and voila.
from the hPic.inc around the hPic -Pixel as Speicherpixel/ String to obtain:
string hPic.bgr2String(long h,_width,_height){
long sz=( (_width*32\8-1) | 3 +1) * abs(_height)
mem mem=bitmapInfoHeader
with mem
.biSize& = sizeof(mem)
.biWidth& = _width
.biHeight& = _height
.biPlanes% = 1
.biBitCount% = 32
.biCompression& = BI_RGB
.biSizeImage& = sz
endwith
mem data=sz
string ret=""
case ~getDIBits(hDC,h,,_height,data,mem,) : ret=char$(data,,sz)
dispose data
dispose mem
return ret
}
If you whom circle but really self calculate like then simply times the
function getCircP look at: [...] |
|
|
| |
|
|
|
Pedro Miguel | Hi,
Vielen Thanks for your Help, but understand whom code not circa it anzuwenden. be not yet very advanced in XProfan.
is The colour wählbar with the the circle filled go should?
How call I this code from?
cls ... ...
greeting Pedro |
|
|
| |
|
|
|
| Regards!
draw simply a circle through whom XProfan-Opportunities by usePen; useBrush
and ellipsis best into hPic (create("hNewPic"...).
so can You colours velvet filling to determine.
The function supra is fortgeschrittenes XProfan in use with the Prä-
komilierer and can so so How she's carryed out and be expects as Parameter
one hPic-lever and the Bildausmaße the hPics and supply a Zeichenkette back
The The Pixel-Farbinformationen as chain contain. If You whom Präkompi
not employment having then write I you these function too circa. |
|
|
| |
|
|
|
Pedro Miguel | Hello iF,
If You whom Präkompi not employment having then write I you these function too circa.
Fals not alzu plenty Time is, would I danbar for function. Perhaps understand I it then. Frank has already what posted what under circumstances useable is, be but tensely on your Solution
greeting Pedro |
|
|
| |
|
|
|
| I must confess your question now first correctly. understood to have - i see to Time well only "Bahnhof".
to that Topic:
of my opinion to GEHTS on the fastest with mere XProfan, if you The LED-Images already in a hPic stored have. means The Images once to create("HPIC",... invite.
then beget You Bitmap-Statics to create("bitmap",...and if you The graphic one Bitmap-Static Change want then uses simply these Message: sendMessage(bitMapControl,370,0,hPic) // stm_setImage circa the Bitmap-Static one other hPic (other LED-Image) zuzuweisen.
The of Frank beschriebene method is in the Contrast to this Bitmap-Static-method only for the hWnd suitable and You müsstest too mind, that You even not only the hDC copy, separate additional on the hDC2.
These Bitmap-Static-method erspart you however on allenFestern/ Dialogen manual Neuzeichen and might dank the fact the You with a only SendMessage the hPic Change can in the application on the simplest his. |
|
|
| |
|
|
|
| here one vollständiger View source pretty blinkender LEDs:
Download external Download
cls
var orangeLEDBild&=create("HPIC",-1,"orange.png")
var gruenLEDBild&=create("HPIC",-1,"grün.png")
var cyanLEDBild&=create("HPIC",-1,"cyan.png")
var ausLEDBild&=create("HPIC",-1,"aus.png")
//
var orangeLEDBitmap&=create("bitmap",%hWnd,orangeLEDBild&,30,30)
var gruenLEDBitmap&=create("bitmap",%hWnd,gruenLEDBild&,50,30)
var cyanLEDBitmap&=create("bitmap",%hWnd,cyanLEDBild&,70,30)
while 1
waitinput 50
if rnd(2)
sendMessage(orangeLEDBitmap&,370,0,orangeLEDBild&)
else
sendMessage(orangeLEDBitmap&,370,0,ausLEDBild&)
endif
if rnd(2)
sendMessage(gruenLEDBitmap&,370,0,gruenLEDBild&)
else
sendMessage(gruenLEDBitmap&,370,0,ausLEDBild&)
endif
if rnd(2)
sendMessage(cyanLEDBitmap&,370,0,cyanLEDBild&)
else
sendMessage(cyanLEDBitmap&,370,0,ausLEDBild&)
endif
wend
end
sees from How with one "Modem". |
|
|
| |
|
|
|
Pedro Miguel | Hello iF,
Vielen Thanks. I known the You something Tolles zauberst. very well and simply To understand. well the XProfan and you gives.
greeting Pedro |
|
|
| |
|
|