| |
|
|
- Page 1 - |
|
H.Brill | Hi, having nothing found. I bräuchte so a 7Segment-display on my dialog. moreover should I a vain Bitmap create, hereon draw and then in the dialog Show.
be but unfortunately not so graphic- bewandert.
Have as a PureBasic Source found, whom I gladly in XProfan umsetzen would like. |
|
|
| Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 04/15/10 ▲ |
|
|
|
|
| |
|
- Page 1 - |
|
Thomas Freier | it dürften but sufficient suitable Free Digifonts in the WEB present his. Z.B.: [...] |
|
|
| Gruß Thomas Windows XP SP2, XProfan X2 | 04/21/10 ▲ |
|
|
|
|
ByteAttack | Thomas suitor, Beitrag=56834, Zeitpunkt=21.04.2010
it dürften but sufficient suitable Free Digifonts in the WEB present his. Z.B.: [...]
apiece no - Is clear... question me only, whether one too TTF benefit can, The not installs are. Virtually over irgendeinen Access to The TTF-File directly. |
|
|
| |
|
|
|
| @Marc: No, only to "windows"fonts... copied. ^^
for my savour power your the plenty To tricky.
simply Bitmapfonttexturmäßig (16*16 boxes in z.B. 512x512-Pixel-Image) and only to plainer XY-Formel rauskopieren - is too superfix or I have the target the Übung misread. ^^ |
|
|
| |
|
|
|
ByteAttack | Yes - it wants Yes no Graphics with itself rumschleppen ... |
|
|
| |
|
|
|
| either malt it The Digits into hPic or it läd these into hPic - it can also one hPic produce and simply Bilddaten from memory therein take off with SetBitmapBits(hPic,pixelAnzahl,pixelSpeicher) How z.B. in the Pixels.Inc. with GetBitmapBits käme one too simply on The Pixeldaten heran, could one as .tex Save and Datengenerator integrate circa by SetBitmapBits against anzuweisen. ^^ |
|
|
| |
|
|
| |
|
- Page 2 - |
|
|
H.Brill | ought to still possible his, in a Memory bitmap a number as 7Segment to drawing and view. the would then too quite slippy. therefore having so did i the PB-example chosen. so vaguely place I me the to : CompileMarkSeparationDeclare bild1&, bild2&, bmp1&, bmp2&, bmp3&, bmp4&, hD%
Proc ZeichneLed
Parameters image&, zahl%, farbe%
StartPaint bmp1&
hier wird auf das entsprechende Bild (Bitmap)
die angegebene Zahl in angegebener Farbe gezeichnet
und angezeigt
EndPaint
EndProc
Proc Dialog
Declare hB%, start%, info%, OK%, Name$
hD% = @Create("Dialog",%DeskTop,"Dialogfenster",100,100,600,400)
hB% = @Create("Button",hD%,"&ENDE",10,10,60,25)
info% = @Create("Button", hD%, "&Info", 100, 10, 60, 25)
start% = @Create("Button", hD%, "&Start",180, 10, 60, 25)
bild1& = @Create("hNewPic", 20, 40, RGB(0,255,255)) Cyan Image
bild2& = @Create("hNewPic", 20, 40, RGB(255,0,0)) Red image
bmp1& = Create("BITMAP",hD%,bild1&,30,60)
bmp2& = Create("BITMAP",hD%,bild1&,52,60)
bmp3& = Create("BITMAP",hD%,bild2&,74,60)
bmp4& = Create("BITMAP",hD%,bild2&,96,60)
Clear OK%
WhileNot Ok%
WaitInput
If @Clicked(hB%)
Ok% = 1
ElseIf %Key = 2
Hier wird das X (rechts oben Schließen) ausgewertet
OK% = 1
ElseIf @Clicked(info%)
Name$ = @GetText$(Edit1%)
@MessageBox("Ich bin der Autor : " + Name$, "Info", 0)
ElseIf @Clicked(start%)
ZeichneLed bmp1&, 1, RGB(x,x,x) Zahl 1 mit Farbe RGB() zeichnen
EndIf
EndWhile
Dialogfenster (incl. Button, usw.) entfernen
@DestroyWindow(hD%)
EndProc
Hier wird die Dialogbox (Procedur) aufgerufen
Dialog
DeleteObject bild1&, bild2&, bmp1&, bmp2&, bmp3&, bmp4&
href='./../../Function-References/XProfan/end/'>End
|
|
|
| Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 04/22/10 ▲ |
|
|
|
|
Uwe ''Pascal'' Niemeier | Hi people!
question me only, whether one too TTF benefit can, The not installs are. Virtually over irgendeinen Access to The TTF-File directly. CompileMarkSeparation BTW1: with usage of AddFontResourceEx /RemoveFontResourceEx can too to determine, that only the Own Program Access to whom Font has.
BTW2: leaves one RemoveFontResource lane, remaining the Font until next Neustart in windows available.
BTW3: The Fontname must not the Filenames identical his!
BTW4: © / ® the Fonts with Disclosure mind!
HTH Pascal |
|
|
| |
|
|
|
| calm, known I not at all, that one TTFs too "on-the-fly" benefit can. ^^
would be on jedenfall one nice Snippet.
H.Brill, Beitrag=56854, Zeitpunkt=22.04.2010
ought to still possible his, in a Memory bitmap a number as 7Segment to drawing and view.
now understand I first, what you mean.
clear goes this simply, I look tonight same time - i'd probably the Digits-Segmentinfos for all Digits simply in a String (memory) take off - make I before then as I my. ^^ |
|
|
| |
|
|
|
ByteAttack | @Pascal: horny ! this is me still saponaceous 5 Bannannannnas worth... |
|
|
| |
|
|
|
| Perhaps. something like: CompileMarkSeparationdecimals 0
randomize
window 1000,750
var myDisplayHPic&=digitsHPic.create("012345",32,64)
while 1
waitinput 500
drawPic myDisplayHPic&,20,20;0
digitsHPic.renew(myDisplayHPic&,str$(rnd(999999)),32,64)
wend
...deleteObject(myDisplayHPic&)
end
proc digitsHPic.create
parameters digits$,charWidth&,charHeight&
case digits$="" : digits$="0"
var hPic&=create("hNewPic",len(digits$)*charWidth&,charHeight&,0)
digitsHPic.renew(hPic&,digits$,charWidth&,charHeight&)
return hPic&
endproc
proc digitsHPic.renew
parameters hPic&,digits$,charWidth&,charHeight&
var c&=len(digits$)
casenot c& : return
startPaint hPic&
cls $3E3E3E
var lnsz&=int(sqrt(charWidth&*charHeight&)*0.08)
var innerCharWidth&=int(charWidth&*0.8)
var innerCharHeight&=int(charHeight&*0.8)
var innerCharYM&=int(charHeight&*0.5)
var innerCharX&=int((charWidth&-innerCharWidth&)*0.5)
var innerCharY&=int((charHeight&-innerCharHeight&)*0.5)
var digs$="0000000001001010111011011011011101011010111101111101001011111111111011"
var ch&=""
whileLoop 0,c&-1
ch&=(ord(mid$(digits$,&loop+1,1))-48)*7
digitsHPic.renew.line(0,&loop*charWidth&+innerCharX&+lnsz&,innerCharY& , &loop*charWidth&+innerCharX&+innerCharWidth&-lnsz&,innerCharY& )
digitsHPic.renew.line(1,&loop*charWidth&+innerCharX&,innerCharY&+lnsz& , &loop*charWidth&+innerCharX&,innerCharYM&-lnsz& )
digitsHPic.renew.line(2,&loop*charWidth&+innerCharX&+innerCharWidth&,innerCharY&+lnsz& , &loop*charWidth&+innerCharX&+innerCharWidth&,innerCharYM&-lnsz& )
digitsHPic.renew.line(3,&loop*charWidth&+innerCharX&+lnsz&,innerCharYM& , &loop*charWidth&+innerCharX&+innerCharWidth&-lnsz&,innerCharYM& )
digitsHPic.renew.line(4,&loop*charWidth&+innerCharX&,innerCharYM&+lnsz& , &loop*charWidth&+innerCharX&,innerCharY&+innerCharHeight&-lnsz& )
digitsHPic.renew.line(5,&loop*charWidth&+innerCharX&+innerCharWidth&,innerCharYM&+lnsz& , &loop*charWidth&+innerCharX&+innerCharWidth&,innerCharY&+innerCharHeight&-lnsz& )
digitsHPic.renew.line(6,&loop*charWidth&+innerCharX&+lnsz&,innerCharY&+innerCharHeight& , &loop*charWidth&+innerCharX&+innerCharWidth&-lnsz&,innerCharY&+innerCharHeight& )
wend
usepen 0,int(lnsz&*0.25),0
usebrush 0,0
whileLoop 0,c&-1
rectangle &loop*charWidth&,0 - &loop*charWidth&+charWidth&,charHeight&
wend
endPaint
proc digitsHPic.renew.line
parameters ln&,x&,y&,xx&,yy&
usepen 0,lnsz&,if(byte(addr(digs$),ch&+ln&)-48,$22FF11,$4E4E4E)
line x&,y& - xx&,yy&
endproc
< s=s4 href='./../../Function-References/XProfan/endproc/'>endproc
Download
can the too as Control provide. |
|
|
| |
|
|
|
H.Brill | sees already time integrally well from. goes something like on one dialog ? Bräuchte something like in a normalen dialog-application.
as far as i know, play since the UseBrush and USEP - command not with. |
|
|
| Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 04/22/10 ▲ |
|
|
|
|
| clear, you have Yes The electoral just the HPic to drawing or for the HPIC one Bitmap ( create("Bitmap...) anzuwenden - Bitmaps can indeed free from problems on Dialogen stored go. |
|
|
| |
|
|