English
Forum

Very quick gefüllten and ungefüllten circle draw

 

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
 
09/17/12  
 



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:  [...] 
 
09/17/12  
 




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
 
09/17/12  
 



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.
 
09/18/12  
 




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
 
09/18/12  
 



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.
 
09/18/12  
 



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".

544 kB
Hochgeladen:09/18/12
Downloadcounter209
Download
1 kB
Hochgeladen:09/18/12
Downloadcounter174
Download
 
09/18/12  
 




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
 
09/18/12  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

8.963 Views

Untitledvor 0 min.
Michael Hettner08/27/21
Joerg06/10/16
p.specht12/14/13
funkheld12/14/13
More...

Themeninformationen

this Topic has 2 subscriber:

iF (4x)
Pedro Miguel (4x)


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